Purpose:
The main purpose of this topic is to ask for help on how to create a database online, and be able to post and read from it, in-game.
So Far:
Here is what I have done so far:
1. Created a website on 000webhosts.com
2. Setup an account
3. Created my site and domain
4. Setup a MySQL database
Problems:
1. I have no idea what to do, what functions to use, and can't find tutorials anywhere.
2. There is an error in my PHP script
(SlickSilver gave me a ref to use)
What I could use help with:
Everything... I will post the PHP script I am using [The passwords will be starred out, so don't think I literally put those in]
Current Questions:
How do I connect to the site?
How do I read and post from a MySQL database?
My vocab in this may make no sense to those of you who know what to do, since I'm pretending to know what I'm talking about.
Here is my PHP script:
<html>
<body>
Welcome to Lilboarder's Page
<?php
$con = mysql_connect("mysql12.000webhost.com","********_******","*******");
if(!$con)
die("Oh no! There seems to be a problem! It is: " . mysql_error());
$sql = "CREATE TABLE PlayerList
(
Name varchar(15)
BL_ID varchar(15)
)";
if(mysql_query($sql,$con))
echo "Table created.";
mysql_select_db("********_******", $con);
$result = mysql_query("SELECT * FROM Table_Name ORDER BY BL_ID");
while($row = mysql_fetch_array($result))
echo $row['Name'] . " " . $row['BL_ID'] . "<br \>";
mysql_close($con);
?>
</body>
</html>
Attached is the file I used as a reference (By that I mean copy and paste then fill in details)
Any and all help is very much appreciated. I have been in want of this information for a while now.