laserlight wrote:Post your updated code. Since you specified MSIE, does it mean that people can register using say, Mozilla Firefox or Opera?
Firefox and IE are the only two that i have tested with, Firefox works fine
Register.php
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>CMG - Register</title>
</head>
<body><p><center><img src=images/cmg.jpg width="281" height="215"></center></p>
<form action=register2.php method="POST">
<table width="313" height="224" border='1' align=center cellpadding='0' cellspacing='0'>
<tr id='cat'>
<tr>
<td bgcolor=#FFCC33 >In-Game Name<font face='verdana, arial, helvetica' size='2' align='center'> </font></td>
<td bgcolor=#FFCC33 ><font face='verdana, arial, helvetica' size='2' >
<input type ='text' class='bginput' name='igname' >
</font></td>
</tr>
<tr>
<td bgcolor=#FFCC33 >In-Game Tag<font face='verdana, arial, helvetica' size='2' align='center'> </font></td>
<td bgcolor=#FFCC33 ><font face='verdana, arial, helvetica' size='2' >
<input type ='text' class='bginput' name='igtag' maxlength=3>
</font></td>
</tr>
<tr>
<td bgcolor='#FFCC33' > FoM Forum Username <font face='verdana, arial, helvetica' size='2' align='center'> </font></td>
<td bgcolor='#FFCC33' ><font face='verdana, arial, helvetica' size='1' >
<input type ='text' class='bginput' name='fomun' >
</font></td>
</tr>
<tr>
<td bgcolor='#FFCC33' ><font face='verdana, arial, helvetica' size='2' align='center'>Proffesion</font></td>
<td bgcolor='#FFCC33' ><font face='verdana, arial, helvetica' size='1' >
<select name="prof">
<option value="1">Trader</option>
<option value="2">Combatant</option>
<option value="3">Medic</option>
<option value="4">Commander</option>
</select>
</font></td>
</tr>
<tr>
<td bgcolor='#FFCC33' >Department</td>
<td bgcolor='#FFCC33' ><font face='verdana, arial, helvetica' size='1' >
<select name="dept">
<option value="0">None</option>
<option value="1">Economic</option>
<option value="2">Military</option>
<option value="3">Political</option>
</select>
</font></td>
</tr>
<tr>
<td bgcolor='#FFCC33' ><font face='verdana, arial, helvetica' size='2' align='center'>Rank</font></td>
<td bgcolor='#FFCC33' ><font face='verdana, arial, helvetica' size='1' >
<select name="rank">
<option value="1">1 - Colonist</option>
<option value="2">2 - Miner</option>
<option value="3">3 - Trader</option>
<option value="4">4 - Supervisor</option>
<option value="5">5 - Magistrate</option>
<option value="6">6 - Secretary</option>
<option value="7">7 - Director</option>
</select>
</font></td>
</tr>
<tr>
<td bgcolor=#FFCC33 colspan='2' align='center'><font face='verdana, arial, helvetica' size='2' align='center'>
</font>
<p>We <font size="2" face="verdana, arial, helvetica" align="center">will have to confirm your registration, once we do, we will send you a mail IG with your username(which will be the same as your FoM forum username) and temporary password.</font></p>
</td>
</tr>
</table>
<center><input type=image src="images/register_button.gif" value=submit name=submit></center>
</form>
</body>
</html>
Register2.php
<?PHP
// MAKE CONNECTION
include ('db_connect.php');
// CHECK FIELDS
if ($_POST['igname'] && $_POST['igtag'] && $_POST['fomun'] && $_POST['submit']) {
echo "Hello $igname<br />";
echo insunuser($_POST);
}else{
echo "You did not fill in a required field.";
}
// INSERT INTO TABLE
function insunuser($postArr){
$pw = rand();
$insert = "INSERT INTO unusers (
`username` , `password` , `fomname` , `fomtag` , `profession` , `department` , `rank` )VALUES (
'$postArr[igname]',
'$pw',
'$postArr[fomun]',
'$postArr[igtag]',
'$postArr[prof]',
'$postArr[dept]',
'$postArr[rank]'
)";
$result = @mysql_query($insert);
// RETURN THE RESULT OF QUERY
if ($result) {
return "Your registration has been submited. We will review your registration and contact you in-game.";
}else{
return "There was an error: ".mysql_error();
}
}
?>