using javascript and post?
Posted: Fri Nov 07, 2003 3:32 pm
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
$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