adamriley Posted January 14, 2010 Share Posted January 14, 2010 Hi is there a away to do this The bit that is wrong is the variable called "url_login" what i get it takes you to a 404 "The requested URL /Login/$url_login was not found on this server." Part of variables.php ------------------------------------------------------------------------------------------- $url_login ="http://localhost/Change/" ------------------------------------------------------------------------------------------- Loginwrite.php -------------------------------------------------------- <?php require_once $_SERVER['DOCUMENT_ROOT'] . '/Login/common.php';?> <?php require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/Variables.php';?> <?php $username = $_SESSION['userName']; $Date = date("F j, Y, g:i a"); $Login_page_file = fopen("Logindateabace.txt","a"); fwrite($Login_page_file, "$username:$Date\r\n"); fclose($Login_page_file);?> header('Location: $url_login'); --------------------------------------------------------- Link to comment https://forums.phpfreaks.com/topic/188479-variable/ Share on other sites More sharing options...
monkeytooth Posted January 14, 2010 Share Posted January 14, 2010 The way that last header is writen, its not written to accept $url_login as a php variable, its written to use $url_login as an exact string. Try changing it from what it is to: header('Location: ' . $url_login); $url_login has to be defined as well. to the URL you want it to go to Link to comment https://forums.phpfreaks.com/topic/188479-variable/#findComment-995039 Share on other sites More sharing options...
adamriley Posted January 14, 2010 Author Share Posted January 14, 2010 Hi thanks it now works and it is defined in the file called "variables.php" that i displayed in my first post Link to comment https://forums.phpfreaks.com/topic/188479-variable/#findComment-995043 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.