I'm not exactly sure what the problem is with my code, but hopefully you all can help me figure it out.
There are four important files involved. We're making a text RPG written in PHP, and at the moment, I'm working on the registration file.
We've got header.php, which includes everything that we need to log into the database, included in our files with the include function.
<?php
echo "<html><body>
<h4>Character Setup</h4>
<form action='characterupdate.php' method='post'>
Name: <input name='name' type='text' />
<br>
Password: <input name='password' type='password' />
<br>
Class: <select name='class'>
<option>N/A</option>
</select>
<br>
<input type='submit' />
</form>
</body></html>";
?>
This is our charactercreation.php. It's supposed to post its data to charaacterupdate.php, which then inserts all data into the database.
<?php
include("header.php");
$name = $_POST['name'];
$password = $_POST['password'];
$password = md5($password);
$class = 0;
mysql_put("character", "id,name,password,class", ",".$name.",".$password.",".$class);
include("footer.php");
?>
This is our characterupdate.php. We created a function that's supposed to make mysql_query(INSERT INTO) easier (which is that mysql_put function up there), but I don't know if that's the problem or not. We've also tried using INSERT INTO, but that didn't work, either. I think the problem may be with the method that I'm using the POST data, but I have absolutely no clue.