Hi, I can add to my game data to mysql with the code below, but I need help on how to edit published data by using id number,
I couldn't create the php code to edit the data by id number? I really need help...
[quote:3hrcfudm]<?php
$db = "tetuan_construct2";//Your database name
$dbu = "tetuan_construct";//Your database username
$dbp = "constructconstruct";//Your database users' password
$host = "localhost";//MySQL server - usually localhost
$dblink = mysqli_connect($host,$dbu,$dbp,$db);
if(isset($_GET['name'])){
$name = mysqli_real_escape_string($dblink,$_GET['name']);
$sql = mysqli_query($dblink, "INSERT INTO `$db`.`scores` (`id`,`name`) VALUES ('','$name');");
if($sql){
echo 'Success';
}else{
echo 'Error';
}
}else{
echo "Add ?name=NAME_HERE&score=1337 to the tags.";
}
mysqli_close($dblink);
?>