|
Posted by Stephanie on 07/19/05 17:55
>> if(!$_POST['email']&&$req_email||ereg("/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/")){
>
> You should be getting "PHP Warning: Wrong parameter count for ereg()"
> for this snippet, as you have not specified the string to be matched!
I already changed it this way:
if(!$_POST['email']&&$req_email||ereg("/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/",
$_POST['email'])==TRUE){
and tried this:
if(!$_POST['email']&&$req_email&&ereg("/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/",
$_POST['email'])==TRUE){
And this:
if(!$_POST['email']&&$req_email){
$missing[]=$req_email;
$red[1]=" class=\"red\"";
}
if
($_POST['email']&&ereg("/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/",
$_POST['email'])==TRUE){
$missing[]="Use a valid email address";
$red[1]=" class=\"red\"";
}
But now way.
Navigation:
[Reply to this message]
|