When i run this script i get a Parse error on line 46 which is the ?> tag.
heres my code
PHP Code:
<?php
// Server
$dbserver = "localhost";
// Database Username
$dbuser = "user";
// Database Password
$dbpass = "pass";
// Database Name
$dbname = "db";
// Connects to database
$db = mysql_connect($dbserver,$dbuser,$dbpass) or die("Failed to cennect to mysql server on: $dbserver");
if(mysql_select_db($dbname)==false) { mysql_close($db); die("Failed to select database: $dbname"); }
// Lets select our record fields from our database table and check for results
$sql = "SELECT title, date, user FROM news";
$mysql_result = mysql_query($sql,$db);
// We carry out the table population using a 'while' loop