spudly1987 Posted August 18, 2013 Share Posted August 18, 2013 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()); } ?> Quote Link to comment https://forums.phpfreaks.com/topic/281306-need-some-help-please/ Share on other sites More sharing options...
mac_gyver Posted August 18, 2013 Share Posted August 18, 2013 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. Quote Link to comment https://forums.phpfreaks.com/topic/281306-need-some-help-please/#findComment-1445689 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.