Data not saving to the database....
Posted by:
stevenazari
(---.dynamic.dsl.as9105.com)
Hello
just wanted to say hi - wasnt that a breath of fresh air?
..... ok seriously guys I love you for making this program - and you MUST keep up the good work
but in your own time of course ;o)
anyway I got mr wampserver installed (latest version! - ooooo) I had some initial teething problems with the header("location:example.html"
; code working but I think I have that done and dusted
) (yey)
but my only problem now (before I can really give it a go) is saving to the database.
I've done
<?php
require"conninfo.php";
?>
and I dont get any errors with the code held within that file (which is used to connect to my database) I have edited php.ini to report all errors (but still nothing)
So I have register.htm which is a form, which uses method="post" to send to register1.php which then adds that info to the database. My code in register1.php is:
-----------------------------------------------------
<?php
require"conninfo.php";
$username=$_POST["username"];
$password=$_POST["password"];
$firstname=$_POST["firstname"];
$surname=$_POST["surname"];
$dateofbirth=$_POST["dateofbirth"];
$gender=$_POST["gender"];
$email=$_POST["email"];
$address1=$_POST["address1"];
$address2=$_POST["address2"];
$city=$_POST["city"];
$country=$_POST["country"];
$postcode=$_POST["postcode"];
$telephone=$_POST["telephone"];
$query = "insert into members (username, password, firstname, surname, dateofbirth, gender, email, address1, address2, city, country, postcode, telephone) values ('$username','$password','$firstname','$surname','$dateofbirth','$gender','$email','$address1','$address2','$city','$country','$postcode','$telephone')";
header("location:registrationsuccess.html"
;
?>
----------------------------------------------------
As I said, I get no errors, but at the same time upon checking my database - I get no info saved there
s does anyone have any ideas why?
thanks a bazillion
mr shteven azari.
no you cant have what Im taking.