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:[EMAIL PROTECTED]] Sent: Sunday, April 07, 2002 9:44 AM To: [EMAIL PROTECTED] 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 [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php