0

i've two files one is send-data.php which contains html form and another one is receive-data.php, i am converting the form value as session value into second file and printing using echo. but it's not printing the output.

//send-data.php
<?php
session_start();              
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<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>
<form action="receive-data.php" method="post">
<input name="cardno" type="text" size="30" />
<input name="Send" type="submit" value="submit" />
</form>
</body>
</html>

//receive-data.php
<?php
session_start();
$_SESSION=['cardno']=$_POST['cardno'];
echo "Pageviews=". $_SESSION['cardno'];
?>
2
Contributors
2
Replies
12
Views
3 Years
Discussion Span
Last Post by blueguy777
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.