spiderwebb Posted September 18, 2008 Share Posted September 18, 2008 Hi all How do I get the 2nd to last line of this code [[[die('Please proceed to <a href="profile.php">profile.php</a>');]]] to go to profile.php without the user having to click the link? //Everything OK, procceed if($message == NULL){ $_POST['user_email'] = mysql_escape_string($_POST['user_email']); $_POST['user_password'] = mysql_escape_string($_POST['user_password']); $get_user = mysql_fetch_assoc(mysql_query("SELECT * FROM `memb_userlist` WHERE `user_email`='$_POST[user_email]' AND `user_password`='$_POST[user_password]'")); if($get_user['user_email'] == $_POST['user_email']){ @session_start(); $usersession = generate_session(100); $host_name = '.'.str_replace('www.','',$_SERVER['HTTP_HOST']); setcookie("usersession", $usersession, time()+31104000000, "/", $host_name, 0); $_SESSION['usersession'] = $usersession; $user_ip = get_ip(); $insert_session = @mysql_query("INSERT INTO `memb_usersessions` (`session_id`,`user_id`,`session_date`) VALUES ('$usersession','$get_user[user_id]',NOW())"); $update_acces = @mysql_query("UPDATE `user_list` SET `last_access`= NOW(),`last_ip`='$user_ip' WHERE `user_id`='$get_user[user_id]' LIMIT 1"); die('Please proceed to <a href="profile.php">profile.php</a>'); } else{ $message = 'Invalid login credentials.'; } } } thanks in advance Quote Link to comment Share on other sites More sharing options...
spiderwebb Posted September 18, 2008 Author Share Posted September 18, 2008 Hi all worked it out for anyone else who needs to know replace die('Please proceed to <a href="profile.php">profile.php</a>'); with die(header("Location: profile.php")); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.