Click here to Skip to main content
14,363,083 members
Rate this:
Please Sign up or sign in to vote.
So I making a Registration page, It has Verification And Confirm Fields. To secure my registration I am trying to stop mysql injections but I get an error:

Parse error: syntax error, unexpected '$email3' (T_VARIABLE) in C:\xampp\htdocs\register.php on line 70

Line 70 Contains:
$email3 = mysql_escape_string($email1);


$email1 is:
$email1 = $_POST['email'];


And My Form Is:
$form = '<form action="register.php" method="POST" >
First Name:(Only for emails) <input type="text" name="fname" /><br /><br />
Last Name:(Only for emails) <input type="text" name="lname" /><br /><br />
E-Mail: <input type="email" name="email" /><br /><br />
Confirm E-Mail: <input type="email" name="cemail" /><br /><br />
Username: <input type="text" name="uname" /><br /><br />
Password: <input type="password" name="pass" /><br /><br />
Confirm Password: <input type="password" name="cpass" /><br /><br />
<input type="submit" name="register" value="Register" />
</form>';


The line of code Corresponding to line 70 is:
E-Mail: <input type="email" name="email" /><br /><br />


What am I doing wrong to get this error?


If You Want To Test out my Code Here:
[^]
Posted
Updated 3-Jan-14 10:14am
v3
Comments
CHill60 3-Jan-14 15:36pm
   
Have you terminated line 69 with ";" ?
Nelek 3-Jan-14 17:31pm
   
Op answered you in a comment below.
CHill60 3-Jan-14 18:22pm
   
Thanks Nelek ... I'll post as solution
Braydon 3-Jan-14 16:39pm
   
XD Wow I missed that like 500 Times Thanks

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

As per my comment, OP has confirmed line 69 was not terminated with ";"
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100