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] Link to comment https://forums.phpfreaks.com/topic/197102-parse-error-in-cwampwwweigenofferte3php-on-line-13/ Share on other sites More sharing options...
trq Posted March 31, 2010 Share Posted March 31, 2010 If statements do not end with ; Link to comment https://forums.phpfreaks.com/topic/197102-parse-error-in-cwampwwweigenofferte3php-on-line-13/#findComment-1034622 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 Link to comment https://forums.phpfreaks.com/topic/197102-parse-error-in-cwampwwweigenofferte3php-on-line-13/#findComment-1034623 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... Link to comment https://forums.phpfreaks.com/topic/197102-parse-error-in-cwampwwweigenofferte3php-on-line-13/#findComment-1034628 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. Link to comment https://forums.phpfreaks.com/topic/197102-parse-error-in-cwampwwweigenofferte3php-on-line-13/#findComment-1034636 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] Link to comment https://forums.phpfreaks.com/topic/197102-parse-error-in-cwampwwweigenofferte3php-on-line-13/#findComment-1034642 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 { Link to comment https://forums.phpfreaks.com/topic/197102-parse-error-in-cwampwwweigenofferte3php-on-line-13/#findComment-1034647 Share on other sites More sharing options...
svenjcvd Posted March 31, 2010 Author Share Posted March 31, 2010 it reads else ( Link to comment https://forums.phpfreaks.com/topic/197102-parse-error-in-cwampwwweigenofferte3php-on-line-13/#findComment-1034651 Share on other sites More sharing options...
trq Posted March 31, 2010 Share Posted March 31, 2010 Then fix it. Link to comment https://forums.phpfreaks.com/topic/197102-parse-error-in-cwampwwweigenofferte3php-on-line-13/#findComment-1034652 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 ("[email protected]", "$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? Link to comment https://forums.phpfreaks.com/topic/197102-parse-error-in-cwampwwweigenofferte3php-on-line-13/#findComment-1034659 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. Link to comment https://forums.phpfreaks.com/topic/197102-parse-error-in-cwampwwweigenofferte3php-on-line-13/#findComment-1034715 Share on other sites More sharing options...
ignace Posted March 31, 2010 Share Posted March 31, 2010 eregi() is deprecated Link to comment https://forums.phpfreaks.com/topic/197102-parse-error-in-cwampwwweigenofferte3php-on-line-13/#findComment-1034749 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.