noisyscanner Posted April 25, 2009 Share Posted April 25, 2009 My form handler: <?php mysql_connect("localhost","user","pass"); mysql_select_db("db"); mysql_query("INSERT INTO userpage (`wmsg`) VALUES ('$_POST[msg]')") or die(mysql_error()); ?> I submit the form but when I check phpmyadmin it has inserted blank info. There has got to be something wrong here. Please help. Quote Link to comment https://forums.phpfreaks.com/topic/155606-why-is-my-text-box-not-inserting-data-into-the-mysql-database/ Share on other sites More sharing options...
Mchl Posted April 25, 2009 Share Posted April 25, 2009 echo $_POST['msg'] to see if there's anything in it actually Quote Link to comment https://forums.phpfreaks.com/topic/155606-why-is-my-text-box-not-inserting-data-into-the-mysql-database/#findComment-818944 Share on other sites More sharing options...
noisyscanner Posted April 25, 2009 Author Share Posted April 25, 2009 It echo's nothing Quote Link to comment https://forums.phpfreaks.com/topic/155606-why-is-my-text-box-not-inserting-data-into-the-mysql-database/#findComment-818952 Share on other sites More sharing options...
Mchl Posted April 25, 2009 Share Posted April 25, 2009 Probably something wrong with your form. Quote Link to comment https://forums.phpfreaks.com/topic/155606-why-is-my-text-box-not-inserting-data-into-the-mysql-database/#findComment-818954 Share on other sites More sharing options...
fenway Posted April 27, 2009 Share Posted April 27, 2009 How about echo-ing the sql statment? Quote Link to comment https://forums.phpfreaks.com/topic/155606-why-is-my-text-box-not-inserting-data-into-the-mysql-database/#findComment-819973 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.