Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

need some help please

$
0
0

okay i have everything i need to get things working for myself but need someone if at all possible to walk me through on how to recreate my database through this website if at all possible 

 

www.freehostingeu.com

<?php  
$host = "localhost"; // Host name
$username = ""; // Mysql username...please try and locate your mysql                 
                                  //configuration. i.e. your username and password. 
$password = ""; // Mysql password
// Connect to server
mysql_connect("$host", "$username", "$password") or die('ERROR: Cannot connect' .mysql_error());

mysql_query("CREATE DATABASE mydb");
//here is the newly added code..Selecting the database
mysql_query("USE mydb");

$sql = mysql_query( "CREATE TABLE UserNote (CustomerName varchar(255), Phone varchar(255), Email varchar(150), Issue varchar(255), Result varchar(255))");

if ($sql) {
echo "Database and table created succesfully";
}
else {
   die ('ERROR: Cannot connect'.mysql_error());
}
?>

Viewing all articles
Browse latest Browse all 13200

Trending Articles