Connecting to a database

Connecting to a database

// This is an example of what's needed:
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = 'password';
$dbname = 'phpweb';

// This is the connection
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
mysql_select_db($dbname);

How to send email confirmation after form submission
Connecting to a database
Displaying database results
How to use an array
How to edit and replace data
Number format in PHP
Convert unix timestamp to Excel
Combine padding into one single line using CSS
Displaying year using PHP
404 redirect using htaccess
Highlight textarea on click
Htaccess maintenance redirect
Comment out lines in a htaccess file