Blank form process page

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:

[/php]

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!

The server I am using is a Windows IIS 7.5 server with PHP 5.3 FastCGI and MySQL 5.1.

Thanks

I bow my head in shame :-[

Next time I should look more closely at whether or not the server allows short_open_tags. Figured out that’s why it wasn’t working. Doh…

Hi Matt,

First off, you may need to start your scripting block with <?php, not <?. If that doesn’t help, try to change your query:

$q=“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)”;
$result = mysql_query($q);

//If that doen’t help
$q=“INSERT INTO v3d.license
(name, password, licensed_users, licensed_size, created)
VALUES (’$worldname’, ‘$worldpass’, 20, 100, ‘$unixtime’)”;
$result = mysql_query($q);

Cheers,

Sponsor our Newsletter | Privacy Policy | Terms of Service