hey i desperately need to know the answer for a project if anyone can help...
i and retrievin info from a DB and desplayin it in a dynamic table. then if the <select value='1'> in the form i need to send a variable accross to another page.
the code is like this:
$href = "HowManyPeople.php?daysOfMonth=".$dayArrive."&monthOfYear=".$month."&year=".$year."&nights=".$nights;
require("dbCon.php");
if($con)
{
mysql_select_db($database);
$res = mysql_query("select * from roomfed where RoomName not in (select RoomName from bookingfed)");
echo "<form id='form1' name='form1' method='post' action='".$href."'>";
while($row = mysql_fetch_assoc($res))
{
echo "<div id='RoomBorder'>";
echo "<table width='100%'><tr><th colspan='2'>". $row["[COLOR="Red"]RoomName[/COLOR]"] ."</th></tr>";
echo "<tr><td colspan='2' align='left'>".$row["[COLOR="Red"]Description[/COLOR]"]."</td></tr>";
echo "<tr><td><b>Max Guests ".$row["[COLOR="Red"]RoomCapacity[/COLOR]"]."</b></td><td><b>Rates</b></td></tr>";
echo "<tr><td></td><td>".$row["[COLOR="Red"]RoomInSeasonPrice[/COLOR]"]."</td></tr>";
echo "<tr><td>[COLOR="Green"]How many units do you require: <select name='HowManyUnits' id='HowManyUnits'>[/COLOR]
[COLOR="Red"]<option selected='selected' value='0'>Units</option>
<option value='1'>1</option>[/COLOR]
</select></td><td align='Left'><input type[COLOR="Red"]='submit' name='Next' id='Next' value='Next'[/COLOR]/></td></tr>";
echo "</table><br><br>";
echo "</div><br>";
}
//<!--End of div RoomBorder-->
echo "</form>";
so there will be multiple tables with info about each room in each. then if the value from the <options>
tag is == 1 i need to send across the 'RoomName'. then i can reconnect to the DB and retrieve all info for that room.
please if anyone can help it is urgent.
many thanks