Help with html (php?)


A

Aaaaaaaa

Guest
could someone take the sourse for This and alter it to send the information to xxxxx@xxxxx.xxxx.

You might need php.

You can take credit.

Its for This site which is for listing opensnes9xgp ubtton configurations.

Im not very good at HTML .Any help would be really appreaciated!
 
Code:
<?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
}
?>

Just a 2 minute job. You need to change your email and index page links. Save this file as submit.php or change the FORM tag.
 
How do i get it to work?

I saved it as workingform.html . but when i tested it, i filles it in and click submit and it came up with a page cannot be displayed

Can I be on the gp32x.de index page?
 
Last edited by a moderator:
Right. Ive upleaded it to my server.

Its Here

fill it in with random stuff. submit.

it says page cannot be displayed.

I havnt uploaded it, ive just copies the code. what do I do?
 
Haha.... oops... no... it can't... anyone suggest a server that does?
 
Back
Top