Page 1 of 1

$_POST['email'] returns nothing

Posted: Wed Nov 26, 2003 11:10 pm
by charliew
I'm posting an email field (input type 'text') from an html form to my php script.
$_POST['email'] has a str_len of 0 (and no value) when a 'normal' email with '@' is entered.
$_POST['email'] has a value when the email is enter with '\@' and then has a value of 'email\\@domain.com'.
Obviously I can't get the user to enter their email with a slash; what is a way to work around the @ and capture the email entry?

Thanks,
Charlie

Can I see your code?

Posted: Wed Nov 26, 2003 11:23 pm
by William
Can I see yuor code? And i think it is ['$email'] dont knwo for sure but i think it is.

Posted: Wed Nov 26, 2003 11:27 pm
by charliew
from the html form:
<input type="text" size="30" name="email" onchange="parent.frame3.document.form3.email.value = this.value" tabindex="8">

at the beginning of the script:
echo "email: ",$HTTP_POST_VARS['email'];

if you enter 'x@x.com', it displays: 'email:'

if you enter 'x\@x.com', it displays 'email: x\\x.com'