Rother2005 Posted January 1, 2007 Share Posted January 1, 2007 hi im trying to get the user to see a screen after successful registration that says thanks for registering then auto redirecting them to another page (member.php)<?phpinclude('connect1.inc');?><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Booze Cruise Reg</title></head><body><?php if(!$_POST['register']){echo'<p align="center"><strong>Member Registration</strong></p><form name="form1" method="POST" action=""><p align="center">Username: <input type="text" name="username"></p><p align="center">Password: <input type="text" name="password"></p><p align="center">Firsname: <input type="text" name="firstname"></p><p align="center">Surname: <input type="text" name="surname"></p><p align="center">Address 1: <input type="text" name="address1"></p><p align="center">Address 2: <input type="text" name="address2"></p><p align="center">Town: <input type="text" name="town"></p><p align="center">County: <input type="text" name="county"></p><p align="center">Postcode: <input type="text" name="postcode"></p><p align="center">Tel No: <input type="text" name="telno"></p><p align="center">Mobile: <input type="text" name="mobile"></p><p align="center">Email: <input type="text" name="email"></p><p align="center"><input type="submit" name="register" value="Enter Details"></p></form>';} //27else{$username=$_POST['username'];$password=$_POST['password'];$firstname=$_POST['firstname'];$surname=$_POST['surname'];$address1=$_POST['address1'];$address2=$_POST['address2'];$town=$_POST['town'];$county=$_POST['county'];$postcode=$_POST['postcode'];$telno=$_POST['telno'];$mobile=$_POST['mobile'];$email=$_POST['email'];//encrypts password server side into md5 32bytes$password = stripslashes($password);$password = md5($password);$sql = "INSERT INTO member(Username,Password,Firstname,Surname,Address1,Address2,Town,County,Postcode,TelNo,Mobile,Email)VALUES ('$username','$password','$firstname','$surname','$address1','$address2','$town','$county','$postcode','$telno','$mobile','$email')";mysql_query($sql) or die(mysql_error());//40echo ("<meta http-equiv=\"Refresh\" content=\"2; URL=member.php\"/>Thank You! You will be redirected");</body></html>here is my code but i just keep getting error 'Parse error: parse error, unexpected '<' in C:\Program Files\xampp\htdocs\Loginpage.php on line 42'please if anyone can help me please dothanks in advance Link to comment https://forums.phpfreaks.com/topic/32463-solved-redirect-user-after-registration/ Share on other sites More sharing options...
dcro2 Posted January 1, 2007 Share Posted January 1, 2007 You need to end the PHP area with ?> before </body> Link to comment https://forums.phpfreaks.com/topic/32463-solved-redirect-user-after-registration/#findComment-150818 Share on other sites More sharing options...
Rother2005 Posted January 1, 2007 Author Share Posted January 1, 2007 hi ive changed the code to inculde the ?> on new line b4 </body>but now i getParse error: parse error, unexpected $end in C:\Program Files\xampp\htdocs\Loginpage.php on line 44//line 40echo ("<meta http-equiv=\"Refresh\" content=\"2; URL=member.php\"/>Thank You! You will be redirected");?></body></html> Link to comment https://forums.phpfreaks.com/topic/32463-solved-redirect-user-after-registration/#findComment-150820 Share on other sites More sharing options...
dcro2 Posted January 1, 2007 Share Posted January 1, 2007 You're missing a ending curly brace ( } ) to end the if:else Link to comment https://forums.phpfreaks.com/topic/32463-solved-redirect-user-after-registration/#findComment-150821 Share on other sites More sharing options...
Rother2005 Posted January 1, 2007 Author Share Posted January 1, 2007 sorry does it go at the end of $email=$_POST['email'];or after the values line? Link to comment https://forums.phpfreaks.com/topic/32463-solved-redirect-user-after-registration/#findComment-150822 Share on other sites More sharing options...
Rother2005 Posted January 1, 2007 Author Share Posted January 1, 2007 cracked it cheers Link to comment https://forums.phpfreaks.com/topic/32463-solved-redirect-user-after-registration/#findComment-150826 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.