svenjcvd Posted March 31, 2010 Share Posted March 31, 2010 I get an error on line 13... What am i doing wrong?? Maybe its not the only error.... Thank you.. [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
trq Posted March 31, 2010 Share Posted March 31, 2010 If statements do not end with ; Quote Link to comment Share on other sites More sharing options...
isedeasy Posted March 31, 2010 Share Posted March 31, 2010 remove the semi-colon from the end of line 7 Quote Link to comment Share on other sites More sharing options...
svenjcvd Posted March 31, 2010 Author Share Posted March 31, 2010 you' re right about that patience... but i am patienced, im just not good in this language... Now i removed the ; from line 7 and the line 13 error is gone.. but now i get another error on line 16... maybe the cause of removing ; on line 7 ? Can someone please check my script? Thanks... Quote Link to comment Share on other sites More sharing options...
isedeasy Posted March 31, 2010 Share Posted March 31, 2010 Can you tell us what the error is? where is the variable $email coming from? It looks like an old script that makes use of register_globals being set to on. try adding $email = $_POST['email']; at the top of your script. Quote Link to comment Share on other sites More sharing options...
svenjcvd Posted March 31, 2010 Author Share Posted March 31, 2010 Re: parse error in C:\wamp\www\eigenofferte3.php on line 13... « Reply #4 on: Today at 08:33:30 AM »QuoteCan you tell us what the error is? where is the variable $email coming from? It looks like an old script that makes use of register_globals being set to on. try adding $email = $_POST['email']; at the top of your script. ----------------------------- It told me " Parse error: parse error in C:\wamp\www\eigenofferte3.php on line 14" ... now i have added $email = $_post('email'); at the top and i says.. Parse error: parse error in C:\wamp\www\eigenofferte3.php on line 17 this is my script now.. [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
isedeasy Posted March 31, 2010 Share Posted March 31, 2010 well I cant really tell by the image but does line 15 read else ( or else { Quote Link to comment Share on other sites More sharing options...
svenjcvd Posted March 31, 2010 Author Share Posted March 31, 2010 it reads else ( Quote Link to comment Share on other sites More sharing options...
trq Posted March 31, 2010 Share Posted March 31, 2010 Then fix it. Quote Link to comment Share on other sites More sharing options...
svenjcvd Posted March 31, 2010 Author Share Posted March 31, 2010 i ve now changed the ( into a { ... the error is gone, but now it gives me another one.. Same error but on line 20.. i think it was the }so ive removed it, line 20 is good, but then it says Parse error: parse error in C:\wamp\www\eigenofferte3.php on line 23 This is making me sooo angry.... damn .. starting on line 14: else { // email validation if(!eregi('^([._a-z0-9-]+[._a-z0-9-]*)@(([a-z0-9-]+\.)*([a-z0-9-]+)(\.[a-z]{2,3})?)$', $email)) { print ("Dit is geen geldig emailadres, probeer het opnieuw a.u.b."); exit // send email $headers = "From: \"$naam\" <$email>\n"; $subject = "Nieuwe offerte"; $message = "$naam". "$adres". "$postcodeplaats". "$tel". "$fax". "$email". "$offerteaanvraag"; mail ("$sven_vd@hotmail.com", "$Naam", $adres, $postcodeplaats); print ("Bedankt $naam, Uw bericht is verzonden, we nemen zo spoedig mogelijk contact met je op!"); } ?> BTW what does the $email = $_POST['email']; meens? Quote Link to comment Share on other sites More sharing options...
isedeasy Posted March 31, 2010 Share Posted March 31, 2010 well it looks like you have register_globals turned on so that line is not needed, you can either remove it or better yet turn off register_globals and refer to posted values as $_POST['input_name'] rather than $input_name. Quote Link to comment Share on other sites More sharing options...
ignace Posted March 31, 2010 Share Posted March 31, 2010 eregi() is deprecated Quote Link to comment 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.