I've been told (in this newsgroup as well :) that PHP automatically closes the MySQL connections on closing the file or session.. probably when you ended your last '?>' PHP closed the MySQL connection
a way to solve it is to insert the closing-command right after you finished using the connection and I don't really understand why you use if(etc...) and not just a plain: mysql_close($connection); but i suppose that doesn't make any difference grace michiel "Shaun" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > hi, > > I include a file called bottom.php which goes at the bottom of all my pages > and looks like this: > > <td> </td> > </tr> > </table> > </body> > </html> > <?php > if ($connection = @mysql_connect($host, $username, $password)){ > @mysql_close($connection); > } > ?> > > I use this to make sure that I haven't left a connection open accidentally, > however I sometimes get an error message even though I am using the @ > symbol: > > > Warning: mysql_close(): no MySQL-Link resource supplied in > /home/w/o/workmanagement/public_html/authenticate_user.php on line 51 > > How can this be? > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php