I realize there are a couple of others with the similar issues posting on here but none of them have help me me find a working solution so I am going to ask myself.
I wrote some php code for a form but I keep getting the msg -
Parse error: syntax error, unexpected $end in /home/content/59/7651259/html/cgi/register.php on line 40
If anyone can take a look at it and let me know what they think the issue might be. I am very new to php and am not quite sure what I am looking for. I have read in another thread to check for the { or } and some other things but nothing jumps out to me.
Oh, I did notice there is not a } on line 10 directly after the command to die on the user account but when I added it I got the same msg but with a line 10 error so I removed it again.
Line 40 is the closing line - ?> in case that helps
The register form php code is below:
<?php
require 'connect.inc.php';
$user_name=$Post['name'];
$user_name = mysql_query("select id from users where user_name='$_POST[user_name]'");
$duplicate_user_name = mysql_num_rows($user_name);
if ($duplicate_user_name > 0)
{
die ("ERROR: User account already exists.");
$password_1=$Post['password'];
$password_2=$Post['password'];
if ($_POST['password_1'] != $_POST['password_2'])
{
die ("Passwords do not match");
}
$comapny=$Post['company'];
$first=$Post['first'];
$last=$Post['last'];
$email=$Post['email'];
$rs_duplicates = mysql_query("select id from users where email='$_POST[email]'");
$duplicates = mysql_num_rows($rs_duplicates);
if ($duplicates > 0)
{
die ("ERROR: User account already exists.");
}
$area_code_1=$Post['area_code_1'];
$phone_1=$Post['phone_1'];
$ext=$Post['ext'];
$area_code_2=$Post['area_code_2'];
$fax_1=$Post['fax_1'];
$address_1=$Post['address_1'];
$address_2=$Post['address_2'];
$city=$Post['city'];
$state=$Post['state'];
$zip=$Post['zip'];
?>