<?php require_once("config.php"); ?>
<?php
if(isset($_POST['signup'])){ >gives no error, but does not post
extract($_POST);
$sql="select * from users where (username='$username' or email='$email');";
$res=mysqli_query($link,$sql);
if (mysqli_num_rows($res) > 0) {
$row = mysqli_fetch_assoc($res);
if($username==$row['username'])
{
$error[] ='Username alredy Exists.';
}
if($email==$row['email'])
{
$error[] ='Email alredy Exists.';
}
}
if(!isset($error)){
$options = array("cost"=>4);
$password = password_hash($password,PASSWORD_BCRYPT,$options); > password hash
$result = mysqli_query($link,"INSERT into users(username,password,email,address,country,city) values('$username','$password','$username','$email','$address','$country','$city')");
if($result)
{
$done=2;
}
else{
$error[] ='Failed : Something went wrong';
}
}
} ?>
what am i doing wrong? kinda just starting out php programming, tried adding more variables to a registration form and it just stopped posting data. any help would be really appreciated!