<?php
session_start();
$username = $_SESSION['username'];
/*
DELETE.PHP
Deletes a specific entry from the 'players' table
*/
$get = $_GET['id'];
// connect to the database
mysql_connect ("localhost","root","");
mysql_select_db ("pph") or die ("Could Not Select Database");
// check if the 'id' variable is set in URL, and check that it is valid
if (isset($_GET['id']) && is_numeric($_GET['id']))
{
// get id value
$id = $_GET['id'];
// select the entry
mysql_query ("SELECT * FROM pages WHERE pid='$get'") or die ("Query Erro on line 21");
$query = mysql_query("SELECT * FROM pages WHERE pageowner='$username'") or die ("jhgfrw");
$row = mysql_fetch_array($query);
if ($row['pageowner'] == $username)
print ("kj");
?>
<?php
$username = $_SESSION['username'];
// Lets echo the tables (We need to make a new style soon
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("pph", $con);
$result = mysql_query("SELECT * FROM pages");
$result = mysql_query ("SELECT * FROM pages WHERE pid ='$get'") or die ("Query Error");
while($row = mysql_fetch_array($result))
{
print ("Username<br>"); echo $row['pageowner'] . "<td> " . $row['pageinfo'];
$query = mysql_query("SELECT * FROM pages WHERE pageowner='$username'") or die ("jhgfrw");
$query = mysql_query("SELECT * FROM pages WHERE pageowner='$$get'") or die ("jhgfrw");
echo "<br /><br><br>";
}
mysql_close($con);
}
die ("");
?>