Jump to content

Parse Error really?


desjardins2010

Recommended Posts

alright, I have been trying to create this register.php file all day and it was working fine with one small error I fixed that and now it fails to even show the form jusst getting parse error on line 173 my script ends at 172???

<?php

//check for submit

$submit =$_POST['submit'];



//gather POST variable

$fullname =strip_tags($_POST['fullname']);

$email =strip_tags($_POST['email']);

$username =strip_tags($_POST['username']);



$password =strip_tags($_POST['password']);

$password2 =strip_tags($_POST['password2']);



if ($submit) 

{

//check that fields were filled in

if ($fullname&&$email&&$username&&$password&&$password2)

{

//now we can encrypt our password to md5

$password = md5($password);

$password2 = md5($password2);

//were done seeting md5

//check to see if our two password fields match	

if ($password==$password2) 

{

// register the user

echo "Success";

}

//otherwise if passwords don't match

else {

echo "<font color='red'>The passwords you entered do not match</font>";

//end of checking password	
}


}

else {

echo "<font color='red'>Please enter all fields!</font>";

}

//end check for submit 



?>



                <form action='test.php' method="post">

<table align="center">



<tr>

    	<td>

    	Your Full Name:

        </td>

        <td>

        <input type="text" name="fullname">        

        </td>

    </tr>

    	<tr>

    	<td>

    	Email Address:

        </td>

        <td>

        <input type="text" name="email">        

        </td>

    	<tr>

    	<td>

    	Choose Username:

        </td>

        <td>

        <input type="text" name="username">        

        </td>

    </tr>

    	<tr>

    	<td>

    	Password:

        </td>

        <td>

        <input type="password" name="password">        

        </td>

    </tr>

    	<tr>

    	<td>

    	Retype Password:

        </td>

        <td>

        <input type="password" name="password2">        

        </td>

    </tr>

</table>

<p>

<center><input type="submit" name="submit" value="Register"></center>

</form>	

Link to comment
https://forums.phpfreaks.com/topic/221149-parse-error-really/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.