zed420 Posted December 16, 2008 Share Posted December 16, 2008 Hi All Can anyone please point me in right direction, I cannot post “custname1” and “des1”in this form? Why??? <?php session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link href="myStyle2.css" rel="stylesheet" type="text/css" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Instant Booking</title> <style type="text/css"> body { background:url(Images/aurora1pu.jpg); } </style> <script type="text/javascript"><!-- var lastDiv = ""; function showDiv(divName) { // hide last div if (lastDiv) { document.getElementById(lastDiv).className = "hiddenDiv"; } if (divName && document.getElementById(divName)) { document.getElementById(divName).className = "visibleDiv"; lastDiv = divName; } } //--> </script> </head> <body> <? $id = $_POST['id']; $passType = $_POST['passType']; $vehicleType = $_POST['vehicleType']; $roomNo = $_POST['roomNo']; $tableNo = $_POST['tableNo']; $noOfVehicle = $_POST['noOfVehicle']; if ($_POST['submit']){ echo "$passType<br>"; echo "$vehicleType<br>"; echo "$tableNo<br>"; echo "$roomNo<br>"; echo "$noOfVehicle<br>"; echo "$custname1<br>"; echo "$des1<br>"; } ?> <form name="action" id="action" method="post" action="<?=$_SERVER['PHP_SELF']?>"> <div class="smallerText"><center> <table width="55%" border="0" cellspacing="3" cellpadding="3"> <tr> <td width="3%"><b>Passenger Type</b></td> <td width="3%"><b>Vehicle Type</b></td> <td width="3%"><b>Room No</b></td> <td width="3%"><b>Table No</b></td> <td width="3%"><b>No. of Vehicle</b></td> </tr> <tr> <td><select name="passType" id="passType" > <option value="customer" selected="selected">Customer</option> <option value="staff">Staff</option> </select></td> <td><select name="vehicleType" id="vehicleType"> <option value="4seater">4 Seater</option> <option value="7seater">7 Seater</option> </select></td> <td><input name="tableNo" type="text" id="tableNo" size="10" /></td> <td><input name="roomNo" type="text" id="roomNo" size="10" /></td> <td><select name="noOfVehicle" id="noOfVehicle" onchange="showDiv(this.value);"> <option value="">0</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> </select></td> </tr></table> </center> <p id="1" class="hiddenDiv" align="center"> <table width="541" border="0" cellspacing="3" cellpadding="3"> <tr> <td width="103">Customer Name</td> <td width="144"><input type="text" name="custname1" id="custname1" /> </td> <td width="64">Destination</td> <td width="153"><input type="text" name="des1" id="des1" /> </td> </tr> </table></p> <center><input name="submit" type="submit" value="Submit Request"/> <input name="reset" type="reset" value="Reset" /></center> </div></form> </body> </html> Thanks Zed Link to comment https://forums.phpfreaks.com/topic/137165-cannot-post/ Share on other sites More sharing options...
mmarif4u Posted December 16, 2008 Share Posted December 16, 2008 I did not see these in your script. $custname1 = $_POST['custname1']; $des1 = $_POST['des1']; Link to comment https://forums.phpfreaks.com/topic/137165-cannot-post/#findComment-716507 Share on other sites More sharing options...
zed420 Posted December 16, 2008 Author Share Posted December 16, 2008 I am a fool , Thanks chuck Zed Link to comment https://forums.phpfreaks.com/topic/137165-cannot-post/#findComment-716509 Share on other sites More sharing options...
mmarif4u Posted December 16, 2008 Share Posted December 16, 2008 you are welcome. please mark post as solved. Link to comment https://forums.phpfreaks.com/topic/137165-cannot-post/#findComment-716511 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.