|
|
I have created the login page and it redirects to where I want, and I have
successfully created sessions. But I have come up with another problem.
What if I have hidding certain information from the visitor e.g contact
telephone number? I only want the user to see it if they are logged in.
I have got this so far:
<?php if ($_SESSION['logged'] == "true") { echo ('<table border="0">
<tr>
<td valign="top">Contact:<?php echo
$row_job_results["rest_contact"]; ?></td>
<td valign="top">Contact Number: <?php echo
$row_job_results["rest_conttel"]; ?></td>
</tr>
</table>');} else echo ('<table border="0">
<tr>
<td valign="top"><a href="login.php">Login
to see this</a></td>
<td valign="top"><a href="login.php">Login
to see this</a></td>
</tr>
</table>');?>
If the session tells the script the person is not logged in they can click on
the link and login but once they are logged in they cannot go back to the same
page, without redoing the search.
Is there a way I can take them back to previous page once logged in?
|
|