corsoconnected
New Member
- Messages
- 6
- Reaction score
- 0
- Points
- 0
This was working fine before the move and migration. It connects to the server even if i use 'localhost' it still connects however my PHP page the refers to this connection comes back with the die error "No database selected.". On the actual scripting where 'My Data base Name Here' it actually contains the data base name. Any ideas why its no longer working!?
***************************************************************
<?php
$db = mysql_connect("mysql-boru.x10hosting.com", "******", "****") or die("Could not connect.");
if(!$db)
die("no db");
if(!mysql_select_db("My Data Base Name Here",$db))
die("No database selected.");
if(!get_magic_quotes_gpc())
{
$_GET = array_map('mysql_real_escape_string', $_GET);
$_POST = array_map('mysql_real_escape_string', $_POST);
$_COOKIE = array_map('mysql_real_escape_string', $_COOKIE);
}
else
{
$_GET = array_map('stripslashes', $_GET);
$_POST = array_map('stripslashes', $_POST);
$_COOKIE = array_map('stripslashes', $_COOKIE);
$_GET = array_map('mysql_real_escape_string', $_GET);
$_POST = array_map('mysql_real_escape_string', $_POST);
$_COOKIE = array_map('mysql_real_escape_string', $_COOKIE);
}
?>
***************************************************************
<?php
$db = mysql_connect("mysql-boru.x10hosting.com", "******", "****") or die("Could not connect.");
if(!$db)
die("no db");
if(!mysql_select_db("My Data Base Name Here",$db))
die("No database selected.");
if(!get_magic_quotes_gpc())
{
$_GET = array_map('mysql_real_escape_string', $_GET);
$_POST = array_map('mysql_real_escape_string', $_POST);
$_COOKIE = array_map('mysql_real_escape_string', $_COOKIE);
}
else
{
$_GET = array_map('stripslashes', $_GET);
$_POST = array_map('stripslashes', $_POST);
$_COOKIE = array_map('stripslashes', $_COOKIE);
$_GET = array_map('mysql_real_escape_string', $_GET);
$_POST = array_map('mysql_real_escape_string', $_POST);
$_COOKIE = array_map('mysql_real_escape_string', $_COOKIE);
}
?>