Jump to content

Recommended Posts

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]
Link to comment
https://forums.phpfreaks.com/topic/29385-would-this-work/
Share on other sites

[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.
Link to comment
https://forums.phpfreaks.com/topic/29385-would-this-work/#findComment-134930
Share on other sites

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.