Joined: Thu Feb 18, 2010 7:18 pm Posts: 1 Has thanked: 0 time Have thanks: 0 time
thank you for your share.
_________________ [url]bbs.prog365.com[/url] programmer sky, register ,you can get a free space.
msi_333
Question subject: Re: Tips for PHP scripts
Posted: Sat Feb 20, 2010 5:33 pm
Joined: Tue Mar 27, 2007 10:55 pm Posts: 2101 Location: Earth Has thanked: 39 time Have thanks: 56 time
Jayne Carreen wrote:
Hi, How do I take information from a session and add it to a database? I want to take the persons username of the person submitting a the form and add it to a database.
use session variable .
Code:
if(isset($_SESSION['username'])) { // code here to take value from $_SESSION['username'] } else { echo " User Not Logged In " ; }
_________________ Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )
cmcshane81
Question subject: Re: Tips for PHP scripts
Posted: Sun Feb 21, 2010 3:05 pm
Joined: Sun Feb 21, 2010 2:53 pm Posts: 3 Has thanked: 0 time Have thanks: 0 time
I'm new to PHP. Thanks for these tips, gonna try some of them out now.