+ Reply to Thread
Results 1 to 7 of 7

Thread: How to put a direct contact form on my page

  1. #1
    monster061 is offline x10Hosting Member monster061 is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Skopje, Macedonia
    Posts
    18

    How to put a direct contact form on my page

    Hello,

    I would like to put a contact place on my site (I really don't know how it is professionaly called) so people can input thier info in the boxes and write a message and in my case choose a model size ect (make reservations) and that info to go directly to a specified e-mail address.

    Something like the one on this page:
    http://www.pro-jump.co.uk/sitepage/R...mp-Elites.html

    So if anyone can offer any specific help I would appretiate it

    Thanks pals,

  2. #2
    taekwondokid42 is offline x10 Lieutenant taekwondokid42 is an unknown quantity at this point
    Join Date
    Aug 2007
    Posts
    268

    Re: How to put a direct contact form on my page

    The basic mail should work with these scripts:
    HTML Code:
    <html>
    <title> Send me an e-mail!</title>
    <body>
    <form action="process.php" method="post">
    Sent from: <input type="text"  align="center" size="35" maxlength="100" name="headers"> <br />
    Subject: <input type="text" size="15" maxlength="15" name="subject" align="center"> <br />
    <textarea rows="25" cols="90" wrap="physical" name="body" align="center">Put your message here</textarea><br />
    <input type="submit" />
    </form>
    Process.php would look like this:
    PHP Code:
    <?php
    $to 
    "towhereever@fromwhereever.com";
    $subject $_POST['subject'];
    $body $_POST['body'];
    $headers $_POST['headers'] .
        
    "X-Mailer: php";
    if (
    mail($to$subject$body$headers)) {
      echo(
    "<p>Message sent!</p>");
     } else {
      echo(
    "<p>Message delivery failed...</p>");
     }
    ?>
    And to make other forms, just put that their name is also $subject (I think that would work) and use the other form tags. IE:<option>,<input type="checkbox">.
    Last edited by Chris Z; 10-21-2007 at 09:14 PM.

  3. #3
    fanh1909's Avatar
    fanh1909 is offline x10Hosting Member fanh1909 is an unknown quantity at this point
    Join Date
    Jan 2007
    Location
    In a cave. Can't believe I can even get internet here.
    Posts
    42

    Re: How to put a direct contact form on my page

    Do you mean a form?

    If you already know how to code one, and want it to email the information to you, here's the page to learn about it:
    http://www.chami.com/tips/Internet/010597I.html

    If you don't know how to code the form, go here:
    http://www.w3.org/TR/html4/interact/forms.html

    Hope that helps!


  4. #4
    mattura's Avatar
    mattura is offline x10 Elder mattura is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    563

    Re: How to put a direct contact form on my page

    A nice succinct reply. (edit: was referring to the reply 2 posts above)
    Also note that you should make sure all the $_POST variables are clean so that your form is not (ab)used for spamming.
    It is best not to give users the option of specifying the "to" or "headers", just make the subject something like an order number, and have all the users inputs concatenated in a readable way in the body.
    There are probably several free contact form templates you could peruse.
    Last edited by mattura; 10-20-2007 at 09:17 AM.

  5. #5
    monster061 is offline x10Hosting Member monster061 is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Skopje, Macedonia
    Posts
    18

    Re: How to put a direct contact form on my page

    Thanks alot, you people are fascinating me with your good will to help others like me.

    I hope I will make the thing work, thanks again.
    Edit:
    I didi all proper changes and then this is what I got when I tried to test the whole thing (after clicking SEND)

    Warning: mail() has been disabled for security reasons in /home/monster/public_html/process.php on line 7


    And then I changed the permisions, tried again and this is what I got:

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, webmaster@061.elementfx.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.


    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


    --------------------------------------------------------------------------------

    Apache/1.3.39 Server at 061.elementfx.com Port 80


    Now what ?
    Last edited by monster061; 10-21-2007 at 05:32 PM. Reason: Automerged Doublepost

  6. #6
    fanh1909's Avatar
    fanh1909 is offline x10Hosting Member fanh1909 is an unknown quantity at this point
    Join Date
    Jan 2007
    Location
    In a cave. Can't believe I can even get internet here.
    Posts
    42

    Re: How to put a direct contact form on my page

    I dunno... I don't use any PHP for my forms,only HTML.
    If you are too confused, there are some sites that provide free forms, they generate the code for you and all you have to do is to put the code up on your HTML file. They might need a credit or linkback though.
    Here are some of those sites:
    http://www.response-o-matic.com
    http://www.formspring.com
    If those sites aren't useful, then just use google to search for them xD


  7. #7
    monster061 is offline x10Hosting Member monster061 is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Skopje, Macedonia
    Posts
    18

    Re: How to put a direct contact form on my page

    Because I am not much of a code I used http://www.response-o-matic.com and it works exellent. I advise other newbies to use it

    Thanks alot !

+ Reply to Thread

Similar Threads

  1. [PHP] How to create a simple contact form
    By nightscream in forum Tutorials
    Replies: 6
    Last Post: 01-23-2011, 11:37 AM
  2. Need a contact form
    By plaic in forum Off Topic
    Replies: 4
    Last Post: 07-21-2007, 07:44 AM
  3. Some help on coding for a contact form
    By ZeptOr in forum Scripts & 3rd Party Apps
    Replies: 5
    Last Post: 12-31-2006, 12:35 AM
  4. Contact Form
    By o0slowpaul0o in forum Tutorials
    Replies: 6
    Last Post: 06-11-2005, 04:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers