Hello!
There are a few issues I'll address here.
Firstly, that PHP error means the mysql resource handler is invalid. In this case it's because there's an SQL error in the create table statement which is stopping the table being created, and that is in turn stopping the select from working.
The next thing I'm going to ask is why are you creating the table on the fly like that? I'm not sure if you're just testing things out, and if so that's cool, but if that table already exists, running that is going to cause issues. Generally you want to create the table once, then just add data to it with INSERT or UPDATE statements as you're doing.
Anyway, the create table statement is indeed failing, because 'date' is a reserved keyword. It's good practice to name date fields something other than 'date', but if you do need the field to be called that for whatever reason, you can escape it with backticks (the character to the left of the 1 key on your keyboard).
I've quickly re-written the code for you, but haven't tested it, so there's a chance there are errors with it. I've gotta run but if it doesn't work let me know.
<?php
error_reporting(E_ALL);
// Always escape user input - $_GET, $_POST and $_REQUEST should always have at least addslashes(); run on them
$title = mysql_real_escape_string($_GET['title']);
$body = mysql_real_escape_string($_GET['body']);
$by = mysql_real_escape_string($_GET['by']);
$date = mysql_real_escape_string($_GET['date']);
$con = mysql_connect("localhost","my username","my password");
if (!$con) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db("spowpow1_touchnews", $con);
// Create table (If it doesn't already exist)
// Note, that 'date' should probably not be called date, and also, if you
// want date functionality, you should make it a DATE/DATETIME field
$sql = 'CREATE TABLE `news` (
`title` varchar(30),
`body` text,
`date` text,
`by` text
)';
mysql_query($sql, $con) or die("Error creating database: " . mysql_error());
echo "Database Table Created...<br>";
// Inserting Data
mysql_query("INSERT INTO news (title, body, date, by) VALUES ('{$title}', '{$body}', '{$date}', '{$by}')", $con) or die("Error inserting data: " . mysql_error());
echo "Data Inserted...<br><br>";
//Displaying Data
$result = mysql_query("SELECT * FROM news", $con);
?>
<table border='1'>
<tr>
<th>Title</th>
<th>Body</th>
<th>Date</th>
<th>By</th>
</tr>
<?php
while($row = mysql_fetch_array($result)) {
echo "<tr>";
echo "<td>" . $row['title'] . "</td>";
echo "<td>" . $row['body'] . "</td>";
echo "<td>" . $row['date'] . "</td>";
echo "<td>" . $row['by'] . "</td>";
echo "</tr>";
}
?>
</table>
<?php
mysql_close($con);
?>