Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 6 1 2 3 ... LastLast
Results 1 to 10 of 53
  1. #1
    Senior Member
    Join Date
    Mar 2005
    Location
    Malta
    Posts
    143
    Member #
    9468
    Hi mates, maybe some of you may already know that I know absolutely nothing about web designing, except some basics.

    This time I want to make a contact me table. Basically, instead the users have to open their E-mail client to write an e-mail, they can write the message in this box (similar to a guestbook). But this should have a menu to choose from, if the message is about problems, request, feedback, ideas and stuff like this. If you are not understanding, the following website has a similar one: http://www.forwardtechltd.net/contact.php

    ... and I want to put that at the bottom of this page: http://www.pctechdaniel.com/index8.htm

    Thanks in advance

  2.  

  3. #2
    Member
    Join Date
    Jan 2005
    Posts
    97
    Member #
    8727
    If you are using PHP, then use mail(), this is my code for my contact form:
    PHP Code:
    <?php
    if ($_GET['send']) {
        
    mail('MYEMAILHERE',$_POST['name'].' sent you a message'"Enquiry from ".$_POST['name']." <".$_POST['email']."> \n".htmlentities($_POST['msg'])."\r\n\r\n\r\nIP: ".$_SERVER['REMOTE_ADDR'],'Reply-To: '.$_POST['email']);
        echo 
    'Thanks for your message! I will reply as soon as possible';
    }
    ?>
    <h3>Contact Me</h3>
    To contact me about anything, use this form.<br />
    <form method='post' action='index.php?pg=contact&amp;send=true'>
    Your name(or nick, whatever):<input type='text' name='name' /><br />
    Your email:<input type='text' name='email' /><br />
    Your message:<br /><textarea name='msg' rows='5' cols='20'></textarea><br />
    <input type='submit' value='Send!' />
    </form>
    Basically you would make a form, have names for the form fields (obviously) and retrieve them using the PHP superglobal, $_POST. I suggest you take a look at w3schools.com's tutorials for stuff like this.

  4. #3
    Senior Member
    Join Date
    Feb 2005
    Location
    Canada
    Posts
    435
    Member #
    8983
    if you are beggining i assume you are not very familer with php and other technologys try the following code it will make a complete table and a way to submit it:
    HTML Code:
    <form method="get" action="mailto:your_email" enctype="text/plain">
    <table border="1" cellpadding="2">
    <tr>
    <td>
    name:
    </td>
    <td><input type="text" name="name" />
    </td>
    </tr>
    <tr>
    <td>email:</td>
    <td>
    <input type="text" name="email">
    </td>
    </tr>
    <tr>
    <td>
    comment type:
    </td>
    <td>
    <select name="commenttype">
    <option default>choose one...</option>
    <option value="complaint">complaint</option>
    <option value="suggestion">suggestion</option>
    <option value="concern">concern</option>
    <option value="question">question</option>
    </select>
    </td>
    </tr>
    <tr>
    <td>
    subject:
    </td>
    <td>
    <input type="text" name="subject" />
    </td>
    </tr>
    <tr>
    <td colspan="2">
    <textarea rows="12" cols="24" name="comment" style="border:1 solid;"></textarea> 
    </td>
    </tr>
    <tr>
    <td colspan="2">
    <input type="submit" value="send">
    </td>
    </table>
    </form>
    if you have a server or a cgi mail program you may want to use that because the mailto action does not work in allbrowsers and only with a default mail cliant
    Thee Pyro Wolf

  5. #4
    Senior Member
    Join Date
    Mar 2005
    Location
    Malta
    Posts
    143
    Member #
    9468
    Thanks n3on. For now I will try and work with what pyrodragon said, the reason is simple, because I'm still at the beginning.

    About what pyrodragon said, in the cpanel, there's a section named preinstalled script and in it there's an icon named CGI CENTER. And again, in it there's other icons:

    Random HTML
    Guestbook
    Counter
    Clock
    Countdown
    CGI Email
    Entropy Search
    Entropy Banner

    Do I have to just copy the code you posted and modify it (and use a normal address like pop3 account)? Or do I have to do something before that from the above CGI components?

    Thanks

  6. #5
    WDF Staff Wired's Avatar
    Join Date
    Apr 2003
    Posts
    7,657
    Member #
    1234
    Liked
    138 times
    You can do either one. The difference though is that with the first way, if the person using the form does not have their settings correct for sending email, it won't work. With CGI email, your server sends the email every time. I've toyed with it a bit, I'll try to post some code in a day or 2.
    The Rules
    Was another WDF member's post helpful? Click the like button below the post.

    Admin at houseofhelp.com

  7. #6
    Senior Member
    Join Date
    Feb 2005
    Location
    Canada
    Posts
    435
    Member #
    8983
    all you need is to repace the adress i markred as your email adress to your own then when a contact submits the form it would go to you no special code required.but if you do have a script for processing mail data then in the action tag type in the location of the script.
    Thee Pyro Wolf

  8. #7
    Senior Member
    Join Date
    Mar 2005
    Location
    Malta
    Posts
    143
    Member #
    9468
    I copied the code here:

    http://www.pctechdaniel.com/index8.htm

    Are you able to see the table? At the moment I can;t see it, maybe it takes some time to come up.

  9. #8
    Senior Member
    Join Date
    Mar 2005
    Location
    Malta
    Posts
    143
    Member #
    9468
    OK I can see it now, however it's a bit wierd, like the positions of the text etc... Am I right? If yes, how can I arrange that?

    By the way, when I did some tests, and clicked SEND it opened up my E-mail client to send an e-mail without no text!! Shouldn't be send automatically throught the website?

  10. #9
    Member
    Join Date
    Jan 2005
    Posts
    97
    Member #
    8727
    Well, with a mailto: link hardcoded without any type of email harvesting protection, I'd say you should be expecting alot of spam. To align the positions of the boxes, in table-talk, I'd say valign='top' would suffice. I would switch to CSS though.

    EDIT: I just noticed: CGI Email. Would you mind telling us the details?

  11. #10
    Senior Member
    Join Date
    Feb 2005
    Location
    Canada
    Posts
    435
    Member #
    8983
    sorry the look was wrong also try a cgi based form email program if you have cgi acess you could find one online
    try searching google for cgi email programs
    look at the previous post of mine with the table code for details (i fixed the errors)
    Thee Pyro Wolf


Page 1 of 6 1 2 3 ... LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:01 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com