Jump to content

Variable


adamriley

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.