Jump to content

Archived

This topic is now archived and is closed to further replies.

Motas

I'm New and im stuck

Recommended Posts

these are my two scripts the second is which im having trouble iwth on line 15::
<html>
<head>
<title>Registration</title>
</head>
<body>
<!-- Character Registration Form start -->
<form action="handle_form.php" method="post">

<fieldset><legend>Enter Character Information</legend>

<p><b>Name:</b> <input type="text" name="name" size="20" maxlength="40"/></p>

<p><b>Email:</b> <input type="text" name="email" size="40" maxlength="60" /></p>

<p><b>Gender:</b> <input type="radio" name="gender" value="M" /> Male <input type="radio" name="gender"
value="F" />Female <p>

<p><b>Race:</b>
<select name="race">
<option value="Gnome">Gnome</option>
<option value="Elven">Elven</option>
<option value="Human">Human</option>
<option value="Alien">Alien</option>
<option value="Animal">Animal</option>
</select></p>
</fieldset>
<div align="center"><input type="submit"
name="submit" value="Register" /></div>

</form>

</body>
</html>
------------followed by------------
<html>
<head>
<title>Registration Complete!</title>
</head>
<body>
<?php
//calling registration

$name = $_REQUEST['name'];
$name = $_REQUEST['email'];
$name = $_REQUEST['race'];
//Not used: $_REQUEST['gender'], and
$_REQUEST['submit']

// show output
echo "<p>Thank you for registering, <b>$name</b><br \></p> <!-- problem this line -->
<p>You will recieve an activation link in your email at <i>$email</i>.</p>\n";
?>
</body>
</html>
- - -
help if you can, im just starting today and im lost x_x

Share this post


Link to post
Share on other sites
Change $_REQUEST['submit'] to // $_REQUEST['submit']

Share this post


Link to post
Share on other sites
Change:
[code]$name = $_REQUEST['name'];
$name = $_REQUEST['email'];
$name = $_REQUEST['race'];[/code]

To:
[code]$name = $_REQUEST['name'];
$email = $_REQUEST['email']; // edited
$race = $_REQUEST['race'];// edited[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.