I have a database and I am trying to select a bit of info out of it using this:
When I do this is the mysql prompt thingy It works and I can view the information but when I run the php page all it says is:<?php
$db = @mysql_connect('localhost') or die ("Failed to connect to database!");
@mysql_select_db('brian', $db) or die ("Failed to connect to database!");
$text = mysql_query('SELECT text FROM website WHERE id=1') or die ("Invalid entry!");
and not what it is supposed to say which is: Welcome to my websiteResource id #3
Any ideas what could be wrong?
Thanks for any help,