I have a login.html page where the user logs in and their information; name and postcode displays. This information displays on the login.php page.
<?php
session_start();
echo "systemResult=Success";
$row=mysql_fetch_array($result);
echo $row['Name']." is located at".$row['Postcode'];
$_SESSION['name'] = $row['User_id'];
I want this information to display in a form on a different page and not on the page its displaying on at the moment. (Shown below)
<form name="form1" method="post" action="info.php">
<strong>info</strong>
<br />
<br />
Name: <input name="name" type="text" id="name" />
<br />
Postcode: <input name="postcode" type="text" id="postcode" />
<br />
</form
<div data-role="content">
<?php
session_start();
echo $_SESSION['user_id']
I have set the session up on the login.php page but it still displays information on the wrong page. On the 'info' page, the information does display but not in the forms.
To sum up, I want the information that displays in login.php to display in info.php so when the user logs in, it automatically takes them to info.php, displaying their inforamtion.
The information is coming from the phpmyadmin database.
Thanks in advance
Info.php page
<!DOCTYPE html>
<?php
session_start();
echo $_SESSION['user_id']
?>
<html>
</head>
<body>
<!-- Home -->
<div data-role="page" id="page1">
<div data-theme="a" data-role="header">
<a data-role="button" data-theme="c" href="menu.html" data-icon="arrow-l" data-iconpos="left" class="ui-btn-left">
Main Menu
</a>
<h3>
Your info
</h3>
</div>
<form name="form1" method="post" action="login.php">
<strong>Details</strong>
<br />
<br />
Name: <input name="name" type="text" id="name" />
<br />
Postcode: <input name="postcode" type="text" id="postcode" />
</form
</div>
</body>
</html>