Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. Can you post the db.php? There's probably a class in there you have to use.
  2. You know what's even funnier, the comments people left. Check out this one: I think this guy is actually being serious... scary
  3. edwardcox, I posted in the duplicate topic you started in MySQL Help. Depending on how big the DB is, which you don't know because it's gone, creating it manually with logic may be faster than creating a custom tool. It may get very messy and frustrating.
  4. Please don't post the same thing in 2 different sections, that could really waste someone's time. The only thing you may be able to rebuild is the structure. To my knowledge there is no tool to do this. The only thing I could suggest would be to logically put the table back together. Go through the sql statements, fields, etc... *** But, this would is very unsafe, and used only as a last resort. Maybe someone else has a solution, good luck.
  5. thx zero @ragrim, could you mark as solved please, thanks!
  6. Surprised you got any results at all... Try: $sql = mysql_query("SELECT * FROM customers WHERE id = '$id' "); $sql_res = mysql_query($sql); //execute query while($row = mysql_fetch_array($ql_res)) { $firstname=$row['firstname']; $lastname=$row['lastname']; $address=$row['address']; $suburb=$row['suburb']; $postcode=$row['postcode']; $phone1=$row['phone1']; $phone2=$row['phone2']; $email1=$row['email1']; $email2=$row['email2']; $billingemail=$row['billingemail']; }
  7. PHPFreaks! They have really good tutorials on specific subjects. Some may be a little advanced but very good to learn from. Here are some more: W3Schools - The standard although, not particularly my favorite. Tizag - Great site for the basics, I refer to it all the time.
  8. Are you using URLencode /decode?
  9. I really am not sure but I didn't some research and this article/blog came up. ModWest 403 Seems like it could be an Apache config or .htaccess problem...
  10. First post I noticed that you're using an operator to compare the $admin variable. You have: if ($admin = '2'); and needs to be if ($admin == 2) { There are a couple other basic mistakes... Anyway, you need to have a session that stores the user's ID. That way when you can check if they're admin on any page. Is uMemberGroup a field in your database?
  11. -Need more topics. Check out other webmaster sites for ideas. -Write descriptions underneath the forum titles. -I DO like the color scheme. What else do you want us to critique? This is just a phpBB forum with a theme added to it.
  12. It's definitely sarcasm... If not, actually, I don't know what I'd do. >
  13. This is my last attempt. I don't see why it's working in my test and not in your script. Maybe someone else can see the problem... ini_set ("display_errors", "1"); error_reporting(E_ALL); $error = FALSE; //database information $host = "stocks"; // Host name $username = "wbennett"; // Mysql username $password = "mysql5"; // Mysql password $db_name = "wbennett"; // Database name $tbl_name1 = "flight_webair"; mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); // Variables $flight_route_out = $_POST['flight_route_out']; $flight_route_return = $_POST['flight_route_return']; $date_out = $_POST['departure_date']; $date_return = $_POST['return_date']; $passenger_num = $_POST['num_of_pass']; $one_way = (isset($_POST['one_way'])) ? $_POST['one_way'] : null; // make sure value is available first. if (strtotime($_POST['return_date']) $output = "You cannot book a return flight before your out-going flight!"; $error = TRUE; } //To protect MySQL injection $flight_route_out = stripslashes($flight_route_out); $flight_route_return = stripslashes($flight_route_return); $flight_route_out = mysql_real_escape_string($flight_route_out); $flight_route_return = mysql_real_escape_string($flight_route_return); //Queries $sql1="SELECT * FROM `$tbl_name1` WHERE `flight_route` = '$flight_route_out'"; //$sql="SELECT * FROM $tbl_name1 WHERE flight_route_return='$flight_route_return'"; //Execute query 1 $result = mysql_query($sql1) or die(mysql_error()); if(mysql_num_rows($result) > 0){ ?> http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> rel="stylesheet" href="dropdown2.css" type="text/css" /> type="text/javascript" src="dropdown.js"> type="text/javascript" src="calendar.js"> type="text/javascript" src="enablefield.js"> Booking Confirmation type="text/javascript"> function greyText(one_way, return_date) { if (document.form1[one_way].checked) { document.form1[return_date].disabled=true; document.form1[return_flight].disabled=true; } else { document.form1[return_date].disabled=false; document.form1[return_flight].disabled=false; } } Webair Contact Us src="Webair--logo.gif" height= "65" width="240" align="top" /> background="Banner--background.gif" height="60" align="right" width="817" > class="hyperlink" href="http://www.cems.uwe.ac.uk/~wbennett/webair/main_logon.php"> Staff login | class="hyperlink" href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html" > Home | class="hyperlink" href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html" > Booked Flights &nbsp class="dropdown" > id="one-ddheader" onmouseover="ddMenu('one',1)" onmouseout="ddMenu('one',-1)" > Home id="one-ddcontent" onmouseover="cancelHide('one')" onmouseout="ddMenu('one',-1)" > href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html" class="underline" > Home class="dropdown" > id="two-ddheader" onmouseover="ddMenu('two',1)" onmouseout="ddMenu('two',-1)" > Contact us id="two-ddcontent" onmouseover="cancelHide('two')" onmouseout="ddMenu('two',-1)" > href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_contact" class="underline" > Contact us class="dropdown" > id="three-ddheader" onmouseover="ddMenu('three',1)" onmouseout="ddMenu('three',-1)" > Flights id="three-ddcontent" onmouseover="cancelHide('three')" onmouseout="ddMenu('three',-1)" > href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_refunds.html" class="underline" > Refund Policy class="dropdown" > id="four-ddheader" onmouseover="ddMenu('four',1)" onmouseout="ddMenu('four',-1)" > Travel Information id="four-ddcontent" onmouseover="cancelHide('four')" onmouseout="ddMenu('four',-1)" > href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_flight_fares.html" class="underline" > Flight Timetable href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_baggage.html" class="underline" > Baggage Information href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_airport_info.html" class="underline" > Airport information href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_travel_info.html" class="underline" > Travel documentation requirements class="dropdown" > id="five-ddheader" onmouseover="ddMenu('five',1)" onmouseout="ddMenu('five',-1)" > About Webair id="five-ddcontent" onmouseover="cancelHide('five')" onmouseout="ddMenu('five',-1)" > href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_about.html" class="underline" > About Webair href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_contact.html" class="underline" > Contact us style="clear:both" /> id="content" > id="table_gen_1" > class="inner" > //THERE IS AN ERROR display error message if($error == TRUE) { echo '' . $output . ''; } else { ?> Confirm Booking Out-going Flight Information: while($row = mysql_fetch_array($result)){ echo " </pre> <table border="'1'" cellpadding="10"> Flight Number Flight Route Selected Departure Time Arrival Time Departure Date Return Date Number of Passengers Selected ".$row['flight_num']." ".$row['flight_route']." ".$row['departure_time']." ".$row['arrival_time']." ".$date_out." ".$date_return." ".$passenger_num['num_of_pass']." </table> <br><br> <br><br>"; <br>} <br>}<br>?><br><br><br><br><br><div id="footer"> Staff login | Home | Contact us | About Webair </div> <br> <br> <br> <br> <br> }else{<br> <br> echo 'Sorry, couldn\'t find any flights';<br> <br> } <br> <br>mysql_free_result($result); <br
  14. Weird, I just tried this example and it works fine. $error = FALSE; if (1 { $output = "You cannot book a return flight before your out-going flight!"; $error = TRUE; } ?> { echo '' . $output . ''; } else { ?> ELSE?
  15. One more time! ini_set ("display_errors", "1"); error_reporting(E_ALL); $error = FALSE; //database information $host = "stocks"; // Host name $username = "wbennett"; // Mysql username $password = "mysql5"; // Mysql password $db_name = "wbennett"; // Database name $tbl_name1 = "flight_webair"; mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); // Variables $flight_route_out = $_POST['flight_route_out']; $flight_route_return = $_POST['flight_route_return']; $date_out = $_POST['departure_date']; $date_return = $_POST['return_date']; $passenger_num = $_POST['num_of_pass']; $one_way = (isset($_POST['one_way'])) ? $_POST['one_way'] : null; // make sure value is available first. if (strtotime($_POST['return_date']) $output = "You cannot book a return flight before your out-going flight!"; $error = TRUE; } //To protect MySQL injection $flight_route_out = stripslashes($flight_route_out); $flight_route_return = stripslashes($flight_route_return); $flight_route_out = mysql_real_escape_string($flight_route_out); $flight_route_return = mysql_real_escape_string($flight_route_return); //Queries $sql1="SELECT * FROM `$tbl_name1` WHERE `flight_route` = '$flight_route_out'"; //$sql="SELECT * FROM $tbl_name1 WHERE flight_route_return='$flight_route_return'"; //Execute query 1 $result = mysql_query($sql1) or die(mysql_error()); if(mysql_num_rows($result) > 0){ ?> http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> rel="stylesheet" href="dropdown2.css" type="text/css" /> type="text/javascript" src="dropdown.js"> type="text/javascript" src="calendar.js"> type="text/javascript" src="enablefield.js"> Booking Confirmation type="text/javascript"> function greyText(one_way, return_date) { if (document.form1[one_way].checked) { document.form1[return_date].disabled=true; document.form1[return_flight].disabled=true; } else { document.form1[return_date].disabled=false; document.form1[return_flight].disabled=false; } } Webair Contact Us src="Webair--logo.gif" height= "65" width="240" align="top" /> background="Banner--background.gif" height="60" align="right" width="817" > class="hyperlink" href="http://www.cems.uwe.ac.uk/~wbennett/webair/main_logon.php"> Staff login | class="hyperlink" href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html" > Home | class="hyperlink" href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html" > Booked Flights &nbsp class="dropdown" > id="one-ddheader" onmouseover="ddMenu('one',1)" onmouseout="ddMenu('one',-1)" > Home id="one-ddcontent" onmouseover="cancelHide('one')" onmouseout="ddMenu('one',-1)" > href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html" class="underline" > Home class="dropdown" > id="two-ddheader" onmouseover="ddMenu('two',1)" onmouseout="ddMenu('two',-1)" > Contact us id="two-ddcontent" onmouseover="cancelHide('two')" onmouseout="ddMenu('two',-1)" > href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_contact" class="underline" > Contact us class="dropdown" > id="three-ddheader" onmouseover="ddMenu('three',1)" onmouseout="ddMenu('three',-1)" > Flights id="three-ddcontent" onmouseover="cancelHide('three')" onmouseout="ddMenu('three',-1)" > href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_refunds.html" class="underline" > Refund Policy class="dropdown" > id="four-ddheader" onmouseover="ddMenu('four',1)" onmouseout="ddMenu('four',-1)" > Travel Information id="four-ddcontent" onmouseover="cancelHide('four')" onmouseout="ddMenu('four',-1)" > href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_flight_fares.html" class="underline" > Flight Timetable href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_baggage.html" class="underline" > Baggage Information href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_airport_info.html" class="underline" > Airport information href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_travel_info.html" class="underline" > Travel documentation requirements class="dropdown" > id="five-ddheader" onmouseover="ddMenu('five',1)" onmouseout="ddMenu('five',-1)" > About Webair id="five-ddcontent" onmouseover="cancelHide('five')" onmouseout="ddMenu('five',-1)" > href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_about.html" class="underline" > About Webair href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_contact.html" class="underline" > Contact us style="clear:both" /> id="content" > id="table_gen_1" > class="inner" > //THERE IS AN ERROR display error message if($error == TRUE) { echo '' . $output . ''; ?> Staff login | Home | Contact us | About Webair } else { ?> Confirm Booking Out-going Flight Information: while($row = mysql_fetch_array($result)){ echo " </pre> <table border="'1'" cellpadding="10"> Flight Number Flight Route Selected Departure Time Arrival Time Departure Date Return Date Number of Passengers Selected ".$row['flight_num']." ".$row['flight_route']." ".$row['departure_time']." ".$row['arrival_time']." ".$date_out." ".$date_return." ".$passenger_num['num_of_pass']." </table> <br><br> <br><br>"; <br>} <br>?><br><br><br><br><br><div id="footer"> Staff login | Home | Contact us | About Webair </div> <br><br> <br> <br> <br> <br> }else{<br> <br> echo 'Sorry, couldn\'t find any flights';<br> <br> } <br> <br>mysql_free_result($result); <br
  16. Why not loop through a select statement? $users = "SELECT email FROM tableusers"; $SQL_users = mysql_query($users); while($row = mysql_fetch_array($SQL_users)) { mail({$row['email']}, "subject" , "email message"); }
  17. Heh, sorry I can't test where I'm at right now. I put error reporting/display on just in-case there is an error somewhere. This should work, I had the '}' in the wrong place: ini_set ("display_errors", "1"); error_reporting(E_ALL); $error = FALSE; //database information $host = "stocks"; // Host name $username = "wbennett"; // Mysql username $password = "mysql5"; // Mysql password $db_name = "wbennett"; // Database name $tbl_name1 = "flight_webair"; mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); // Variables $flight_route_out = $_POST['flight_route_out']; $flight_route_return = $_POST['flight_route_return']; $date_out = $_POST['departure_date']; $date_return = $_POST['return_date']; $passenger_num = $_POST['num_of_pass']; $one_way = (isset($_POST['one_way'])) ? $_POST['one_way'] : null; // make sure value is available first. if (strtotime($_POST['return_date']) $output = "You cannot book a return flight before your out-going flight!"; $error = TRUE; } else { $output = "You cannot book a return flight before your out-going flight!"; } //To protect MySQL injection $flight_route_out = stripslashes($flight_route_out); $flight_route_return = stripslashes($flight_route_return); $flight_route_out = mysql_real_escape_string($flight_route_out); $flight_route_return = mysql_real_escape_string($flight_route_return); //Queries $sql1="SELECT * FROM `$tbl_name1` WHERE `flight_route` = '$flight_route_out'"; //$sql="SELECT * FROM $tbl_name1 WHERE flight_route_return='$flight_route_return'"; //Execute query 1 $result = mysql_query($sql1) or die(mysql_error()); if(mysql_num_rows($result) > 0){ ?> http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> rel="stylesheet" href="dropdown2.css" type="text/css" /> type="text/javascript" src="dropdown.js"> type="text/javascript" src="calendar.js"> type="text/javascript" src="enablefield.js"> Booking Confirmation type="text/javascript"> function greyText(one_way, return_date) { if (document.form1[one_way].checked) { document.form1[return_date].disabled=true; document.form1[return_flight].disabled=true; } else { document.form1[return_date].disabled=false; document.form1[return_flight].disabled=false; } } Webair Contact Us src="Webair--logo.gif" height= "65" width="240" align="top" /> background="Banner--background.gif" height="60" align="right" width="817" > class="hyperlink" href="http://www.cems.uwe.ac.uk/~wbennett/webair/main_logon.php"> Staff login | class="hyperlink" href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html" > Home | class="hyperlink" href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html" > Booked Flights &nbsp class="dropdown" > id="one-ddheader" onmouseover="ddMenu('one',1)" onmouseout="ddMenu('one',-1)" > Home id="one-ddcontent" onmouseover="cancelHide('one')" onmouseout="ddMenu('one',-1)" > href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html" class="underline" > Home class="dropdown" > id="two-ddheader" onmouseover="ddMenu('two',1)" onmouseout="ddMenu('two',-1)" > Contact us id="two-ddcontent" onmouseover="cancelHide('two')" onmouseout="ddMenu('two',-1)" > href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_contact" class="underline" > Contact us class="dropdown" > id="three-ddheader" onmouseover="ddMenu('three',1)" onmouseout="ddMenu('three',-1)" > Flights id="three-ddcontent" onmouseover="cancelHide('three')" onmouseout="ddMenu('three',-1)" > href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_refunds.html" class="underline" > Refund Policy class="dropdown" > id="four-ddheader" onmouseover="ddMenu('four',1)" onmouseout="ddMenu('four',-1)" > Travel Information id="four-ddcontent" onmouseover="cancelHide('four')" onmouseout="ddMenu('four',-1)" > href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_flight_fares.html" class="underline" > Flight Timetable href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_baggage.html" class="underline" > Baggage Information href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_airport_info.html" class="underline" > Airport information href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_travel_info.html" class="underline" > Travel documentation requirements class="dropdown" > id="five-ddheader" onmouseover="ddMenu('five',1)" onmouseout="ddMenu('five',-1)" > About Webair id="five-ddcontent" onmouseover="cancelHide('five')" onmouseout="ddMenu('five',-1)" > href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_about.html" class="underline" > About Webair href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_contact.html" class="underline" > Contact us style="clear:both" /> id="content" > id="table_gen_1" > class="inner" > //THERE IS AN ERROR display error message if($error) { echo '' . $output . ''; ?> Staff login | Home | Contact us | About Webair } else { ?> Confirm Booking Out-going Flight Information: while($row = mysql_fetch_array($result)){ echo " </pre> <table border="'1'" cellpadding="10"> Flight Number Flight Route Selected Departure Time Arrival Time Departure Date Return Date Number of Passengers Selected ".$row['flight_num']." ".$row['flight_route']." ".$row['departure_time']." ".$row['arrival_time']." ".$date_out." ".$date_return." ".$passenger_num['num_of_pass']." </table> <br><br> <br><br>"; <br>} <br>?><br><br><br><br><br><div id="footer"> Staff login | Home | Contact us | About Webair </div> <br><br> <br> <br> <br> <br> }else{<br> <br> echo 'Sorry, couldn\'t find any flights';<br> <br> } <br> <br>mysql_free_result($result); <br
  18. What does your code actually do now? What is the problem you are having? Please surround your code with [ code ] tags.
  19. Oh ok I see what you mean. You need to have flags that determine if there are errors or not. You should really have an include file for your header and footer. Try this code: $error = FALSE; //database information $host = "stocks"; // Host name $username = "wbennett"; // Mysql username $password = "mysql5"; // Mysql password $db_name = "wbennett"; // Database name $tbl_name1 = "flight_webair"; mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); // Variables $flight_route_out = $_POST['flight_route_out']; $flight_route_return = $_POST['flight_route_return']; $date_out = $_POST['departure_date']; $date_return = $_POST['return_date']; $passenger_num = $_POST['num_of_pass']; $one_way = (isset($_POST['one_way'])) ? $_POST['one_way'] : null; // make sure value is available first. if (strtotime($_POST['return_date']) $output = "You cannot book a return flight before your out-going flight!"; $error = TRUE; } else { $output = "You cannot book a return flight before your out-going flight!"; } //To protect MySQL injection $flight_route_out = stripslashes($flight_route_out); $flight_route_return = stripslashes($flight_route_return); $flight_route_out = mysql_real_escape_string($flight_route_out); $flight_route_return = mysql_real_escape_string($flight_route_return); //Queries $sql1="SELECT * FROM `$tbl_name1` WHERE `flight_route` = '$flight_route_out'"; //$sql="SELECT * FROM $tbl_name1 WHERE flight_route_return='$flight_route_return'"; //Execute query 1 $result = mysql_query($sql1) or die(mysql_error()); if(mysql_num_rows($result) > 0){ ?> http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> rel="stylesheet" href="dropdown2.css" type="text/css" /> type="text/javascript" src="dropdown.js"> type="text/javascript" src="calendar.js"> type="text/javascript" src="enablefield.js"> Booking Confirmation type="text/javascript"> function greyText(one_way, return_date) { if (document.form1[one_way].checked) { document.form1[return_date].disabled=true; document.form1[return_flight].disabled=true; } else { document.form1[return_date].disabled=false; document.form1[return_flight].disabled=false; } } Webair Contact Us src="Webair--logo.gif" height= "65" width="240" align="top" /> background="Banner--background.gif" height="60" align="right" width="817" > class="hyperlink" href="http://www.cems.uwe.ac.uk/~wbennett/webair/main_logon.php"> Staff login | class="hyperlink" href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html" > Home | class="hyperlink" href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html" > Booked Flights &nbsp class="dropdown" > id="one-ddheader" onmouseover="ddMenu('one',1)" onmouseout="ddMenu('one',-1)" > Home id="one-ddcontent" onmouseover="cancelHide('one')" onmouseout="ddMenu('one',-1)" > href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html" class="underline" > Home class="dropdown" > id="two-ddheader" onmouseover="ddMenu('two',1)" onmouseout="ddMenu('two',-1)" > Contact us id="two-ddcontent" onmouseover="cancelHide('two')" onmouseout="ddMenu('two',-1)" > href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_contact" class="underline" > Contact us class="dropdown" > id="three-ddheader" onmouseover="ddMenu('three',1)" onmouseout="ddMenu('three',-1)" > Flights id="three-ddcontent" onmouseover="cancelHide('three')" onmouseout="ddMenu('three',-1)" > href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_refunds.html" class="underline" > Refund Policy class="dropdown" > id="four-ddheader" onmouseover="ddMenu('four',1)" onmouseout="ddMenu('four',-1)" > Travel Information id="four-ddcontent" onmouseover="cancelHide('four')" onmouseout="ddMenu('four',-1)" > href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_flight_fares.html" class="underline" > Flight Timetable href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_baggage.html" class="underline" > Baggage Information href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_airport_info.html" class="underline" > Airport information href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_travel_info.html" class="underline" > Travel documentation requirements class="dropdown" > id="five-ddheader" onmouseover="ddMenu('five',1)" onmouseout="ddMenu('five',-1)" > About Webair id="five-ddcontent" onmouseover="cancelHide('five')" onmouseout="ddMenu('five',-1)" > href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_about.html" class="underline" > About Webair href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_contact.html" class="underline" > Contact us style="clear:both" /> id="content" > id="table_gen_1" > class="inner" > //THERE IS AN ERROR display error message if($error) { echo '' . $output . ''; ?> Staff login | Home | Contact us | About Webair } else { ?> Confirm Booking Out-going Flight Information: while($row = mysql_fetch_array($result)){ echo " </pre> <table border="'1'" cellpadding="10"> Flight Number Flight Route Selected Departure Time Arrival Time Departure Date Return Date Number of Passengers Selected ".$row['flight_num']." ".$row['flight_route']." ".$row['departure_time']." ".$row['arrival_time']." ".$date_out." ".$date_return." ".$passenger_num['num_of_pass']." </table> <br><br> <br><br>"; <br>} <br>?><br><br><br><br><div id="footer"> Staff login | Home | Contact us | About Webair </div> <br> <br> <br> <br> <br> }else{<br> <br> echo 'Sorry, couldn\'t find any flights';<br> <br> } <br> <br>mysql_free_result($result); <br>}<br
  20. Post ALL of your current code.
  21. Well at least the date check works because 22/12/2008 (return) is before 26/12/2008 (departure). What do you mean? Do you have a link/screenshot so I can see what's going on? The while loop is no where near the echo.
  22. Take out the stamp variables and try this: if (strtotime($_POST['return_date']) echo "You cannot book a return flight before your out-going flight!"; } else { echo "You cannot book a return flight before your out-going flight!"; }
  23. It's supposed to print to screen. The output should be at the very top of the page if there were any values. At the very top of your script, right after the <?php tags, put: print_r($_POST); This will dump out the $_POST array with all the values, if there are any.
  24. Why do you have 2 forms?
  25. Post your form.
×
×
  • 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.