2nd Pair of eyes

From: Date: Tue, 18 Jan 2011 17:49:09 +0000
Subject: 2nd Pair of eyes
Groups: php.general 
Request: Send a blank email to php-general+get-310840@lists.php.net to get a copy of this message
Hello, I warned the list that I may have questions! ;-) ...building a simple cookie-based log-in system, and have narrowed an error to this below: (sorry for email line breaks, if any) ---Start--- if ($_post['f_action']=='login') { // connect to database (custom function) $r = dbconnect(); // success? if ($r['a_success']) {
    $query = "SELECT u_id FROM cms_users WHERE u_name = $_post['f_user'] AND u_pass = $_post['f_pass']";
    if ($r = @mysql_query($query))
    {
      // test
      print "<!-- userID: $r -->";
    }
    mysql_close();
} else { // Not connected to db $t_mssg = mysql_error(); } } ---End--- No info is given in PHP error reporting because it returns no source to the page. Can you see where this n00b went wrong? Thanks! Donovan -- D Brooke

« previous php.general (#310840) next »