I've been away from Markup Language for several years so I'm worse than rusty. I'm trying to make a form that will come to my email address when sent. I can get it up on the website, but it gives me a 404. I'm doing something wrong, but not sure what it is. It may be the PHP at the top. I'm including the markup. Any assistence appreciated. Thanks.

<form name="htmlform" method="post" action="html_form_send.php">
<table width="475px">
</tr>
<tr>
<td valign="top">

<label for="first_name">First Name *</label>
</td>
<td valign="top">
<input type="text" name="first_name" maxlength="50" size="50">
</td>
</tr>

<tr>
<td valign="top"">
<label for="last_name">Last Name *</label>
</td>
<td valign="top">
<input type="text" name="last_name" maxlength="50" size="50">
</td>
</tr>
<tr>
<td valign="top">
<label for="email">Email Address *</label>
</td>
<td valign="top">
<input type="text" name="email" maxlength="80" size="50">
</td>

</tr>
<tr>
<td valign="top">
<label for="telephone">Telephone Number</label>
</td>
<td valign="top">
<input type="text" name="telephone" maxlength="30" size="50">
</td>
</tr>
<tr>
<td valign="top">
<label for="comments">Comments *</label>
</td>
<td valign="top">
<textarea name="comments" maxlength="1000" cols="45" rows="6"></textarea>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center">
<input type="submit" value="Submit">
<form action="MAILTO:giddyupgilbert@comcast.net">
</td>
</tr>
</table>
</form>

You have a large number of errors. I went through and indented it to make it lot easier to read. In short, your opening and closing tags are all screwed up, and you have to form actions, and two closing form tags. I'm not sure what that second form action is supposed to be.

Make sure that your path to the php file is correct in the first form action. It is pointing to the same folder that the file that holds the form is in. There maybe even more problems that I missed but I am getting ready to head to bed :)

<form name="htmlform" method="post" action="html_form_send.php">
    <table width="475px">

        <tr>
            <td valign="top">
                <label for="first_name">First Name *</label>
            </td>
            <td valign="top">
                <input type="text" name="first_name" maxlength="50" size="50">
            </td>
        </tr>

        <tr>
            <td valign="top"">
                <label for="last_name">Last Name *</label>
            </td>
            <td valign="top">
                <input type="text" name="last_name" maxlength="50" size="50">
            </td>
        </tr>

        <tr>
            <td valign="top">
                <label for="email">Email Address *</label>
            </td>
            <td valign="top">
                <input type="text" name="email" maxlength="80" size="50">
            </td>
        </tr>

        <tr>
            <td valign="top">
                <label for="telephone">Telephone Number</label>
            </td>
            <td valign="top">
                <input type="text" name="telephone" maxlength="30" size="50">
            </td>
        </tr>

        <tr>
            <td valign="top">
                <label for="comments">Comments *</label>
            </td>
            <td valign="top">
                <textarea name="comments" maxlength="1000" cols="45" rows="6"></textarea>
            </td>
        </tr>

        <tr>
            <td colspan="2" style="text-align:center">
                <input type="submit" value="Submit">
            </td>
        </tr>

    </table>
</form>

<form action="MAILTO:giddyupgilbert@comcast.net">

You are likely getting a 404 because when the form is submitted, the action specifies this page: html_form_send.php

Does that page exist?

Not sure why you have another form element towards the bottom with the mail to.

I actually want it to go to an email, not to a web page. When I take the PHP out it will bring up my email client addressed to the right email, but there is none of the info that was typed in. When I take the email off, of course, the PHP will then give the 404 error. I've replaced the PHP with email info and still getting the 404 error. So, I'm inputting something incorrectly.

I imagined you were sending the form data over to PHP to send the email to you, this is the typical behavior. If you're getting a 404 for the PHP, then it is because the path in the form action for the PHP file is incorrect.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.