I need the code converted below to be able to connect to myonline domain
My code for my online domain. Also shows connection islive. Make the two php files connect to this!:
$servername = “localhost”;
$db_username = “jstedman”;
$db_password = “password”;
$dbname = “onlinejob”; //Database name
try
{
$conn = newPDO(“mysql:host=$servername;dbname=$dbname”, $db_username,$db_password);
// set the PDO error mode to exception
$conn->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
echo “Connected successfully onlinejob”;
} catch (PDOException $e)
{
echo “Connection failed: ” .$e->getMessage();
}
login-exec.php
//Start session
session_start();
//Include database connection details
require_once(‘includes/config.php’);
//Array to store validation errors
$errmsg_arr = array();
//Validation error flag
$errflag = false;
//Connect to mysql server
$link = mysql_connect(‘localhost’,’root’,””);