NorseMan
Member
Ok, the connection gives no error now. I paste in on the line below:
<?php
try {
$pdo = new PDO('mysql:host=localhost; dbname=kjegri1_***;
charset=utf8', 'kjegri1_***', '**********');
$pdo->setAttribute(PDO::ATTR_ERRMODE,
PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
$output = 'Unable to connect to the datase server: ' ;
$e->getMessage() . ' in ' .
$e->getFile() . ':' . $e->getLine();
}
#include _DIR_.'../templates/output.html.php';
Now i get problems when i try to connect the file who contains the connection script (db_inc.php) to the ..... argh.... I start over.
When i open the register.php file in the browser i get a ERROR 500. The db_inc.php file is included in this with a included. I paste the script in below. Hope you can help me to find the error, because i dont. Nice if you could help me out with the session_start below also. What is intended to be inserted where I have marked with the 3 question marks between the single quotes? Or should this be emty without the single quotes?
<?php
include $ROOT.'/includes/db_inc.php';
session_start('???');
$ROOT = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']) . '/';
$HOST = 'http://' . $_SERVER['HTTP_HOST'] . '/';
<?php
try {
$pdo = new PDO('mysql:host=localhost; dbname=kjegri1_***;
charset=utf8', 'kjegri1_***', '**********');
$pdo->setAttribute(PDO::ATTR_ERRMODE,
PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
$output = 'Unable to connect to the datase server: ' ;
$e->getMessage() . ' in ' .
$e->getFile() . ':' . $e->getLine();
}
#include _DIR_.'../templates/output.html.php';
Now i get problems when i try to connect the file who contains the connection script (db_inc.php) to the ..... argh.... I start over.
When i open the register.php file in the browser i get a ERROR 500. The db_inc.php file is included in this with a included. I paste the script in below. Hope you can help me to find the error, because i dont. Nice if you could help me out with the session_start below also. What is intended to be inserted where I have marked with the 3 question marks between the single quotes? Or should this be emty without the single quotes?
<?php
include $ROOT.'/includes/db_inc.php';
session_start('???');
$ROOT = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']) . '/';
$HOST = 'http://' . $_SERVER['HTTP_HOST'] . '/';