PHP sessions are unsetting when i click href php code [Closed]

- - Latest reply: ac3mark
Posts
10940
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
December 14, 2018
- Aug 2, 2016 at 05:07 PM
In index.php i am including 2 files
1. header.php
2. mainpage.php

in header .php I wrote code on visit it shows Welcome User
and also header.php have two links
1.login(drop down windows using bootstrap) ..if he press login...login form loads.. and
user fill form and submit..if valid details... user name will print...and
$_SESSION['loggedin'] is setting
2.after using login..mainpage.php will find loggedin session is setted..so some link i am giving
1.<a href="index.php?a='info'" rel="nofollow" target="_blank">information</a>
2.<a href="index.php?a=" rel="nofollow" target="_blank"edit"">Edit</a>

when i lick any one of link.. page is reloading and all session are unsetting..

How can i Over come this problem
See more 

1 reply

Posts
10940
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
December 14, 2018
0
Thank you
Well not certain, but your link is broken:
'info'

Remove the '

Try:

<a href="index.php?a=info" rel="nofollow" target="_blank">


And....

<a href="index.php" rel="nofollow" target="_blank">


Have fun!
It's kind of fun to do the impossible! -Walter Elias Disney