Hey, sorry if this is so simple its already been posted countless times, but im kinda short on time. I'm struggling, I'm looking for PHP code, to allow me to connect to a My SQL database, and add records, delete records, modify records, and view records. I kow this can be done through the My SQL features on PHP and I believe, according to the book I'm using, that the following code is correct, but it does not seem to be working. Any help guys.
<?php
// connect to database server
$dbcnx = @mysql_connect ('isis.sunderland.ac.uk', '*', '*');
if (!$dbcnx) {
exit ("<p>Unable to connect to the '
'database server at this time.</p>");
}
if (!@mysql_select_db('cc2ake')) {
exit('<p>Unable to locate the joke ' .
'database at this time.</p>');
}
/?>
This is where i believe im having most problems as it does not seem to be connecting. Is this code correct to allow me to connect to a database. (i know the username and password will be different)