hi there. I've made a script that when it's success full it redirects the user to a success page. I'd like to display some information on that page such as username/e-mail and race and classes (its an mmorpg). Here is the code:
$query = "INSERT INTO user (user_id, user_name, first_name, last_name, password, email, remote_addr, date_created)
VALUES (NULL, '$User_name', '$First_name', '$Last_name', '$password', '$Email1', '$user_ip', NOW())";
$result = mysql_query($query);
if (!$result) {
$feedback = 'ERROR - MySQL has encountered a technical failure - contact the administrator,';
return $feedback;
} else {
echo "<script language=\"javascript\">";
echo "document.location='success.php'";
echo "</script>";
after the else part i was wondering what i should put to pass on information from this page to the next. The variables have already been set on this page but is there a way of carrying them through to the next page whilst still redirecting the browser using javascript? cheers
using javascript and post?
Moderator: General Moderators
-
shadow_blade47
- Forum Newbie
- Posts: 12
- Joined: Fri Nov 07, 2003 3:41 am
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
i dont believe so.. thats why i would've not even had a "success" page, and instead put whatever you wanted to say in your
part.. that way the variables would be there
you could always add session variables.. (either just their ID, and call the rest of the stuff on success.php using their ID, or all the variables)
Code: Select all
} else {
echo "<script language="javascript">";
echo "document.location='success.php'";
echo "</script>";you could always add session variables.. (either just their ID, and call the rest of the stuff on success.php using their ID, or all the variables)