Stewartiee
12-08-2009, 11:57 PM
Hey,
What i'm trying to do is get the session username, which is easy, but i'm finding it difficult to insert it into mysql.
The scenario is users who have permission can access an admin panel to add posts etc. I was their session username to be submitted along with posts so in the mysql table, their name will be beside their posts. I have tried a few codes with the latest being below. This might be really simple, and I have just overlooked something.
Any help is appreciated.
$_POST['username'] = $_SESSION['username'];
$author=$_POST['username'];
What i'm trying to do is get the session username, which is easy, but i'm finding it difficult to insert it into mysql.
The scenario is users who have permission can access an admin panel to add posts etc. I was their session username to be submitted along with posts so in the mysql table, their name will be beside their posts. I have tried a few codes with the latest being below. This might be really simple, and I have just overlooked something.
Any help is appreciated.
$_POST['username'] = $_SESSION['username'];
$author=$_POST['username'];