";
echo "upass " . $upass;
echo "
";
echo "uuser " . $uuser;
echo "
";
echo "head " . $header;
echo "
";
echo "body " . $body;
echo "
";
echo "filepointer" . $filepointer;
$conn = new mysqli("localhost", "hkghjkghjkl", "fgjhgjfhgjhj", "sfdhgdfhfdhfsd");
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$stmt = $conn->prepare("SELECT * FROM jfjfghjghj where dfghdfhgh = ? AND
ghdfghfgdh = ? AND dfghdf = ?");
$stmt->bind_param('sss', $uuser,$upass,$uid);
$stmt->execute();
$result = $stmt->get_result();
if ($result->num_rows > 0){
$conn2 = new mysqli("localhost", "'kl;'lk;'l;kl;jk", "kghkjkghlkhlhjkl",
"ijkl;lk;jk;lk;");
// Check connection
if ($conn2->connect_error) {
die("Connection failed: " . $conn2->connect_error);
}
$sql2 = $conn2->prepare("SELECT `AUTO_INCREMENT` FROM fghjgfh WHERE TABLE_SCHEMA
= 'sdgsdfgdfsg'");
$sql2->execute();
$result2 = $sql2->get_result();
$value = $result2->fetch_column();
echo $value;
echo "authenticated";
$conn2 = new mysqli("localhost", "fghjhgjfghjgfjg", "hjklhjklkjl",
"gfghjfghjhg");
if ($conn2->connect_error) {
die("Connection failed: " . $conn2->connect_error);
}
$rand_info = rand(1111111111,9999999999);
//$json_to_insert = "{post:" . $body . ",header:" . $header ",postid": ,
"replys": [["bee", "hi myself"], ["admin", "asdf"], ["bee", "hi also"], ["admin",
"hi"]], "postedby": "testuser"}
$json_to_insert = "{\"post\":\"" . $body . "\",\"header\":\"" . $header . "\",
\"postid\":" . $rand_info . ",\"replys\":[],\"postedby\":\"" . $uuser .
\"filepointer\":\"". $filepointer . "\"}";
echo $json_to_insert;
//$rand_info = rand(1111111111,9999999999);
$sql = $conn2->prepare("INSERT INTO `hdfghdf` (`lhjljkhl`,`fkjhgkhjk`) VALUES (?,
?)");
$sql->bind_param('ss',$json_to_insert,$rand_info);
$sql->execute();
}
?>