Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.