Join the forums now, and start posting to receive access to our Scripts Vault!
Username: <input type='text' name='username' id='username' value='{$smarty.post.username}' /><br /> Password: <input type='password' name='password' /><br /> Confirm Password: <input type='password' name='confirm' /><br /> Race:<select race_id="select" size="1"><option value="1">race1</option><option value="2">race2</option><option value="3">race3</option><option value="4">race4</option><option value="5">race5</option></select> <input type='submit' value='Register!' /> </form> <script type='text/javascript'> document.getElementById('username').focus(); </script> </body> </html>
$query = sprintf("INSERT INTO users(username,race_id,password) VALUES ('%s','%s','%s');", mysql_real_escape_string($_POST['username']), mysql_real_escape_string($_POST['race_id']), mysql_real_escape_string(md5($password))); mysql_query($query); $message = 'Congratulations, you registered successfully!';
<select race_id='select' size='1'>
<select name='race_id' size='1'>
One thing i wanted as a option for my game was various races, which is not covered in the basic tutorial.