calumrouge Posted December 4, 2006 Share Posted December 4, 2006 My Hosting is down. Could someone please tell me if the following will work:[font=Courier New][b]<?php$conn = mysql_connect("localhost","missionxgame_admin","PRIVATE");if (!$conn) { die('Could not connect: ' . mysql_error()); } if (mysql_query("CREATE DATABASE missionxgame_gamedb",$conn)) { echo "Database created"; }else { echo "Error creating database: " . mysql_error(); } mysql_select_db("missionxgame_gamedb", $conn);$sql = "CREATE TABLE Users (Person-ID int NOT NULL AUTO_INCREMENT, PRIMARY KEY(personID),Username varchar(15),Password varchar(20),E-mail varchar(100), )";mysql_query($sql,$conn);mysql_select_db("missionxgame_gamedb", $conn);mysql_query("INSERT INTO Users (Username,Password,E-mail) VALUES ('Admin', 'PRIVATE', 'calumrouge-uk@hotmail.co.uk')");?>[/b][/font] Quote Link to comment https://forums.phpfreaks.com/topic/29385-would-this-work/ Share on other sites More sharing options...
HuggieBear Posted December 4, 2006 Share Posted December 4, 2006 It looks OK, so long as the user you connect to the server with has the correct permissions.RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/29385-would-this-work/#findComment-134769 Share on other sites More sharing options...
Psycho Posted December 4, 2006 Share Posted December 4, 2006 [quote author=calumrouge link=topic=117284.msg478358#msg478358 date=1165233959]My Hosting is down. Could someone please tell me if the following will work[/quote]You should download XAMPP or some other local development environment. It will make your life much easier. Quote Link to comment https://forums.phpfreaks.com/topic/29385-would-this-work/#findComment-134930 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.