Forum Moderators: coopster

Message Too Old, No Replies

form problem

         

tottyovi

3:05 pm on Jun 29, 2009 (gmt 0)

10+ Year Member



Hello,
I'm new in PHP and I'm still learning.
I just created a form and I have a problem.
Here you have the page source

HTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Simple Html form</title>
</head>
<body>

<form action="handle_form.php" method="post">
<fieldset><legend>Enter your information in the form below:</legend>

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

<p><b>Gender:</b><input type="radio" name="gender" id="gender" value="M" />Male<input type="radio" name="gender" id="gender" value="F" />Female</p>
<p><b>Age:</b><select name="age">
<option value="0-29">Under 30</option>
<option value="30-60">Betwen 30 and 60</option>
<option value="60+">Over 60</option></select></p>

<p><b>Comments:</b><textarea name="comments" id="comments" rows="3" cols="40"></textarea></p>
</fieldset>

<div align="center"><input type="submit" name="submit" value="Submit my information" /></div>
</form>

</body>
</html>

PHP:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Handle form</title>
</head>

<body>
<?php
//Creaza o forma prescurtata pentru datele din formular.

$name = $_REQUEST['name'];
$email = $_REQUEST['email'];
$comments = $_REQUEST['comments'];
//Nefolositeage, gender, submit

//Afiseaza informatiile transmise.

echo "<p>Thank you, <b>" . $name . "</b>, for the following comments:<br /><tt>" . $comments . "</tt></p><p>We will reply to you at <i>" . $email . "</i>.</p>";

?>
</body>
</html>

My problem that after I complete this html form it's appearing this(without dates from my form) :

Thank you, " . $name . ", for the following comments:
" . $comments . "

We will reply to you at " . $email . ".
"; ?>

I'm using wamp. Do you know what's the problem, please?
Thank you

tottyovi

12:49 pm on Jul 1, 2009 (gmt 0)

10+ Year Member



wow...so...the same thing, page white, BUT know I checked my others php files (which I created before)and I have the same problem also for these files....so is something wrong now. Should I install wamp again? Or what happened?
Thank you for your help, penders

tottyovi

1:08 pm on Jul 1, 2009 (gmt 0)

10+ Year Member



I uninstalled and installed again...and the same problem
:((
What can I do?

tottyovi

1:11 pm on Jul 1, 2009 (gmt 0)

10+ Year Member



No, it's working now!
Also my form...great...thank you very much
This 33 message thread spans 2 pages: 33