|Adam| Posted September 19, 2008 Share Posted September 19, 2008 This is probbly a pathetic question, but. If someone enters lets say a username and password into my form, how would i make the form add the information to the SQL? Simplest answer you'll probs ever have to give, but.. Help would be fantastic Thanks, Adam Link to comment https://forums.phpfreaks.com/topic/125021-putting-text-from-2-boxes-into-the-sql/ Share on other sites More sharing options...
waynew Posted September 20, 2008 Share Posted September 20, 2008 If you have a textfield called "username" $username = mysql_real_escape_string($_POST['username']); //Example query $insert = mysql_query("INSERT INTO users (username) VALUES ('$username')") or die(mysql_error()); Hope that gives you an idea. Link to comment https://forums.phpfreaks.com/topic/125021-putting-text-from-2-boxes-into-the-sql/#findComment-646059 Share on other sites More sharing options...
|Adam| Posted September 20, 2008 Author Share Posted September 20, 2008 I think i get it now, i'll give it a go. Link to comment https://forums.phpfreaks.com/topic/125021-putting-text-from-2-boxes-into-the-sql/#findComment-646062 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.