wisam hakim - 2012-04-30 02:10:02
Hello guys
I have two files
the first is
page1.php contain this code
<?php
session_start();
function go_to($href){
print "<script language='javascript'>document.location.href='".$href."'</script>";
}
if(isset($_POST["save"])){
$_SESSION["message"]="message1";
go_to("page2.php");
}
$_SESSION["message"]="Null";
?>
<form method="post" action="">
<input type="submit" name="save">
</form>
and the seconde is
page2.php contain this code
<?
session_start();
print "(".$_SESSION["message"].")";
?>
I expected that the message will be "message1" not "Null"
Please could any one help me to get "message1"