Jump to content

need some help please


spudly1987

Recommended Posts

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());
}
?>
Link to comment
https://forums.phpfreaks.com/topic/281306-need-some-help-please/
Share on other sites

i finally figured out what your question/problem in this thread actually means, based on what you are trying to do in your other thread.

 

most shared web hosting only permits you to create a database through your hosting control panel and require a specific naming scheme to avoid conflict with the other accounts.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.