RE: [PHP] Baffled, line producing error
| From: | Jonathan Rosenberg | Date: | Sun, 02 Jun 2002 03:58:38 +0000 |
| Subject: | RE: [PHP] Baffled, line producing error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-100279@lists.php.net to get a copy of this message | ||
What is the exact error message are you seeing?
> -----Original Message-----
> From: Craig Vincent [mailto:2bunnyhop@rogers.com]
> Sent: Saturday, June 01, 2002 11:29 PM
> To: php-general@lists.php.net
> Subject: [PHP] Baffled, line producing error
>
>
> I was happily coding when I came across a mysterious
> error. I've traced it
> to this line
>
> if ($player_password != $player_password_verify) {
> $errmsg .= 'Password
> don't match. Please try again<BR>'; $error = 1; }
>
> commented out the script runs fine, if this line is
> active an error is
> produced. My eyes are going bug eyed trying to find
> what the problem is and
> I'm hoping a second pair of eyes may point out my error.
>
> I've provided the entire script in case by chance the
> error is actually
> stemming from elsewhere in the script and I'm missing
> that as well. The
> error message from the compiler states the error is
> stemming from line 15
> (which is the line I posted above). Any suggestions?
>
> <?php
> require('config.inc.php');
> authenticate();
>
> if ($action == 'add') {
> // The connection/query commands will need to be
> modified once the db
> abstraction layer is ready
> mysql_connect($mysql_host, $mysql_user, $mysql_pass);
> mysql_select_db($mysql_database);
> $errmsg = '';
>
> if (mysql_num_rows(mysql_query("SELECT player_id FROM
> eq_guildmembers WHERE
> player_name = '$player_name'")) > 0) { $errmsg .=
> 'Player name already
> exists<BR>'; $error = 1; }
> if (!$player_password) { $errmsg .= 'You must specify
> a password for this
> user<BR>'; $error = 1; }
>
> # For some weird reason the line below produces an
> error...I can't find
> anything wrong
> if ($player_password != $player_password_verify) {
> $errmsg .= 'Password
> don't match. Please try again<BR>'; $error = 1; }
>
> if (!$error) {
> mysql_query("INSERT INTO eq_guildmembers (player_name,
> date_joined,
> player_email_address, player_icq, priv_admin,
> player_password) VALUES
> ('$player_name',NOW(),
> '$player_email_address','$player_icq','$priv_admin','$p
> layer_password')");
> else { echo 'Submission successful...<A
> HREF="admin_roster.php">click here
> to return to the roster</A>'; exit; }
> }
> }
> ?>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>