Jump to content

AyKay47

Members
  • Posts

    3,281
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by AyKay47

  1. you forgot the closing quotation in your sql mysql_query("DELETE FROM users WHERE `signup_date` <DATE_SUB(CURDATE(), INTERVAL 1 DAY");mysql_close($db);?>
  2. AyKay47

    Header

    what i notice is that you do not initiate the $errors variable before trying to concatenate values onto it.. $errors = ""; if (empty($flight)) {$errors .= "Please enter the flight number. <br />";}if (empty($dept)) {$errors .= "Please enter the departure airport. <br />";}if (empty($arrival)) {$errors .= "Please enter the arrival airport. <br />";}if ($flightTime == "") {$errors .= "Please enter the flight time. <br />";}if (empty($fuel)) {$errors .= "Please enter the fuel. <br />";}if ($errors == "") {$sql2 = "UPDATE pireps SET flight = '$flight', $dept = '$dept', arrival = '$arrival', flightTime = '$flightTime', fuel = '$fuel', aircraft = '$aircraft', status='$status' comment = '$comment' WHERE id='$id'"or die("An error has occured. Please contact the webmaster with the following error: " . mysql_error());$result2 = mysql_query($sql2);header("Location: logbook.php?pid=" . $pilotid);} else {}}
  3. yeah just a join overall, i myself have not used the mysql case statement so I do not the ins and outs of the syntax, however for your case you would be better off using a join
  4. use a join in this case..
  5. AyKay47

    Header

    this code is irrelevant without the header, oh my there are some characters on phpf today!
  6. yeah this one has me confused..your syntax is not incorrect here, and the error indicates that you are querying a query, i d not see how that error is coming from the code you provided..
  7. appears that you are querying a query here... Edit: as pikachu has already stated
  8. AyKay47

    Header

    you probably have $pilotid in a conditional statement or loop, without seeing your code its impossible to tell
  9. what PHP errors do you receive? have you debugged your mysql_query?
  10. CASE usertype WHEN 1 THEN SELECT * FROM regular_user_details WHEN 2 THEN SELECT * FROM business_user_details END CASE;
  11. you will want to use a case statement http://dev.mysql.com/doc/refman/5.0/en/case-statement.html
  12. wrong syntax.. if ($position == 2 || $position == 3) { i know what you are trying to do, but bascially you are checking if $position == 2 correctly, however the || 3 part is checking if 3 returns true, which it always will
  13. make sure that error_reporting is set to E_ALL and check your error.log for errors, is turn display_errors ON
  14. Because once you can type, IDE's will get in your way. I moved to vim as my primary editor for that very reason - though I'm still not the best typist in the world, code completion and pop-ups of all sorts just slow me down. I have this issue as well, which is why I originally went towards the "learn to type" choice..however for a beginner I will most certainly suggest the use of an IDE to aid them
  15. 1. if you are planning on using the $path variable correctly, you will include the code in your while loop.. 2. I assume that your form has a method of POST.. 3. keep $name=$_POST['subcat']; as is, this variable will be available to your entire script..$_GET array is only used when values are passed through the URL or a form method of GET Edit: Thorpe i'm tired of being your echo..
  16. yeah very true, why go through the trouble to leanr how to type super fast when there are tools like IDE's out there that do alot of the work for you..
  17. well its not imparitive that you become the worlds fastest typer, but it would certainly help...it always helps to be able to look at the screen while typing, that way you can spot errors as you are typing....
  18. depends what you are using to validate the email address...
  19. you got me on this one pikachu, i forgot that it was in a select tag..
  20. http://www.phpfreaks.com/forums/index.php?topic=340649.0;topicseen
  21. that link was already given..
  22. ha..i wasn't fully awake when I wrote that example..
  23. if the OP is looking to create a new line and is viewing this as HTML in the browser, which i presume he is, chances are the newline character "\n" will not give him a line break... which is why i suggested using the html break tag..
  24. 1. what exactly do you need to grab between the parenthesis? 2. yes you can, using preg_match to weed out the invalid email adresses with a pattern like, however, re-reading your post makes me wonder exactly which emails you want to get rid of?
×
×
  • 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.