Jump to content


Photo

I'm New and im stuck


  • Please log in to reply
3 replies to this topic

#1 Motas

Motas
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 02 September 2006 - 12:47 AM

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

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 02 September 2006 - 12:51 AM

Change $_REQUEST['submit'] to // $_REQUEST['submit']
Legend has it that reading the manual never killed anyone.
My site

#3 Motas

Motas
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 02 September 2006 - 12:54 AM

haha, how simple  :-\ thanks though  ;D

#4 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 02 September 2006 - 12:58 AM

Change:
$name = $_REQUEST['name'];
$name = $_REQUEST['email'];
$name = $_REQUEST['race'];

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

Legend has it that reading the manual never killed anyone.
My site




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users