Bug #18114 Updated: php can't send data to database

From: Date: Tue, 02 Jul 2002 22:41:55 +0000
Subject: Bug #18114 Updated: php can't send data to database
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-12888@lists.php.net to get a copy of this message
ID: 18114 Updated by: bamnet111@netscape.net Reported By: bamnet111@netscape.net Status: Bogus Bug Type: MySQL related Operating System: Windows ME PHP Version: 4.2.1 New Comment: Well, my script calls for php to send data from a form into a database using the code below. Php should have displayed a Thnak you for your entery note to show it added the entrys. When I hit the submit button the page just clears the form. I have checked the mysql database and nothing is there. if ($submit) { // process form $db = mysql_connect("*****", "******", "******"); mysql_select_db("mydb",$db); $sql = "INSERT INTO employees (first,last,address,position) VALUES ('$first','$last','$address','$position')"; $result = mysql_query($sql); echo "Thank you! Information entered.\n"; } else{ This goes on to end php and create the form. Previous Comments: ------------------------------------------------------------------------ [2002-07-02 12:24:55] cynic@php.net Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. ------------------------------------------------------------------------ [2002-07-02 12:22:22] bamnet111@netscape.net I've setup php and mysql to setup a database. I create a form send data to the form but the dta won't go. I've tried using many different scripts but none of them can connect. I don't get a connect error ar any eror at all. How can i fix this problem? HELP ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18114&edit=1

« previous php.bugs (#12888) next »