Jump to content

m-hrt

Members
  • Posts

    18
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

m-hrt's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. how can i insert more than one values of check boxes into mysql in this??? i have table called seats in this i have these fields "seat, seat_two, seat_three, seat_four, seat_five, seat_six" if a user wants to reserve more than seats so he can reserve upto six. Here is the Code:= <?php $connection = mysql_connect("localhost","root","password") or die("error connect"); mysql_select_db("online_bus_project"); if(isset($_POST['team'])) { foreach($_POST['team'] as $value) { $insert="INSERT INTO seats (seat) VALUES ('$value')"; mysql_query($insert); } } ?> it inserts only one i want it to go for upto six??? If im inserting into INSERT INTO seats (seat, two_seats.....and so on) then its not working data isnt send. What should i do? HTML FORM:= <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <table width="94%" bgcolor="#cacb98" border="1" cellpadding="0" cellspacing="0"> <tbody><tr> <td width="12%"> <input name="team[]" value="1" type="checkbox"> <font size="2" face="verdana">1</font> </td> <td width="12%"> <input name="team[]" value="2" type="checkbox"> <font size="2" face="verdana">2</font> </td> <td width="13%"> <input name="team[]" value="3" type="checkbox"> <font size="2" face="verdana">3</font> </td> <td width="13%"> <input name="team[]" value="4" type="checkbox"> <font size="2" face="verdana">4</font> </td> <td width="20%"> <input name="team[]" value="5" type="checkbox"> <font size="2" face="verdana">5</font> </td> </tr> <tr> <td width="12%"> <input name="team[]" value="6" type="checkbox"> <font size="2" face="verdana">6</font> </td> <td width="12%"> <input name="team[]" value="7" type="checkbox"> <font size="2" face="verdana">7</font> </td> <td width="13%"> <input name="team[]" value="8" type="checkbox"> <font size="2" face="verdana">8</font> </td> <td width="13%"> <input name="team[]" value="9" type="checkbox"> <font size="2" face="verdana">9</font> </td> <td width="20%"> <input name="team[]" value="10" type="checkbox"> <font size="2" face="verdana">10</font> </td> </tr> <tr> <td width="12%"> <input name="team[]" value="11" type="checkbox"> <font size="2" face="verdana">11</font> </td> <td width="12%"> <input name="team[]" value="12" type="checkbox"> <font size="2" face="verdana">12</font> </td> <td width="13%"> <input name="team[]" value="13" type="checkbox"> <font size="2" face="verdana">13</font> </td> <td width="13%"> <input name="team[]" value="14" type="checkbox"> <font size="2" face="verdana">14</font> </td> <td width="20%"> <input name="team[]" value="15" type="checkbox"> <font size="2" face="verdana">15</font> </td> </tr> <tr> <td width="12%"> <input name="team[]" value="16" type="checkbox"> <font size="2" face="verdana">16</font> </td> <td width="12%"> <input name="team[]" value="17" type="checkbox"> <font size="2" face="verdana">17</font> </td> <td width="13%"> <input name="team[]" value="18" type="checkbox"> <font size="2" face="verdana">18</font> </td> <td width="13%"> <input name="team[]" value="19" type="checkbox"> <font size="2" face="verdana">19</font> </td> <td width="20%"> <input name="team[]" value="20" type="checkbox"> <font size="2" face="verdana">20</font> </td> </tr> <tr> <td width="12%"> <input name="team[]" value="21" type="checkbox"> <font size="2" face="verdana">21</font> </td> <td width="12%"> <input name="team[]" value="22" type="checkbox"> <font size="2" face="verdana">22</font> </td> <td width="13%"> <input name="team[]" value="23" type="checkbox"> <font size="2" face="verdana">23</font> </td> <td width="13%"> <input name="team[]" value="24" type="checkbox"> <font size="2" face="verdana">24</font> </td> <td width="20%"> <input name="team[]" value="25" type="checkbox"> <font size="2" face="verdana">25</font> </td> </tr> <tr> <td width="12%"> <input name="team[]" value="26" type="checkbox"> <font size="2" face="verdana">26</font> </td> <td width="12%"> <input name="team[]" value="27" type="checkbox"> <font size="2" face="verdana">27</font> </td> <td width="13%"> <input name="team[]" value="28" type="checkbox"> <font size="2" face="verdana">28</font> </td> <td width="13%"> <input name="team[]" value="29" type="checkbox"> <font size="2" face="verdana">29</font> </td> <td width="20%"> <input name="team[]" value="30" type="checkbox"> <font size="2" face="verdana">30</font> </td> </tr> <tr> <td width="12%"> <input name="team[]" value="31" type="checkbox"> <font size="2" face="verdana">31</font> </td> <td width="12%"> <input name="team[]" value="32" type="checkbox"> <font size="2" face="verdana">32</font> </td> <td width="13%"> <input name="team[]" value="33" type="checkbox"> <font size="2" face="verdana">33</font> </td> <td width="13%"> <input name="team[]" value="34" type="checkbox"> <font size="2" face="verdana">34</font> </td> <td width="20%"> <input name="team[]" value="35" type="checkbox"> <font size="2" face="verdana">35</font> </td> </tr> <tr> <td width="12%"> <input name="team[]" value="36" type="checkbox"> <font size="2" face="verdana">36</font> </td> <td width="12%"> <input name="team[]" value="37" type="checkbox"> <font size="2" face="verdana">37</font> </td> <td width="13%"> <input name="team[]" value="38" type="checkbox"> <font size="2" face="verdana">38</font> </td> <td width="13%"> <input name="team[]" value="39" type="checkbox"> <font size="2" face="verdana">39</font> </td> <td width="20%"> <input name="team[]" value="40" type="checkbox"> <font size="2" face="verdana">40</font> </td> </tr> <tr> <td width="12%"> <input name="team[]" value="41" type="checkbox"> <font size="2" face="verdana">41</font> </td> <td width="12%"> </td> <td width="13%"> </td> <td width="13%"> </td> <td width="20%"> </td> </tr> </tbody></table> <p align="center"> </p> <p></p><table> <tbody><tr> <td> <div align="center"><input type="submit" name="submit" value="submit"> </div></td> </tr> </tbody></table> <br> </form></td> </tr> </tbody></table></div>
  2. every thing is fine now coding looks perfect still the same error on line 103 line 103:- param name="movie" value="images/nav_bar2.swf"/> <CODE><?php if(isset($_POST['submit'])) { $a = $_POST['from']; $b = $_POST['to']; $c = $_POST['couch']; $d = $_POST['550']; mysql_connect("localhost", "root", "autodeskmaya") or die ('Error'.mysqlerror()); mysql_select_db("online_bus_project"); $query="INSERT INTO trip (from,to,coach_type,fare) values ('$a','$b','$c')"; mysql_query($query) or die ('Error Cannnot Insert Records!'); } ?> <!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <link href="obrs.css" rel="stylesheet" type="text/css" /> <!--[if IE 5]> <style type="text/css"> /* place css box model fixes for IE 5* in this conditional comment */ .twoColFixRtHdr #sidebar1 { width: 220px; } </style> <![endif]--><!--[if IE]> <style type="text/css"> /* place css fixes for all versions of IE in this conditional comment */ .twoColFixRtHdr #sidebar1 { padding-top: 30px; } .twoColFixRtHdr #mainContent { zoom: 1; } /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */ </style> <![endif]--> <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script> <style type="text/css"> <!-- .style1 { color: #FFFF00; font-weight: bold; } .style2 { color: #FFFF66; font-weight: bold; } #apDiv1 { position:absolute; left:35px; top:168px; width:621px; height:362px; z-index:1; } --> </style> </head> <body class="twoColFixRtHdr"> <div id="container"> <div id="header"> <!-- end #header --> <img src="images/header" alt="OBTRS: Header" /></div> <div id="sidebar1"> <!-- end #sidebar1 --> <img src="images/sidebar_slideshow" alt="" /> <div id="blogarea"> <p class="style2">Casual Dining Restaurants</p> <p><br /> Our family-style restaurants are the favorite of thousands of tourists and professional drivers alike. Our clean and friendly surroundings encourage people to stop and enjoy a wholesome meal with us when they travel. Our customers recognize our strong teamwork ethic as we provide them quality service.</p> <p><br /> <span class="style1">Convenience Stores</span></p> <p><br /> Our cashiers take pride in having the items on the shelf ready for our travelers when they stop. We know many are in a hurry and we need to be "fast" to meet their busy schedules. Some of our returning customers enjoy fresh coffee and we have it ready for them. The joint effort of our managers and associates creates a strong "team spirit" that provides the customers what they are looking for as they travel.</p> </div> </div> <div id="mainContent"> <div id="nav"> <script type="text/javascript"> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','760','height','30','src','images/nav_bar2','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','images/nav_bar2' ); //end AC code </script> <noscript> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="760" height="30"> <param name="movie" value="images/nav_bar2.swf"/> <param name="quality" value="high" /> <embed src="images/nav_bar2.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="760" height="30"></embed> </object> </noscript> </div> <div id="status"><form name="status" method="post" action="bookinginfo.php"> <br> <br> <br> <table class="note" width="90%" align="center" border="0" cellpadding="2" cellspacing="2"> <tbody><tr> <td colspan="4" class="header" width="100%" align="center"><font size="4" color="royalblue" face="Verdana, Arial, Helvetica, sans-serif"><b class="heading"><span class="header"><font color="#336699">Welcome To Online B<span class="heading"><span class="heading">us Reservation</span></span></font></span><br> </b><font size="2" color="#ff0000">Please Select your date of departure and destination to proceed ahead with the booking.</font><font size="2" color="#000000"> </font></font></td> </tr> <tr> <td colspan="4" width="100%"> </td> </tr> <tr> <td font="" face="Verdana, Arial, Helvetica, sans-serif" size="2" width="25%" align="left" height="30"> <center> <br /><center> <strong>From:</strong> <select id="from"> <option value = "from1">Karachi</option> <option value = "from2">Sukkur</option> </select> <center><br /> <strong>To:</strong> <select id="to"></center> <option value = "to1">Sukkur</option> <option value = "to2">Karachi</option> </select> <center><br /><strong>Couch: </strong> <select id="couch"></center> <option value = "couch1">NonAC</option> <option value = "couch2">AC</option> </select> </select> <!-- <tr> <td width="100%" colspan=4> </td> </tr> --> <tr> <td colspan="4" width="100%"><hr width="95%" align="left" noshade="noshade"></td> </tr> <tr> <td colspan="4" width="100%" align="center"> <input type="submit" value="Submit" name="submit"> </form> </td> </tr> <tr> <td colspan="4" align="center"> </td> </tr> <!-- <tr> <td width="100%" align="center" colspan="4"> <div align="left" class="note"> <hr noshade width="95%" align="left"> <font face="Verdana, Arial, Helvetica, sans-serif" size="2"><font color="#000000"><br> Note :</font></font> <span class="note">Please fill in your departure and destination stations, number of seats required and the prefered date of your journey in this page and click on "Check Status" </span></div> </td> </tr> --> </tbody></table> </form></td> </tr> </tbody></table></div> <div id="features"></div> <!-- end #mainContent --> </div> <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --> <br class="clearfloat" /> <div id="footer"> <p><a href="aboutus.html">About us</a> |<a href="feedback.html"> Feedback</a> |<a href="faqs.html"> FAQs</a> | <a href="terms.html">Terms & Conditions</a> | <a href="contactus.html">Contact us</a></p> <p> 2009 Copyright - Shah Abdul Latif University Khairpur</p> <!-- end #footer --> </div> <!-- end #container --> </div> </body> </html>
  3. i have worked on this now tell me how to bypass this its giving error on 103 line which has a swf navigation. i have changed some stuffs i have made 3 combobox one is from other is to and the 3rd is Couch now tell me how can i insert the 3 values of 3 comboboxes to database my database name is online_bus_project table name is trip here is the code i have made some changes check it <?php if(isset($_POST['submit'])) { $a = $_POST['from']; $b = $_POST['Sukkur']; $c = $_POST['ac']; $d = $_POST['nonac']; $e = $_POST['550']; mysql_connect("localhost", "root", "password") or die ('Error'.mysqlerror()); mysql_select_db("online_bus_project"); $query="INSERT INTO trip (from,to,coach_type,fare) values ('$a','$b','$c','$e')"; mysql_query($query) or die ('Error Cannnot Insert Records!'); } ?> <!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <link href="obrs.css" rel="stylesheet" type="text/css" /> <!--[if IE 5]> <style type="text/css"> /* place css box model fixes for IE 5* in this conditional comment */ .twoColFixRtHdr #sidebar1 { width: 220px; } </style> <![endif]--><!--[if IE]> <style type="text/css"> /* place css fixes for all versions of IE in this conditional comment */ .twoColFixRtHdr #sidebar1 { padding-top: 30px; } .twoColFixRtHdr #mainContent { zoom: 1; } /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */ </style> <![endif]--> <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script> <style type="text/css"> <!-- .style1 { color: #FFFF00; font-weight: bold; } .style2 { color: #FFFF66; font-weight: bold; } #apDiv1 { position:absolute; left:35px; top:168px; width:621px; height:362px; z-index:1; } --> </style> </head> <body class="twoColFixRtHdr"> <div id="container"> <div id="header"> <!-- end #header --> <img src="images/header" alt="OBTRS: Header" /></div> <div id="sidebar1"> <!-- end #sidebar1 --> <img src="images/sidebar_slideshow" alt="" /> <div id="blogarea"> <p class="style2">Casual Dining Restaurants</p> <p><br /> Our family-style restaurants are the favorite of thousands of tourists and professional drivers alike. Our clean and friendly surroundings encourage people to stop and enjoy a wholesome meal with us when they travel. Our customers recognize our strong teamwork ethic as we provide them quality service.</p> <p><br /> <span class="style1">Convenience Stores</span></p> <p><br /> Our cashiers take pride in having the items on the shelf ready for our travelers when they stop. We know many are in a hurry and we need to be "fast" to meet their busy schedules. Some of our returning customers enjoy fresh coffee and we have it ready for them. The joint effort of our managers and associates creates a strong "team spirit" that provides the customers what they are looking for as they travel.</p> </div> </div> <div id="mainContent"> <div id="nav"> <script type="text/javascript"> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','760','height','30','src','images/nav_bar2','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','images/nav_bar2' ); //end AC code </script> <noscript> This line is 103 <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="760" height="30"> <param name="movie" value="images/nav_bar2.swf" /> <param name="quality" value="high" /> <embed src="images/nav_bar2.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="760" height="30"></embed> </object> </noscript> </div> <div id="status"><form name="status" method="post" action="bookinginfo.php"> <br> <br> <br> <table class="note" width="90%" align="center" border="0" cellpadding="2" cellspacing="2"> <tbody><tr> <td colspan="4" class="header" width="100%" align="center"><font size="4" color="royalblue" face="Verdana, Arial, Helvetica, sans-serif"><b class="heading"><span class="header"><font color="#336699">Welcome To Online B<span class="heading"><span class="heading">us Reservation</span></span></font></span><br> </b><font size="2" color="#ff0000">Please Select your date of departure and destination to proceed ahead with the booking.</font><font size="2" color="#000000"> </font></font></td> </tr> <tr> <td colspan="4" width="100%"> </td> </tr> <tr> <td font="" face="Verdana, Arial, Helvetica, sans-serif" size="2" width="25%" align="left" height="30"> <center> <br /><center> <strong>From:</strong> <select id="from"> <option value = "from1">Karachi</option> <option value = "from2">Sukkur</option> </select> <center><br /> <strong>To:</strong> <select id="to"></center> <option value = "to1">Sukkur</option> <option value = "to2">Karachi</option> </select> <center><br /><strong>Couch: </strong> <select id="couch"></center> <option value = "couch1">NonAC</option> <option value = "couch2">AC</option> </select> </select> <!-- <tr> <td width="100%" colspan=4> </td> </tr> --> <tr> <td colspan="4" width="100%"><hr width="95%" align="left" noshade="noshade"></td> </tr> <tr> <td colspan="4" width="100%" align="center"> <input type="submit" value="Submit" name="submit"> </form> </td> </tr> <tr> <td colspan="4" align="center"> </td> </tr> <!-- <tr> <td width="100%" align="center" colspan="4"> <div align="left" class="note"> <hr noshade width="95%" align="left"> <font face="Verdana, Arial, Helvetica, sans-serif" size="2"><font color="#000000"><br> Note :</font></font> <span class="note">Please fill in your departure and destination stations, number of seats required and the prefered date of your journey in this page and click on "Check Status" </span></div> </td> </tr> --> </tbody></table> </form></td> </tr> </tbody></table></div> <div id="features"></div> <!-- end #mainContent --> </div> <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --> <br class="clearfloat" /> <div id="footer"> <p><a href="aboutus.html">About us</a> |<a href="feedback.html"> Feedback</a> |<a href="faqs.html"> FAQs</a> | <a href="terms.html">Terms & Conditions</a> | <a href="contactus.html">Contact us</a></p> <p> 2009 Copyright - Shah Abdul Latif University Khairpur</p> <!-- end #footer --> </div> <!-- end #container --> </div> </body> </html>
  4. thanx JD for the help man u rock. can u please write the code because im new in programming. ill appreciate
  5. some more------ <?php // Connect to the database mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("trip") or die(mysql_error()); // Has the form been submitted? if (isset($_POST['item'])) { // The form has been submitted, query results $queryitem = "SELECT * FROM table WHERE item = '".$_POST['item']."';"; // Successful query? if($result = mysql_query($queryitem)) { // More than 0 results returned? if($success = mysql_num_rows($result) > 0) { // For each result returned, display it while ($row = mysql_fetch_array($result)) echo $row[serial]; } // Otherwise, no results, tell user else { echo "No results found."; } } // Error connecting? Tell user else { echo "Failed to connect to database."; } } // The form has NOT been submitted, so show the form instead of results else { // Create the form, post to the same file echo "<form method='post' action='example.php'>"; // Form a query to populate the combo-box $queryitem = "SELECT DISTINCT item FROM table;"; // Successful query? if($result = mysql_query($queryitem)) { // If there are results returned, prepare combo-box if($success = mysql_num_rows($result) > 0) { // Start combo-box echo "<select name='item'>\n"; echo "<option>-- Select Item --</option>\n"; // For each item in the results... while ($row = mysql_fetch_array($result)) // Add a new option to the combo-box echo "<option value='$row[item]'>$row[item]</option>\n"; // End the combo-box echo "</select>\n"; } // No results found in the database else { echo "No results found."; } } // Error in the database else { echo "Failed to connect to database."; } // Add a submit button to the form echo "<input type='submit' value='Submit' /></form>"; } ?>
  6. is it going to work or i have to do some thing else? help me out can u plz generate ur own code to help me out.
  7. have some but i dont understand how to use it havent worked with combobox that's why. <?php // Connect to the db server and select a database $conn = mysql_connect("localhost", "root", "") or die("Can't connect to database!"); mysql_select_db("online_bus_project") or die("Can't select database!"); // Retrieve the language table data $query = "SELECT id,from FROM trip ORDER BY name"; $result = mysql_query($query) // Create an associative array based on the table data while($row = mysql_fetch_array($result)) { $value = $row["id"]; $name = $row["from"]; $pairs["$value"] = $name; } echo "Choose your preferred language: <br />"; echo create_dropdown("language",$pairs,"Choose One:"); function create_dropdown($identifier,$pairs,$firstentry,$multiple="") { // Start the dropdown list with the <select> element and title $dropdown = "<select name=\"$identifier\" multiple=\"$multiple\">"; $dropdown .= "<option name=\"\">$firstentry</option>"; // Create the dropdown elements foreach($pairs AS $value => $name) { $dropdown .= "<option name=\"$value\">$name</option>"; } // Conclude the dropdown and return it echo "</select>"; return $dropdown; } ?>
  8. i have a combo box available in my page and that combobox have these items. And a text field for the journey date: and i have trip named database which have these fields. id which will autocrement from to coach_type fare journey_date seat now i want this to be happen if a user come and take any item from combobox it will inserts that that info to these fealds not in the seats cuz seat is on the other page. for example if a user selects 1st item which is Sukkur-Karachi-(NonAC) then it will insert this data in the field. in from it insert sukkur in to it insers karachi in couchtype it insert nonac infare it insert 550 after that i have a field whihc is journey date that is timestamp now i want a calender to be attach to this if user selects date that insers in the journey_date field. please help me out on this. <!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <link href="obrs.css" rel="stylesheet" type="text/css" /> <!--[if IE 5]> <style type="text/css"> /* place css box model fixes for IE 5* in this conditional comment */ .twoColFixRtHdr #sidebar1 { width: 220px; } </style> <![endif]--><!--[if IE]> <style type="text/css"> /* place css fixes for all versions of IE in this conditional comment */ .twoColFixRtHdr #sidebar1 { padding-top: 30px; } .twoColFixRtHdr #mainContent { zoom: 1; } /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */ </style> <![endif]--> <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script> <style type="text/css"> <!-- .style1 { color: #FFFF00; font-weight: bold; } .style2 { color: #FFFF66; font-weight: bold; } .style5 {color: #0066FF; font-weight: bold; } .style6 { color: #0066FF; font-weight: bold; font-size: 24px; } .style7 {font-size: 12px} #apDiv1 { position:absolute; left:35px; top:168px; width:621px; height:362px; z-index:1; } --> </style> </head> <body class="twoColFixRtHdr"> <div id="container"> <div id="header"> <!-- end #header --> <img src="images/header" alt="OBTRS: Header" /></div> <div id="sidebar1"> <!-- end #sidebar1 --> <img src="images/sidebar_slideshow" alt="" /> <div id="blogarea"> <p class="style2">Casual Dining Restaurants</p> <p><br /> Our family-style restaurants are the favorite of thousands of tourists and professional drivers alike. Our clean and friendly surroundings encourage people to stop and enjoy a wholesome meal with us when they travel. Our customers recognize our strong teamwork ethic as we provide them quality service.</p> <p><br /> <span class="style1">Convenience Stores</span></p> <p><br /> Our cashiers take pride in having the items on the shelf ready for our travelers when they stop. We know many are in a hurry and we need to be "fast" to meet their busy schedules. Some of our returning customers enjoy fresh coffee and we have it ready for them. The joint effort of our managers and associates creates a strong "team spirit" that provides the customers what they are looking for as they travel.</p> </div> </div> <div id="mainContent"> <div id="nav"> <script type="text/javascript"> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','760','height','30','src','images/nav_bar2','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','images/nav_bar2' ); //end AC code </script> <noscript> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="760" height="30"> <param name="movie" value="images/nav_bar2.swf" /> <param name="quality" value="high" /> <embed src="images/nav_bar2.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="760" height="30"></embed> </object> </noscript> </div> <div id="status"><form name="status" method="post" action="bookinginfo.php"> <br> <br> <br> <table class="note" width="90%" align="center" border="0" cellpadding="2" cellspacing="2"> <tbody><tr> <td colspan="4" class="header" width="100%" align="center"><font size="4" color="royalblue" face="Verdana, Arial, Helvetica, sans-serif"><b class="heading"><span class="header"><font color="#336699">Welcome To Online B<span class="heading"><span class="heading">us Reservation</span></span></font></span><br> </b><font size="2" color="#ff0000">Please Select your date of departure and destination to proceed ahead with the booking.</font><font size="2" color="#000000"> </font></font></td> </tr> <tr> <td colspan="4" width="100%"> </td> </tr> <tr> <td font="" face="Verdana, Arial, Helvetica, sans-serif" color="maroon" size="2" width="25%" align="right" height="30">Journey :</td> <td font="" face="Verdana, Arial, Helvetica, sans-serif" size="2" width="25%" align="left" height="30"> <select name="serviceNo" style="font-size: 8pt;"> <!-- <option selected>Select Journey From</option> --> <option style="" value="29">Sukkur-Karachi-(NonAC)</option> <option style="" value="34">Karachi-Sukkur-(NonAC)</option> <option style="color: darkblue;" value="37">Sukkur-Karachi-(AC)</option> <option style="" value="39">Karachi-Sukkur-(AC)</option> <option style="" value="40">Karachi-Islamabad-(Volvo)</option> </select></td><td font="" face="Verdana, Arial, Helvetica, sans-serif" color="maroon" size="2" width="25%" align="left" height="30"> </td></tr><tr> <td valign="top" align="right">Journey Date:</td> <td nowrap="nowrap"><input name="date" class="text_box" value="" size="20"> <td class="table_text" align="left"> </td> </tr> <!-- <tr> <td width="100%" colspan=4> </td> </tr> --> <tr> <td colspan="4" width="100%"><hr width="95%" align="left" noshade="noshade"></td> </tr> <tr> <td colspan="4" width="100%" align="center"> <input type="submit" name="submit" value="submit" > </td> </tr> <tr> <td colspan="4" align="center"> </td> </tr> <!-- <tr> <td width="100%" align="center" colspan="4"> <div align="left" class="note"> <hr noshade width="95%" align="left"> <font face="Verdana, Arial, Helvetica, sans-serif" size="2"><font color="#000000"><br> Note :</font></font> <span class="note">Please fill in your departure and destination stations, number of seats required and the prefered date of your journey in this page and click on "Check Status" </span></div> </td> </tr> --> </tbody></table> </form></td> </tr> </tbody></table></div> <div id="features"></div> <!-- end #mainContent --> </div> <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --> <br class="clearfloat" /> <div id="footer"> <p><a href="aboutus.html">About us</a> |<a href="feedback.html"> Feedback</a> |<a href="faqs.html"> FAQs</a> | <a href="terms.html">Terms & Conditions</a> | <a href="contactus.html">Contact us</a></p> <p> 2009 Copyright - Shah Abdul Latif University Khairpur</p> <!-- end #footer --> </div> <!-- end #container --> </div> </body> </html>
  9. Topic Solved: every thing done thanx guys thanx for the help all i really appreciate Thanx to wildteen88 , mattal999 , premiso , Prismatic , PFMaBiSmAd
  10. done every thing thanx guys it says: Not Found The requested URL /site/<br /><b>Notice</b>: Undefined variable: _server in <b>C:\wamp\www\site\ticketregistration.php</b> on line <b>103</b><br /> was not found on this server. <?php require($_SERVER["DOCUMENT_ROOT"] ."site/config/db_config.php"); $connection = mysql_connect("$host","$user","$pass") or die("error connect"); mysql_select_db("$db_name"); if(isset($_POST['submit'])) { $first_name = $_POST["fname"]; $len = strlen($first_name); if ($len >0) { $last_name = $_POST["lastname"]; $email_address = $_POST["email"]; $address = $_POST["address"]; $city = $_POST["city"]; $province = $_POST["province"]; $contact_no = $_POST["contactno"]; } $query = "INSERT INTO user_information (first_name, last_name, email_address, address, city, province, contact_no) VALUES('$first_name', '$last_name', '$email_address', '$address', '$city', '$province', '$contact_no')"; mysql_query($query, $connection) or die(mysql_error()); } ?> <!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <link href="obrs.css" rel="stylesheet" type="text/css" /> <!--[if IE 5]> <style type="text/css"> /* place css box model fixes for IE 5* in this conditional comment */ .twoColFixRtHdr #sidebar1 { width: 220px; } </style> <![endif]--><!--[if IE]> <style type="text/css"> /* place css fixes for all versions of IE in this conditional comment */ .twoColFixRtHdr #sidebar1 { padding-top: 30px; } .twoColFixRtHdr #mainContent { zoom: 1; } /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */ </style> <![endif]--> <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script> <style type="text/css"> <!-- .style1 { color: #FFFF00; font-weight: bold; } .style2 { color: #FFFF66; font-weight: bold; } .style8 { color: #0066FF; font-weight: bold; } --> </style> </head> <body class="twoColFixRtHdr"> <div id="container"> <div id="header"> <!-- end #header --> <img src="images/header" alt="OBTRS: Header" /></div> <div id="sidebar1"> <!-- end #sidebar1 --> <img src="images/sidebar_slideshow" alt="" /> <div id="blogarea"> <p class="style2">Casual Dining Restaurants</p> <p><br> Our family-style restaurants are the favorite of thousands of tourists and professional drivers alike. Our clean and friendly surroundings encourage people to stop and enjoy a wholesome meal with us when they travel. Our customers recognize our strong teamwork ethic as we provide them quality service.</p> <p><br> <span class="style1">Convenience Stores</span></p> <p><br> Our cashiers take pride in having the items on the shelf ready for our travelers when they stop. We know many are in a hurry and we need to be "fast" to meet their busy schedules. Some of our returning customers enjoy fresh coffee and we have it ready for them. The joint effort of our managers and associates creates a strong "team spirit" that provides the customers what they are looking for as they travel.</p> </div> </div> <div id="mainContent"> <div id="nav"> <script type="text/javascript"> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','760','height','30','src','images/nav_bar2','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','images/nav_bar2' ); //end AC code </script> <noscript> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="760" height="30"> <param name="movie" value="images/nav_bar2.swf" /> <param name="quality" value="high" /> <embed src="images/nav_bar2.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="760" height="30"></embed> </object> </noscript> </div> <div id="features"></div> <div class="style8" id="writeinfo">Please Fill your Personal Information below</div> <div id="forminfo"><form action="<?php echo $_server['PHP_SELF']; ?>" method="POST"> First Name: <INPUT type="text" name=fname style="HEIGHT: 19px; WIDTH: 174px" size="20" align="center"> <br> <br> Last Name: <INPUT type="text" name=lastname style="HEIGHT: 19px; WIDTH: 174px" size="20" align="center"> <br> <br> Email Address: <INPUT type="text" name=email style="HEIGHT: 19px; WIDTH: 174px" size="20" align="center"> <br> <br> Address: <INPUT type="text" name=address style="HEIGHT: 19px; WIDTH: 174px" size="20" align="center"> <br> <br> City: <INPUT type="text" name=city style="HEIGHT: 19px; WIDTH: 174px" size="20" align="center"> <br> <br> Province: <INPUT type="text" name=province style="HEIGHT: 19px; WIDTH: 174px" size="20" align="center"> <br> <br> Contact No: <INPUT type="text" name=contactno style="HEIGHT: 19px; WIDTH: 174px" size="20" align="center"> <br> <br> <br> <input type="submit" name="submit" value="submit" /> </form> </div> <!-- end #mainContent --> </div> <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --> <br class="clearfloat" /> <div id="footer"> <p><a href="aboutus.html">About us</a> |<a href="feedback.html"> Feedback</a> |<a href="faqs.html"> FAQs</a> | <a href="terms.html">Terms & Conditions</a> | <a href="contactus.html">Contact us</a></p> <p> 2009 Copyright - Shah Abdul Latif University Khairpur</p> <!-- end #footer --> </div> <!-- end #container --> </div> </body> </html>
  11. every thing solved just the last thing then im goin to close thread: when ever i press submit button nothing is happening why? <?php require($_SERVER["DOCUMENT_ROOT"] ."site/config/db_config.php"); $connection = mysql_connect("$host","$user","$pass") or die("error connect"); mysql_select_db("$db_name"); if(isset($_POST['submit'])) { $first_name = $_POST["fname"]; $len = strlen($first_name); if ($len >0) { $last_name = $_POST["lastname"]; $email_address = $_POST["email"]; $address = $_POST["address"]; $city = $_POST["city"]; $province = $_POST["province"]; $contact_no = $_POST["contactno"]; } $query = "INSERT INTO user_information (first_name, last_name, email_address, address, city, province, contact_no) VALUES('$first_name', '$last_name', '$email_address', '$address', '$city', '$province', '$contact_no')"; mysql_query($query, $connection) or die(mysql_error()); } ?> <!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <link href="obrs.css" rel="stylesheet" type="text/css" /> <!--[if IE 5]> <style type="text/css"> /* place css box model fixes for IE 5* in this conditional comment */ .twoColFixRtHdr #sidebar1 { width: 220px; } </style> <![endif]--><!--[if IE]> <style type="text/css"> /* place css fixes for all versions of IE in this conditional comment */ .twoColFixRtHdr #sidebar1 { padding-top: 30px; } .twoColFixRtHdr #mainContent { zoom: 1; } /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */ </style> <![endif]--> <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script> <style type="text/css"> <!-- .style1 { color: #FFFF00; font-weight: bold; } .style2 { color: #FFFF66; font-weight: bold; } .style8 { color: #0066FF; font-weight: bold; } --> </style> </head> <body class="twoColFixRtHdr"> <div id="container"> <div id="header"> <!-- end #header --> <img src="images/header" alt="OBTRS: Header" /></div> <div id="sidebar1"> <!-- end #sidebar1 --> <img src="images/sidebar_slideshow" alt="" /> <div id="blogarea"> <p class="style2">Casual Dining Restaurants</p> <p><br /> Our family-style restaurants are the favorite of thousands of tourists and professional drivers alike. Our clean and friendly surroundings encourage people to stop and enjoy a wholesome meal with us when they travel. Our customers recognize our strong teamwork ethic as we provide them quality service.</p> <p><br /> <span class="style1">Convenience Stores</span></p> <p><br /> Our cashiers take pride in having the items on the shelf ready for our travelers when they stop. We know many are in a hurry and we need to be "fast" to meet their busy schedules. Some of our returning customers enjoy fresh coffee and we have it ready for them. The joint effort of our managers and associates creates a strong "team spirit" that provides the customers what they are looking for as they travel.</p> </div> </div> <div id="mainContent"> <div id="nav"> <script type="text/javascript"> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','760','height','30','src','images/nav_bar2','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','images/nav_bar2' ); //end AC code </script> <noscript> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="760" height="30"> <param name="movie" value="images/nav_bar2.swf" /> <param name="quality" value="high" /> <embed src="images/nav_bar2.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="760" height="30"></embed> </object> </noscript> </div> <div id="features"></div> <div class="style8" id="writeinfo">Please Fill your Personal Information below</div> <div id="forminfo"><frorm action="<?php echo $_server[php_SELF]; ?>" method="POST"> First Name: <INPUT type="text" name=fname style="HEIGHT: 19px; WIDTH: 174px" size="20" align="center"> <br/> <br/> Last Name: <INPUT type="text" name=lastname style="HEIGHT: 19px; WIDTH: 174px" size="20" align="center"> <br /> <br/> Email Address: <INPUT type="text" name=email style="HEIGHT: 19px; WIDTH: 174px" size="20" align="center"> <br /> <br/> Address: <INPUT type="text" name=address style="HEIGHT: 19px; WIDTH: 174px" size="20" align="center"> <br /> <br/> City: <INPUT type="text" name=city style="HEIGHT: 19px; WIDTH: 174px" size="20" align="center"> <br /> <br/> Province: <INPUT type="text" name=province style="HEIGHT: 19px; WIDTH: 174px" size="20" align="center"> <br /> <br/> Contact No: <INPUT type="text" name=contactno style="HEIGHT: 19px; WIDTH: 174px" size="20" align="center"> <br /> <br /> <br/> <input type="submit" value="submit" /> </form> </div> <!-- end #mainContent --> </div> <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --> <br class="clearfloat" /> <div id="footer"> <p><a href="aboutus.html">About us</a> |<a href="feedback.html"> Feedback</a> |<a href="faqs.html"> FAQs</a> | <a href="terms.html">Terms & Conditions</a> | <a href="contactus.html">Contact us</a></p> <p> 2009 Copyright - Shah Abdul Latif University Khairpur</p> <!-- end #footer --> </div> <!-- end #container --> </div> </body> </html>
  12. cmon guys this one is i think last? plz help and also when ever im refreshing page contact_no add 0 in it why?
  13. thanx solved. now error int the line 19 all the database table contents error: Notice: Undefined variable: first_name in C:\wamp\www\site\ticketregistration.php on line 19 $query = "INSERT INTO user_information (first_name, last_name, email_address, address, city, province, contact_no) VALUES('$first_name', '$last_name', '$email_address', '$address', '$city', '$province', '$contact_no')"; mysql_query($query, $connection) or die(mysql_error()); why error on the user_information my table field contains these all names
  14. thanx man and thanx to all who helped appreciate. now it say:From line 6 to 12 check the picture and tell me? Notice: Undefined index: txt_fname in C:\wamp\www\site\ticketregistration.php on line 6
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.