Hello. I have setup the following but it is not inserting data from a form into a SQL database. Very simple layout but don’t know what i’m doing wrong.
Inside regworld.php (which is the user form)
[php]
Roam3D Username:
Roam3D Password:
Email Address:
Desired World Name:
Desired World Password:
Inside the processworld.php
[php]<?
$name=$_POST[‘name’];
$password=$_POST[‘password’];
$email=$_POST[‘email’];
$worldname=$_POST[‘worldname’];
$worldpass=$_POST[‘worldpass’];
$unixtime = time();
print $name;
print $password;
print $email;
print $worldname;
print $worldpass;
print $unixtime;
$link = mysql_connect(‘127.0.0.1:3406’, ‘root’, ‘7MV89t08!’);
if (!$link) {
die('Could not connect: ’ . mysql_error());
}
$result = mysql_query(“INSERT INTO v3d
.license
(name
, password
, licensed_users
, licensed_size
, created
, expiration
, last_started
, last_address
, hidden
, tourists_allowed
) VALUES (’$worldname’, ‘$worldpass’, ‘20’, ‘100’, ‘$unixtime’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’)”);
if (!$result) {
die('Invalid query: ’ . mysql_error());
}
Print “Account Added To Database!”;
?>[/php]
I’ve added some prints in there to see if it would echo back what was inputted into those fields but it shows me a blank php page when it gets to the process page. I’ve also added some if statements in case there were any errors, and again, no luck either. Just a complete blank process page and verified in the SQL database that no data is being added. Help? Thanks!