[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 ("localhost", "", "");  ## I don't
seem to need this line, or the last one
mysql_db_query("dbnam", "SQL query");
# mysql_close ($databaseConnection);

Thanks,
David.

---
Fed202 Solutions
www.fed202solutions.com
Mobile : 07779 293368
---


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[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 problems, especially if
the user if tries to access a URL from their history bar in the browser with
an old session ID.

i think what I'm trying to ask is , if the script receives a session ID from
a query string and cookie, which does it use ?

Thanks,
David.

---
Fed202 Solutions
www.fed202solutions.com
Mobile : 07779 293368
---


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[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 Solutions
www.fed202solutions.com
Mobile : 07779 293368
---


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[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 kept to a
minimum.  I have already started the site using Perl, but would it benefit
me to change to PHP4.

Thanks,
David.

---
Fed202 Solutions
www.fed202solutions.com
Mobile : 07779 293368
---


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[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
Mobile : 07779 293368
---


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]