problems updating DB
Posted: Tue Nov 23, 2010 5:32 pm
hey pips i need help ...i try everything i know i rewrite my code five times today and problem is still here...my db user table wont update after registration
this is last code i wrote and it doesn't show any errors . and sug?
this is last code i wrote and it doesn't show any errors . and sug?
Code: Select all
<?
session_start();
//form
$first_name=$_POST['first_name'];
$last_name=$_POST['last_name'];
$gender=$_POST['gender'];
$year=$_POST['year'];
$address=$_POST['address'];
$town=$_POST['town'];
$state=$_POST['state'];
$phone=$_POST['phone'];
$mail=$_POST['mail'];
$username=$_POST['username'];
$password=$_POST['password'];
$repassword=$_POST['repassword'];
//submit
$submit=$_POST['submit'];
if ($submit){
if(($first_name==null) || ($last_name==null) || ($gender==null) || ($year==null) || ($address==null) || ($town==null)|| ($state==null) || ($phone==null) || ($mail==null) || ($username==null) || ($password==null) || ($repassword==null))
{
include("error_register.php");
}
else
{
if ($password==$repassword)
{ if
(strlen($password)>25 || strlen($repasseord)<6)
{
// pass_len
}
else {
//registrirajme
//enc pass.
$password=md5($password);
$repassword=md5($repassword);
//connect db
include("db.php");
$conn=mysql_connect($host,$user,$pass);
mysql_select_db($database,$conn);
}
//
//else { //razlicna len
//include ('pass_notmech.hmtl'); }
$query1="
INSERT INTO korisnici (first_name, last_name,gender,year,address,town,country,phone,mail,username,password)
VALUES ('','$first_name','$last_name','$gender','$year','$address','$town','$country','$phone','$mail','$username','$password')"
//die
// you have been register please return to login page/
//)
;
mysql_query($query1);
}}}
?>