PHP Classes

strange

Recommend this page to a friend!

      Top level forums  >  PHP Specialists  >  General  >  strange  
Subject:strange
Summary:strange thing
Messages:2
Author:wisam hakim
Date:2012-04-29 13:58:39
Update:2012-04-30 11:42:38
 

  1. strange   Reply   Report abuse  
Picture of wisam hakim 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"

There is 1 reply in this thread, which is not being displayed.
Browsing this forum thread replies is available only to premium subscribers.


Go to the premium subscriptions page to learn how to become a premium subscriber and have full access to this forum.