Change the names to reflect your connection to the database and the field names for the table and categories.
username = the name you need to connect to the database.
password = the password fo the database.
database_name = your name for the database.
table = the name of the table in the database.
field1 = the name of the rows (categories) in that table.
$sql = "select * from table";
$result = mysql_query ($sql);
while ($row = mysql_fetch_array($result))
my echo is just displaying the code instead of what is in the database. what am i doing wrong?
If you mean your page is showing php code then your webhost doesn't have php turned on. also make sure you use double quotes and not single quotes.
hey thanks so much for the script it worked perfect! Great instructions!
Thanks so much for this code! It is brilliant!
Adding your comment. Please wait...
Thanks for adding your comment!. After further review it will be added.
There was a problem adding your comment. Please try again.
Please complete all the fields in the form before sending.