$_POST['email'] returns nothing

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
charliew
Forum Newbie
Posts: 5
Joined: Wed Nov 26, 2003 11:10 pm

$_POST['email'] returns nothing

Post 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
User avatar
William
Forum Contributor
Posts: 332
Joined: Sat Oct 25, 2003 4:03 am
Location: New York City

Can I see your code?

Post by William »

Can I see yuor code? And i think it is ['$email'] dont knwo for sure but i think it is.
charliew
Forum Newbie
Posts: 5
Joined: Wed Nov 26, 2003 11:10 pm

Post 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'
Post Reply