|
Posted by cendrizzi on 10/05/06 04:25
Please be more specific. Do you mean you want to combine the files so
it's posts to itself so you can show that the correct option is
selected?
On Oct 4, 8:12 pm, "kirke" <hinky...@gmail.com> wrote:
> Hi. I'm a real beginner of PHP. So if my question is so stupid, plz
> understand me. Thx.
>
> I made a file like following :
>
> <form id="form1" name="form1" method="post" action="step2.php">
> <table >
> <tr>
> <select name="EngineType" id="EngineType">
>
> <?php
> require('conf.php')
> dbconnect();
> $sql = 'SELECT * FROM dbo_EngineType;
> $result = mysql_query($sql) or die();
>
> while( $row = mysql_fetch_array($result) )
> {
> echo '<option
> value="'.$row['iID'].'">'.strtoupper($row['sDescription']).'</option>';
> }
> ?>
> </select>
> </tr> </table> </form>
>
> And another file have following code :
>
> <?php
> $EngineID = (int)$_POST['EngineType'];
> ?>
>
> At here, How can I combine both file? I mean i want to define $EngineID
> as 'EngineType' selected value(option). I don't know how can i change
> $_POST part.
>
> Thank you!
Navigation:
[Reply to this message]
|