Here's an example of code:

I have multiple page form. When the submit of each page is clicked it calls
a php script that then opens the dbase, checks if the user has already
replied to the page (for those who use the back arrow  of the browser),
writes the data, and then calls the next page.

Here's one script:



 $query = "INSERT INTO habits
$result = mysql_query($query);

if  ($readcurrent == "yes") {
 header("Location: ../pages/sections.php");
else {
 header("Location: ../pages/category1.php");

The connection file looks like this:

$connection = mysql_connect($host,$user,$password)
       or die ("couldn't connect to server");
        $db = mysql_select_db($database,$connection)
       or die ("Couldn't select database");

One question that has arisen from all this is whether I should be using
pconnect() rather than connect()?
Thanks for the info so far.

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to