RE: [PHP-DB] help with insert needed

From: Date: Sun, 07 Apr 2002 19:43:52 +0000
Subject: RE: [PHP-DB] help with insert needed
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-18296@lists.php.net to get a copy of this message
Hi Djordie, You need to have the connection to the DB in your php script leksikon_in.php . Gurhan -----Original Message----- From: Djordje Gacesa [mailto:castor@EUnet.yu] Sent: Sunday, April 07, 2002 9:44 AM To: php-db@lists.php.net Subject: [PHP-DB] help with insert needed Hello, everybody! I wrote some php scripts which are attached in php.zip file and there is also one important html (with forms for insert). All help and suggestions are appreciated. Just a note: system is on a Linux Slackware 8.0, with precompiled source of apache-1.3.20 and php-4.0.5 with tar.gz installation of mysql-3.23.47-log downloaded from mysql's site. After the installation mysql startup scripts needed some rearranging and rewriting until it started to work. So, I wrote a few scripts which duties are as following: 1. leksikon_out.php -- gets data out from the leksikon database (OK) 2. leksikon_in.php -- puts the data into the leksikon database (this piece doesn't work) 3. auth.php -- checks if the password is OK, and opens a persistent connection to mysql database (OK) 4. enough.php -- cloeses the connection to the database (register_shutdown_function() is used) (OK - it really closes the connection) As far as I know, until the connection is closed $server, $user, $database and $connection are somewhere in memory and can be used in any script.. After writing data into the fields of leksikon_in.html file, and hitting Send button, all that PHP & mySQL are giving to me is "No Database Selected". And so on. Even when I uncomment those three commented lines, nothing changes - it remains the same. I've tried the insert statement on the command line of mysql, and guess what - IT WORKED! What confuses me is that it doesn't work inside PHP.. I've spent 5 hours on that single line, changing it over and over, but i haven't manage to make a move of one milimeter. Help, please. Thanks. _________________ Nekada sam bio ljudsko biće... Onda sam dobio modem. djole icq#_34153905 castor@EUnet.yu

« previous php.db (#18296) next »