Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. Its simply checking to make sure the called functions actually work before using there results in another function. As for you question. Just change.... echo "<select name=education_level value=''>Education Level</option>"; to.... echo "<select name=education_level value=''>Education Level</option>"; echo "<option value=''>Select PLease</option>";
  2. The way your doing your check is a pretty long winded approuch too. <?php $username = mysql_real_escape_string($_POST['username']); $password = mysql_real_escape_string($_POST['password']); $sql = "SELECT * FROM users WHERE username = '$username' && upass = '$passoword'"; if ($result = mysql_query($sql)) { if (mysql_num_rows($result)) { // log user in. } else { // invalid login. } }
  3. Well never know without seeing some relevant code.
  4. According to the HTTP specs, the Location header should be a complete uri, not just a filename (of course most browser seem to work ok without, but it's best practice).
  5. This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=321950.0
  6. Accessing Sqlite3. Just like any database, there is usually a interface provided besides what PDO might provide. It would however be more beneficial to stick with PDO, as it will make changing databases in the future (if need be) allot easier.
  7. trq

    php header

    People (or Google) are not logged in the will be redirected and never see the meta tags anyway. The short answer is that you cannot output anything and then redirect, it also makes NO SENSE at all to try.
  8. Change.... if (isset($_POST['submit'])) { to.... if (isset($_POST['submit']) && isset($_FILES['new_picture']['tmp_name'])) {
  9. I don't see that using FF 3.6 in Gentoo, and Ive never seen it in any other browser.
  10. Can we see some relevant code?
  11. This topic has been moved to Linux. http://www.phpfreaks.com/forums/index.php?topic=321946.0
  12. trq

    php header

    If all you are going to do is redirect there is no point is there.
  13. This isn't the Ajax board, nor is it helping the op solve there problem.
  14. So, you have chosen to simply ignore the handling of errors like I showed you?
  15. Your connection needs to be made in the file that calls mysql_query().
  16. Kira, the code you posted doesn't even use jQuery I'm afraid.
  17. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=321906.0
  18. Remove the error suppression and you might actually see an error message. Better, yet, check for one. <?php require_once('../Connections/connection.php'); ?> <?php if ($result = mysql_query( "select yearID, year, from sss.years")) { if (mysql_num_rpws($result)) { print "<p>Select a year:\n"; print "<select name=\"yearID\">\n"; while ($row = mysql_fetch_assoc($result)) { $yearID = $row[ 'yearID' ]; $year = $row[ 'year' ]; print "<option value=$yearID>$year\n"; } print "</select>\n"; print "</p>\n"; } else { // no record found. } } else { trigger_error(mysql_error()); }
  19. Looks like the function is executing then. You don't have an open/valid database connection though.
  20. trq

    php header

    You need to also display your meta only if the user is logged in.
  21. Just adding options to a plugins option list doesn't do anything, you need to actually add the easing to the code in the appropriate places.
  22. Post some relevant code!
  23. trq

    php header

    header works fine for redirecting. Why you want to send data to a client only to redirect them is beyond me, it makes no sense at all to do so.
  24. http://www.phpfreaks.com/forums/php-coding-help/make-a-link-execute-a-script/msg1516757/#msg1516757
  25. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=321929.0
×
×
  • 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.