View Single Post
Old 05-03-2005, 02:33 PM   #20 (permalink)
BUFFY
Registered User
 
Join Date: May 2005
Posts: 29
BUFFY is on a distinguished road
Tried the quick fix and removing the else statement. Didn't change much.

I then put just the form on register.php and in the form action directed it to reg.inc.php. When the register button was pressed the page loaded reg.inc.php with "Thank you! Information entered" but the database had not been updated (added to from reg details).

reg.inc.php
PHP Code:
<?PHP
include 'connect.inc.php';

//for new PHP
$title=$_GET[title];
$firstname=$_GET[firstname];
$lastname=$_GET[lastname];
$username=$_GET[username];
$password=$_GET[password];
$suburb=$_GET[suburb];
$city=$_GET[city];
$phonenumber=$_GET[phonenumber];
$dob=$_GET[dob];

$sql "INSERT INTO customer SET
           (title, firstname, lastname, username, password, address, suburb, city, phonenumber, dob) 
           VALUES ('$title', '$firstname', '$lastname', '$username', '$password', '$address', '$suburb', '$city', '$phonenumber', '$dob')"
;
$result mysql_query($sql);
echo 
"Thank you! Information entered.\n";
?>
Used GET because its getting the data from the previous form... POST does the same thing and also doesn't add the info to the database.
BUFFY is offline   Reply With Quote