Jump to content

I need this Html converting in to PHP (send_form_email)


Dringala

Recommended Posts

this is the html

<table width="450px" align="center">

          <body><form name="contactform" method="post" action="send_form_email.php"><tr>

            <td valign="top"><font color="#666666" face="Franklin Gothic Book">

              <label for="first_name">First Name :</label>

            </font></td>

            <td valign="top"><font color="#666666" face="Franklin Gothic Book">

            <input  type="text" name="first_name" maxlength="50" size="30">           

            </font></td>

          </tr>

          <tr>

            <td valign="top""><font color="#666666" face="Franklin Gothic Book">

              <label for="last_name">Last Name :</label>

            </font></td>

            <td valign="top"><font color="#666666" face="Franklin Gothic Book">

            <input  type="text" name="last_name" maxlength="50" size="30">           

            </font></td>

          </tr>

          <tr>

            <td valign="top"><font color="#666666" face="Franklin Gothic Book">

              <label for="email">Email Address : </label>

            </font></td>

            <td valign="top"><font color="#666666" face="Franklin Gothic Book">

            <input  type="text" name="email" maxlength="80" size="30">           

            </font></td>

          </tr>

 

      <td valign="top"><font color="#666666" face="Franklin Gothic Book">

        <label for="telephone">Telephone Number</label>

          :</font></td>

            <td valign="top"><font color="#666666" face="Franklin Gothic Book">

            <input  type="text" name="telephone" maxlength="30" size="30">           

            </font></td>

          </tr>

          <tr>

            <td valign="top"><font color="#666666" face="Franklin Gothic Book">

              <label for="telephone">Services Needed</label>

            :</font></td>

            <td valign="top"><font color="#666666" face="Franklin Gothic Book">

            <input type="checkbox" name="checkbox" value="checkbox" id="checkbox">

              <label for="checkbox">Web Design<br>

              <input type="checkbox" name="checkbox2" value="checkbox" id="checkbox2">

            Logo Design<br>

            <input type="checkbox" name="checkbox3" value="checkbox" id="checkbox3">

            Design for Print              </label>

            </font></td>

          </tr>

          <tr>

            <td valign="top"><font color="#666666" face="Franklin Gothic Book">

              <label for="comments">Additional Comments : </label>

            </font></td>

            <td valign="top"><font color="#666666" face="Franklin Gothic Book">

              <textarea  name="comments" maxlength="1000" cols="25" rows="6"></textarea>

            </font></td>

          </tr>

          <tr>

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

        </table>

Link to comment
Share on other sites

Hi, the reason you are getting the wrong info sent back to you via the form is because you have not declared a numerical 'value'. The value at the moment says 'checkbox' it should really be the number '1' as checkboxes are based on simple logic (boolean) that's to say they are either checked (YES) or not (NO) where (YES = 1) and (NO = 0) Since only the 'value' of the checkboxes selected are sent back in the form.

 

You don't need any PHP in this form, all you need do is make sure you have a php page named send_form_email.php which is the page you have declared as the action part of the form!

 

There is a good tutorial HERE if you are not sure how to go about writing a PHP page to manipulate the form data.

 

Mary

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.