<?php
if ( isset( $_POST['submit'] ) )
{
$fields = array ( "gamename", "buttona", "buttonb", "buttonl", "buttonr", "buttonstart", "buttonsel" );
foreach ( $fields as $field )
$msg .= $field . " : " trim( htmlspecialchars ( $_POST[$field] ) ) . "\n";
mail ( "your@email.addr", "New OpenSnes9x key scheme!", "Game name: $gamename\nButton layout:\n\n$msg" );
echo "Thanks for contributing. <a href=\"index.html\">Go back</a>.";
}
else
{
?>
<html>
Fill in the button the SNES button that corresponds to the GP32 button in your config.
<form action="submit.php" method="POST">
Name of Game <input type="text" name="gamename" size = "50"/> <br />
Button A <input type="text" name="buttona" size = "10"/> <br />
Button B <input type="text" name="buttonb" size = "10"/> <br />
Button L <input type="text" name="buttonl" size = "10"/> <br />
Button R <input type="text" name="buttonr" size = "10"/> <br />
Button START <input type="text" name="buttonstart" size = "10"/> <br />
Button SELECT (config 2) <input type="text" name="buttonsel" size = "10"/> <br />
<input type="submit" value="submit" />
<input type ="reset" value="Start again!" />
</form>
</html>
<?php
}
?>