What I'm trying to do here is to register some object positioning data on my database. I tried to send the object data with this URL and its not working http://localhost/position/regpost.php?id=1&px=1&py=1&stats=1&frame=1
<?php
//db information
$db = "test";
$dbu = "user";
$dbp = "pass";
$host = "localhost";
//connect
$dblink = mysql_connect($host,$dbu,$dbp);
$seldb = mysql_select_db($db);
//I belive the problem is here
if(isset($_GET['id']) && isset($_GET['px']) && isset($_GET['py']) && isset($_GET['stats']) &&isset($_GET['frame'])){
$id = strip_tags(mysql_real_escape_string($_GET['id']));
$px = strip_tags(mysql_real_escape_string($_GET['px']));
$py = strip_tags(mysql_real_escape_string($_GET['py']));
$stats = strip_tags(mysql_real_escape_string($_GET['stats']));
$frame = strip_tags(mysql_real_escape_string($_GET['frame']));
$sql = mysql_query("INSERT INTO `$db`.`building` (`id`,`px`,`py`, `stats`,`frame`) VALUES ('$id','$px','$py','$stats','$frame');");
if($sql){
echo 'success';
}else{
echo 'fail';
}
}else{
echo 'variable not set';
}
mysql_close($dblink);//Close off the MySQL connection.
?>