Sheila and Robin,
Thanks very much. You were right about the variable *not* having
been defined; I'm a bit closer to understanding and being able to
watch out for that!
This: '{$_POST['username']}' "),0); in the SELECT query is the
fault with the other problem, but I cannot work out what is wrong with
it. So far I haven't discovered a reference or an example which
makes the problem clear, let alone the solution.
Joseph
>
> Hi Joseph,
>
> Joseph, Smile-Poet wrote:
> > 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 ;
> > }
> >
> >
> > file://If both emails were posted, validate they match.
> > (line65) if( $email_error ==
se){
> > if($_POST['email_address'] !=
> > $_POST['email_address2']){
> > $error = true;
> > $errors .= "Email addresses do not match!\n\n";
> > $email_error = true;
> > }
> >
>
> $email_error needs an initial value. Add this line
> $email_error = false;
> before the first 'if' statement.
>
>
> > Warning: mysql_result(): supplied argument is not a valid MySQL result resource in
> > c:\easyphp1-7\www\join.php on line 102
> >
> This usually means there is something wrong with the SQL statement.
>
> > from this:
> >
> > file://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);
> >
>
> Break this up into several steps so you can find the problem,
>
> $sql = "SELECT_COUNT(*) AS ucount FR
OM book_mydb.members
> '{$_POST['username']}' ";
>
> $result = mysql_query($sql);
>
> if ($result) {
> $_ucount = mysql_result($result);
> } else {
> echo mysql_errno() . ": " . mysql_error(). "<br>\n";
> echo "SQL: $sql<br>\n";
> }
>
>
>
> Sheila
> --
> Sheila Fenelon
> http://www.shefen.com/
>
>
>
>
> ____ . 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.unsub%%
>
> 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.
>
____ � 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.