Pi_Mastuh Posted August 26, 2006 Share Posted August 26, 2006 I need to make it so that when they hit the submit button the user's name is stored in the database. How do I do that? Quote Link to comment Share on other sites More sharing options...
shocker-z Posted August 26, 2006 Share Posted August 26, 2006 if ($_POST['submit']) {$username=mysql_real_escape_string($_POST['username']);$query=mysql_query("INSERT INTO table_name (ID, username) VALUES('','$username')");}thats a simple way but can be lots more advanced Quote Link to comment Share on other sites More sharing options...
whare Posted August 26, 2006 Share Posted August 26, 2006 i say this alot on here but this helped me loads so have a look at this....http://www.phpfreaks.com/tutorials/40/0.phpit will help you adding things to a db accessing them again and creating sessions ect ect. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.