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 Link to comment https://forums.phpfreaks.com/topic/124778-solved-need-some-simple-help-pls/ 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")); Link to comment https://forums.phpfreaks.com/topic/124778-solved-need-some-simple-help-pls/#findComment-644661 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.