Jump to content

Simple form


pneudralics

Recommended Posts

I'm starting to learn php and trying to create a simple form.

This is my html page:

[code]<form action="handle_post.php" method="post">

First Name: <input type"text" name="first_name" size="20" />
<br />
Last Name: <input type="text" name="last_name" size="20" />
<br />

Email Address: <input type="text" name="email" size="20" />

<br />

Posting: <textarea name="posting" rows="3" cols="30"></textarea>
<br />

<input type="submit" name"submit" value="Send My Posting" />
</form>[/code]

This is my handle_post.php page:

[code] <?php

$first_name = "$first_name";
$last_name = "$last_name";
$posting = "$posting";

$name = $first_name . ' ' . $last_name;

echo "thank you, $name, for posting the following: <br />
<p>$posting</p>";

?>[/code]

When I click the submit button it downloads instead of going to the php page. What did I do wrong? Thanks for helping this newbie out.
Link to comment
https://forums.phpfreaks.com/topic/3969-simple-form/
Share on other sites

Archived

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

×
×
  • Create New...

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.