PHP or HTML Question on Forms

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John

    PHP or HTML Question on Forms

    Hello,


    Sorry if this is posted in the wrong area.


    I have an html file that has a contact form at the bottom.

    I didn't write the html file, but it appears that I'm missing
    something to actually receive the email. I know of several scripts
    that are forms to email, but I'm not sure how to connect it to the
    form..


    Here is my code.



    form action="">
    <fieldset>
    <fieldset><lege nd>Contact</legend<label for="name">Name :</label>
    <input name="name" id="name" class="textbox" value="your name here"
    size="30" type="text" /><br />

    <label for="email">Ema il:</label<input name="email" id="email"
    class="textbox" value="youremai l@wherever.com" size="30" type="text"
    /><br />

    <label for="comments"> Comments:</label<textarea name="comments"
    id="comments" class="textbox" rows="8" cols="30">Comme nts
    here</textarea<br />

    <input class="submitbu tton" value="Send Mail;" type="submit" /><br
    />

    </fieldset>

    </fieldset>

    </form>



    Any help would be appreciated.



    Thanks!
  • Jerry Stuckle

    #2
    Re: PHP or HTML Question on Forms

    John wrote:
    Hello,
    >
    >
    Sorry if this is posted in the wrong area.
    >
    >
    I have an html file that has a contact form at the bottom.
    >
    I didn't write the html file, but it appears that I'm missing
    something to actually receive the email. I know of several scripts
    that are forms to email, but I'm not sure how to connect it to the
    form..
    >
    >
    Here is my code.
    >
    >
    >
    form action="">
    <fieldset>
    <fieldset><lege nd>Contact</legend<label for="name">Name :</label>
    <input name="name" id="name" class="textbox" value="your name here"
    size="30" type="text" /><br />
    >
    <label for="email">Ema il:</label<input name="email" id="email"
    class="textbox" value="youremai l@wherever.com" size="30" type="text"
    /><br />
    >
    <label for="comments"> Comments:</label<textarea name="comments"
    id="comments" class="textbox" rows="8" cols="30">Comme nts
    here</textarea<br />
    >
    <input class="submitbu tton" value="Send Mail;" type="submit" /><br
    />
    >
    </fieldset>
    >
    </fieldset>
    >
    </form>
    >
    >
    >
    Any help would be appreciated.
    >
    >
    >
    Thanks!
    You need to have another page (or code in this page) to accept the
    parameters, parse and validate them, then create the mail message and
    send it to your MTA.

    You can do this in PHP or any of a number of different scripting
    languages. But if you don't watch it, your script can become a way for
    spammers to send their mail - quickly getting you blacklisted and
    possibly your hosting account canceled.

    Much better to get a complete script to do the work. There are a number
    of them available on the net.

    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    • CFC4N

      #3
      Re: PHP or HTML Question on Forms

      GB2312
      =============== ==
      FORM ÖеÄACTION
      ûÓнÓÊÕÒ³Ãæ`£¬ ËùÒÔÄãËùÌá½»µÄÐ ÅÏ¢ÎÞ·¨Ö´ÐÐ
      Ð޸ģº
      <form action="">
      ÕâÀï""ÖÐÈç¹ûÊÇÁ íÍâµÄÒ³Ãæ¾ÍÖ±½Ó ÌîдURL

      Èç¹ûÊǵ±Ç°Ò³Ãæ¾ ÍÓÃÆäËûº¯Êý
      <input class="submitbu tton" value="Send Mail;" type="submit" />
      ÕâÀïÒ²µÄÐ޸졏 øÄã¸öÀý×Ó°É£¡
      E.G:
      <form method="POST" action="">
      ÄãÒªÕÒϺÃ×?:
      <input name="file" size="20">
      <input type="hidden" name="do" value="Go">
      <input type="submit" value="TMDÈÃÎÒ¿ ´">
      </form>
      Õâ¸ö¾ÍÊÇÌá½»µ½Í ¬Ò»Ò³ÃæµÄ
      ½ÓÊÕ²¿·Öº¯ÊýÊÇ:
      if ($_POST['do'] == 'Go')
      {
      $file=$_POST["file"];
      if(!file_exists ($file))
      {
      die("<font color=red>ÎÒÊÇÖ »Öí,ÎÒÕÒ²»µ½Õ⸠öÎļþ!</font>");
      }
      highlight_file( $file);
      }
      ?>

      =============== =====
      I'm Chinese! ^_^
      MSN:cfc4n@hotma il.com

      Comment

      Working...