Help - Search - Members - Calendar
Full Version: Help with simple form and email script
HTMLHelp Forums > Programming > Server-side Scripting

This is my first post.

Here's my website:

I'm trying to create a simple one field form that posts the content directly to an email address.

This is the html for my form:

<table cellspacing="5" align="center">
<img src="" />
<form method="post" name="post" action="/email.php">
<input type="text" size="100" name="post">
<td valign="top">
<input type="image" src="" name="postbutton" alt="Post!">

This is the php script that I uploaded to the root directory:


$post = $_POST['post'];

$to = "";


Darin McGrew
This seems to be about PHP, so I'm moving it to the server-side programming forum.
Brian Chandler
Well, it's not clear what the question is, but the html syntax is messed up. <form>...</form> has to be a proper part of the syntactic tree, so it can go inside a <td>...</td> for example, or it can *contain* a <table>...</table>, but it can't straddle bits of the table such as ...</td><td>... as you have it.

I can't see particularly why this won't "work", but it is not safe for public use, since it can be used as a spam relay.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.