I am trying to write a basic guide on MySQL but im having a bit of a problem highlighting my code this is what i am using
<?php highlight_string ("<?php
####################
#Tutorial by Jami3.co.uk#
####################
define ('DB_USER', 'username');
define ('DB_PASSWORD', 'username');
define ('DB_HOST', 'localhost'); #This will most likley be localhost if you know otherwise please change this to your settings
define ('DB_NAME', 'database name');
$dbc = @mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) OR die ('Could not connect to MySQL: ' . mysql_error() ); @mysql_select_db (DB_NAME) OR die (' Could not select the database: ' . mysql_error() ); ?> ")?>
But i get the following output
<?php
####################
#Tutorial by Jami3.co.uk#
####################
define ('DB_USER', 'username');
define ('DB_PASSWORD', 'username');
define ('DB_HOST', 'localhost'); #This will most likley be localhost if you know otherwise please change this to your settings
define ('DB_NAME', 'database name');
= @mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) OR die ('Could not connect to MySQL: ' . mysql_error() ); @mysql_select_db (DB_NAME) OR die (' Could not select the database: ' . mysql_error() ); ?>
instead of
<?php
####################
#Tutorial by Jami3.co.uk#
####################
define ('DB_USER', 'username');
define ('DB_PASSWORD', 'username');
define ('DB_HOST', 'localhost'); #This will most likley be localhost if you know otherwise please change this to your settings
define ('DB_NAME', 'database name');
$dbc = @mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) OR die ('Could not connect to MySQL: ' . mysql_error() ); @mysql_select_db (DB_NAME) OR die (' Could not select the database: ' . mysql_error() ); ?>
It is removing the $dbc for some reason
any advice?
what exactley is causing it and are there any easy alternatives?
See it in a action at http://www.jami3.co.uk/tutorial.php?MySQL_connect
Thanks
Jamie
Merry Xmas