Quoting "Joseph, Smile-Poet" <[EMAIL PROTECTED]>:

> Why this:
> Notice: Undefined variable: email_error in c:\easyphp1-7\www\join.php on line
> 65
> 
> if the following two queries define the variable?:
> 
>       if(!$_POST['email_address']){
>                $errors .= "Missing Email address\n";
>               $email_error = true ;
>       }
>       if(!$_POST['email_address2']){
>                $errors .= "Missing Email address".
>                         "Verification\n";
>               $email_error = true ; 
>       }
> 
This error is coming up because, if you don't have a missing email address,
$email_error isn't being defined at all. What you might want to do is add a line
above the two if blocks that defines $email_error = false, then if the email is
missing, it will be redefined as true then. Make sense?
> 
>               //If both emails were posted, validate they match.
> (line65)      if( $email_error == false){             
>                      if($_POST['email_address'] !=
>                             $_POST['email_address2']){
>                      $error = true;
>                       $errors .= "Email addresses do not match!\n\n";
>                       $email_error = true;
>       }
> 
> AND
> 
> why this:
> Warning: mysql_result(): supplied argument is not a valid MySQL result
> resource in c:\easyphp1-7\www\join.php on line 102
> 
> from this:
> 
>          //Verify if username already exists
>       $_ucount = mysql_result(mysql_query("SELECT_COUNT(*)
>                     AS ucount FROM book_mydb.members
>                WHERE members.username =
>  (line 102)            '{$_POST['username']}' "),0);
> 
> Joseph   (I'm not *that* far advanced, these are from a tutorial;  but after
> aplying what little knowledge I've gained I'm getting the same errors.   And
> the servers *are* turned on!)
For this one I'm not sure - what I usually do is create my SELECT statement as a
variable (eg. $select = "SELECT_COUNT(*)...";) and include that variable in the
mysql_query function. This makes it easy to echo out the $select variable to see
what is being passed to the function and to find out why the query isn't working. 
-- 
Robin Hastings
[EMAIL PROTECTED]




____ • The WDVL Discussion List from WDVL.COM • ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] 
       Send Your Posts To: [EMAIL PROTECTED]
To set a personal password send an email to [EMAIL PROTECTED] with the words: "set 
WDVLTALK pw=yourpassword" in the body of the email.
To change subscription settings to the wdvltalk digest version:
    http://wdvl.internet.com/WDVL/Forum/#sub

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.

Reply via email to