Hi guys I'm rich and I'm new to this forum and I hope I can help you guys as well as helping me!
I have been to staffs uni and got a 2:2 in applied it so I know almost all the in's and out's about IT and PHP, I have taken a year out as my mum has been very ill but now its time to start looking for graduate jobs employers want to see my coding skills so that is why I'm recreating the website I did for my dissertation.
I'm using heart internet for my domain name and this is where I'm accessing the SQL database. I'm aslo using joomla as my CMS.
I'm creating a space where users can regsiter and log in and retive results from a quiz that I'm making or hoping to make from PHP code and link to my database.
I have been working with some code that I used while I was at uni along with some code that I found in a PHP book as well.
While at uni I connected using the MS Access connection and not with SQL!
Here is the connection string
<?php # mysql_connect.php
// This file contains the database access information.
// This file also establishes a connection to MySQL and selects the database.
// Set the database access information as constants.
DEFINE ('DB_USER', 'username');
DEFINE ('DB_PASSWORD', 'password');
DEFINE ('DB_HOST', 'localhost');
DEFINE ('DB_NAME', 'sitename');
// Make the connnection.
$dbc = @mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) OR die ('Could not connect to MySQL: ' . mysql_error() );
// Select the database.
@mysql_select_db (DB_NAME) OR die ('Could not select the database: ' . mysql_error() );
?>
I'm just a little stuck, I have the username and password, and I understand that I have to tell the 'DB name' is the name of my website?
But what is the local host? I'm using filezilla as my FTP to upload the PHP files
and help would be brilliant
Rich