print user name using session


print user name using session
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>

<?php
Session_Start();

$_SESSION['FName']='wasiq';
$_SESSION['LName']='khan';



echo $_SESSION['FName'];
echo $_SESSION['LName'];


?>
<form action="session2.php" method="post">
Name::<input type="text" name="nametext" value="">
FName::<input type="text" name="fnametext" value="">

<input type="submit" name="go" value="enter" />
</form>

</body>
</html>




any other page

<?php
session_start();
echo $_SESSION['FName'];

$name=$_POST['nametext'];
$fname=$_POST['fnametext'];
echo $name.$fname;

?>
0 comments:

Post a Comment

Followers

Powered by Blogger.

Popular Posts

Recent Posts

From Twitter

Receive All Updates Via Facebook. Just Click the Like Button Below...


Powered By Soft-Technologies
Skip To Continue

Custom content

Template Information

Template Information

Test Footer 2