|
Posted by Julien Plιe on 08/12/07 15:34
Le Tue, 24 Jul 2007 23:08:19 +0000, Nospam a Γ©critΒ :
> I am getting an undefined index : email on this line
>
> if
> (!eregi('^[a-zA-Z]+[a-zA-Z0-9_-]*@([a-zA-Z0-9]+){1}(\.[a-zA-Z0-9]+)
{1,2}',
> stripslashes(trim($_POST['email'])) )) {
> $errors[] = '<font color="red">Please provide a valid email
> address.</font>';
> } else {
> $email = mysql_real_escape_string($_POST['email']);
> }
Hi Nospam,
You assign a string to a table ??? This thing looks kinda crazy to me.
Moreover... I advice to check that the array key 'email' exists in
$_POST... It will avoid warnings.
<?php
if (array_key_exists ('email', $_POST))
{
// Do what you have to do.
}
else
{
// There you could not do it anyway.
}
?>
Julien
Navigation:
[Reply to this message]
|