I do try to insert information into databace with mysqli but it doesn't work! The command seems to be correct!
$creg=mysqli_connect('localhost','uuu','uuu','pro5');
$sqreg="INSERT INTO tbl_users (username,name,lastname,password,email,gender,country,city,register_date,ip1) VALUES('$un','$na','$lnm','$ps','$eml','$ge','$co','$ci','$rdt','$ip')";
if (mysqli_query($creg, $sqreg) ) {
echo "Create successfully"."<br>";
echo $sqreg . "<br>" . mysqli_error($creg);
} else {
echo "Error: ";
}
and this is output
Create successfully
INSERT INTO tbl_users (username,name,lastname,password,email,gender,country,city,register_date,ip1) VALUES('dfvdfvd','vfd','dfv','fvdfvd','dfvdfv','1','1','1','0','0')
what is the problem?! thanks
"; echo $sqreg . "
" . mysqli_error($creg);` - um... that error, belongs in the `else{...}` should there be one. – Funk Forty Niner Jan 24 '18 at 19:49