Click here to Skip to main content
15,029,206 members
Please Sign up or sign in to vote.
2.00/5 (1 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" />

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:
Updated 3-Jan-14 9:14am
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

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, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900