Hi guys,
I'm trying to insert into a mySQLi DB, but nothing is happening This is my code:
<?php
$db = "db";//Your database name
$dbu = "user";//Your database username
$dbp = "pass";//Your database users' password
$host = "host";//MySQL server - usually localhost
$dblink = mysqli_connect($host,$dbu,$dbp,$db);
if (!$dblink) { exit('Verbindung schlug fehl: '.mysqli_connect_error()); }
echo 'Verbindung zum Host steht!';
if(isset($_GET['name']) && isset($_GET['score'])&& isset($_GET['last_name'])&& isset($_GET['nickname'])&& isset($_GET['email'])){
$name = strip_tags(mysql_real_escape_string($_GET['name']));
$score = strip_tags(mysql_real_escape_string($_GET['score']));
$last_name = strip_tags(mysql_real_escape_string($_GET['last_name']));
$nickname = strip_tags(mysql_real_escape_string($_GET['nickname']));
$email = strip_tags(mysql_real_escape_string($_GET['email']));
$string = "INSERT INTO sbo_scores (id,name,score,last_name,nickname,email) VALUES ('','$name','$score','$last_name','$nickname','$email');";
$sql = mysqli_query($dblink, $string);
}else{
echo 'error.';
}
mysqli_close($dblink); //Close off the MySQL connection to save resources.
?>[/code:3ry24jy5]
Any ideas?