Posted by kirke on 10/05/06 02:12
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]
|