Jump to content

Archived

This topic is now archived and is closed to further replies.

kenwvs

Form Validation with Preg_Match getting an error at the end

Recommended Posts

I have a validation script that I am trying to figure out and it looks like this:
[code]if($error == "0"){
echo "
The data you entered was valid<p>

}else{
;echo "Number of errors: $error ";  //this is line 329
}
?>[/code]

and when I run it, I am getting this error

[quote]Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in C:\Documents and Settings\Owner\My Documents\My Webs\forsale4u\php90F.tmp on line 329[/quote]

Share this post


Link to post
Share on other sites
;echo "Number of errors: $error ";  //this is line 329

take out the ; before the echo

Share this post


Link to post
Share on other sites
wait hold on.
[code]


if($error == "0"){
echo "
The data you entered was valid<p>";

}else{
echo "Number of errors: $error ";  //this is line 329
}
?>[/code]

Share this post


Link to post
Share on other sites
Same error.  I put that in and forgot to take it out when I was trying to figure out what the problem was.  sorry about that.

Ken

Share this post


Link to post
Share on other sites
no.  With that removed you get the same error.  I was getting the error and then when trying to fix it, I accidentaly put that in and forgot to take it out.  So the error is still there when you remove it.

Ken

Share this post


Link to post
Share on other sites
I copied and pasted the original lines from a starting script i found and there is no error, so we will see what happens when I make changes again.  Sorry about that.

Ken

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.