[PHP] Database connections

2001-04-01 Thread David Hynes
I'm using PHP on a windows box to access a MySQL database. I noticed that I do not need to open a database connection before performing a mysql_db_query(). Is this bad coding ? Should the database connection always be made ? Is this specific to Windows ? # $databaseConnection = mysql_connect

[PHP] sessions and cookies

2001-03-31 Thread David Hynes
I am using sessions to password protect a section of a website. I am storing the session ID in a cookie but just in case cookies are not enabled, I am also passing the session ID in the query string to each page in the protected directory. Please can someone tell me if this could cause any probl

[PHP] No-refresh

2001-03-30 Thread David Hynes
Does anyone know of a way to stop the user from refreshing a page several times. i.e if I add a value to a database using a form and PHP, I don't want the user to be able to simply press refresh and add the value to the database again. Please help, Dvaid. --- Fed202 Solution

[PHP] Maintaining state

2001-03-29 Thread David Hynes
What is the best method for tracking a user through a website ? I want to assign a username to a user which I can call up at anytime. Should I use htaccess files and the systems environment variables, or cookies ? Cheers, David. --- Fed202 Solutions www.fed202solutions.com M

[PHP] PHP vs Perl

2001-03-29 Thread David Hynes
Hi, I'm new to PHP (well I used it years ago), and have been using Perl ever since. Someone told me that PHP is a lot more efficient than Perl, is this true ? I am developing a fairly large website using a MySQL database running on a cobalt RAQ3 server and so the speed of the scripts must be kep