kenwvs Posted July 11, 2006 Share Posted July 11, 2006 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] Quote Link to comment https://forums.phpfreaks.com/topic/14341-form-validation-with-preg_match-getting-an-error-at-the-end/ Share on other sites More sharing options...
play_ Posted July 12, 2006 Share Posted July 12, 2006 ;echo "Number of errors: $error "; //this is line 329take out the ; before the echo Quote Link to comment https://forums.phpfreaks.com/topic/14341-form-validation-with-preg_match-getting-an-error-at-the-end/#findComment-56528 Share on other sites More sharing options...
play_ Posted July 12, 2006 Share Posted July 12, 2006 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] Quote Link to comment https://forums.phpfreaks.com/topic/14341-form-validation-with-preg_match-getting-an-error-at-the-end/#findComment-56529 Share on other sites More sharing options...
kenwvs Posted July 12, 2006 Author Share Posted July 12, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/14341-form-validation-with-preg_match-getting-an-error-at-the-end/#findComment-56531 Share on other sites More sharing options...
play_ Posted July 12, 2006 Share Posted July 12, 2006 so is it fixed? Quote Link to comment https://forums.phpfreaks.com/topic/14341-form-validation-with-preg_match-getting-an-error-at-the-end/#findComment-56536 Share on other sites More sharing options...
kenwvs Posted July 12, 2006 Author Share Posted July 12, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/14341-form-validation-with-preg_match-getting-an-error-at-the-end/#findComment-56541 Share on other sites More sharing options...
kenwvs Posted July 12, 2006 Author Share Posted July 12, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/14341-form-validation-with-preg_match-getting-an-error-at-the-end/#findComment-56544 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.