alright thanks..w00t it shows data!
there is a parse error on the line below the 'elseif ($submit == "Edit")'
<?php
$connection = mysql_connect ("localhost", "user", "pass") or die ('I cannot connect to the database.');
mysql_select_db ("name") or die ("damn");
if ($submit == "Post")
{
$Body = str_replace(chr(13), "<br>", $Body);
$strSql = "INSERT INTO news (Title,Body,Time) VALUES ('$Title','$Body','$Time')";
$status = mysql_query ($strSql,$connection) or die ("Your Mojo is weak master, and it has failed.");
if ($status != false)
{
echo "It... is done. Your Mojo has been added master";
}
else
{
echo "Your Mojo is weak master, and it has failed.";
}
}
elseif ($submit == "Delete")
{
$strSql = "DELETE FROM news WHERE ID = '$ID'";
mysql_query ($strSql,$connection) or die ("Your DELETING is weak master, and it has failed.");
}
elseif ($submit == "Edit")
{
$sql = "SELECT Title, Body, Time FROM news WHERE ID = $edit";
$result = mysql_query($sql,$connection
//$Body = str_replace(chr(13), '<br>', '$Body')
//$strSql = "UPDATE news SET Body = '$Body',Title','$Title',Type = '$Type' WHERE ID = $ID";
//mysql_query ($strSql,$connection) or die ("Your UPDATING Mojo is weak master, and it has failed.");
echo "<form action=\"admin.php\" method=\"post\" name=\"editform\">";
echo "Title <input type=\"text\" name=\"TitleUP\" size=\"24\" value=\"".row['Title']."\" border=\"0\">";
echo "<p>Body:<br>";
echo "<textarea name=\"BodyUP\" rows=\"7\" cols=\"33\">".row['Body']."</textarea></p>";
echo "<p>Time: <input type=\"text\" name=\"TimeUP\" value=\"".row['Time']."\" border=\"0\"></p>";
echo "<input type=\"submit\" name=\"submit\" value=\"Update\" border=\"0\">";
echo "<p></p>";
echo "</form>";
}
mysql_close($connection); ?>