eaglelegend Posted April 10, 2008 Share Posted April 10, 2008 I have been trying to make people stop using php/html codes etc. in my register.php file by using the strip_tags function, and it didnt work, now I took it off my whole register file dont work, could someone please tell me whats going on here? (thanks in advance) parse error: Parse error: syntax error, unexpected $end in /misc/39/000/171/334/2/user/web/eaglelegend.com/register.php on line 98 the register.php file: <?php include("header.php"); ?> <?php $username = $_POST['username']; $password = $_POST['password']; $password_confirm = $_POST['password_confirm']; $email = $_POST['email']; if($username && $password && $password_confirm && $email) { $siteurl = preg_replace( "/[^a-zA-Z0-9s]/", "", $siteurl ); $check_user = mysql_num_rows(mysql_query("SELECT * FROM `members` WHERE `username`=\"$username\"")); $check_site = mysql_num_rows(mysql_query("SELECT * FROM `members` WHERE `url`=\"$siteurl\"")); if($check_user == 0) { if($password == $password_confirm) { $newpass = $password; $date = date("m/d/y"); $sql = mysql_query("SELECT * FROM `sites` WHERE `url`='$Z'"); while($r = mysql_fetch_array($sql)) { $money = $r["money"]; $points = $r["points"]; } $insert = mysql_query("INSERT INTO `members` (`admin`, `date`, `username`, `password`, `email`, `points`, `money`) VALUES('0', '$date', \"$username\", \"$newpass\", \"$email\", '$points', '$money')"); if($insert) { print "<h2>Congratulations!</h2><p> You are now a registered member of this site!<p> Username: $username<br> Password: $password<p> You can login using the form to the right!"; } else { print mysql_error(); } } else { print "<p>Passwords do not match!</p>"; } } else { if($check_user > 0) { print "<p>That username already exists!</p>"; } } } else { ?> <h2>Register</h2><p> <img src="http://www.eaglelegend.com/images/pets/Quadra.png" title="Mr. Helpya" alt="Mr. Helpya"> <form action="register.php" method="post"> Hello. My name is Mr. Helpya and as it is says in my name, I am here to help you! As you play throughout the game, you will see me bringing up help or tooltips as they are otherwise known. Even though I am to busy to see every user on the site, you will still be able to get the tooltips from me personally!.<br><br> Here is an example of my work, put your mouse over my picture above here... do you see the little box come up with my name? thats how it works, just put your mouse over any image, function or form fields and I will tell you what it is for!.<br><br> So, you want to register eh?, OK, the register form is another example of what I just taught you!, again put your mouse over the fields before you write to find out what you have to put there! please, whatever you write, do not enter any personal info on your username, as it is viewed by hundreds every day, and you wouldnt walk down town handing out your personal info would you? and what would your parents think? not to happy, I should think, so...<br><br> Please ask your parents about joining up with us, by registering we are assuming you have had your parents consent.<p> <b>Username:</b> <br> <input type="text" name="username" class="text_box" size="25" title="You need a username, it will be publically seen all over the site. NO personal info." alt="You need a username, it will be publically seen all over the site. NO personal info."><br> <b>Password</b> <br> <input type="password" name="password" class="text_box" size="25" title="You need a password that you can remember but others cannot guess." alt="You need a password that you can remember but others cannot guess."><p> <b>Password Confirm</b><br> <input type="password" name="password_confirm" class="text_box" size="25" title="Please enter the password you just written above here, again." alt="Please enter the password you just written above here, again."><p> <b>Email</b><br> <input type="text" name="email" class="text_box" size="30" title="Please enter your email address. We rarely email. Please talk to your parents first." alt="Please enter your email address. We rarely email. Please talk to your parents first."><p> <input type="submit" value="Register" class="text_box" alt="Click here to register your new account!" title="Click here to register your new account!"></form> <?php include("footer.php"); ?> Link to comment https://forums.phpfreaks.com/topic/100537-solved-parse-error-register/ Share on other sites More sharing options...
kenrbnsn Posted April 10, 2008 Share Posted April 10, 2008 You missing the closing brace for the else block that was opened here: <?php else { ?> Ken Link to comment https://forums.phpfreaks.com/topic/100537-solved-parse-error-register/#findComment-514231 Share on other sites More sharing options...
eaglelegend Posted April 10, 2008 Author Share Posted April 10, 2008 Thanks, but what lines were they? ??? Link to comment https://forums.phpfreaks.com/topic/100537-solved-parse-error-register/#findComment-514238 Share on other sites More sharing options...
eaglelegend Posted April 10, 2008 Author Share Posted April 10, 2008 hmm, it dont seem to be that, well im putting the end tag at just before the <?php include(footer.php) but there is still a parse error... EDIT: Thanks, but I just tucked it nicely after <?php at the include footer, at the bottom, now it works!, thanks guys! Link to comment https://forums.phpfreaks.com/topic/100537-solved-parse-error-register/#findComment-514241 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.