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 3 1 2 3 LastLast
Results 1 to 10 of 23
  1. #1
    Senior Member
    Join Date
    Mar 2005
    Location
    Malta
    Posts
    143
    Member #
    9468
    Hi mates, I'm trying to insert a simple feedback form into my webpage, but I'm stuck. Here is the code:

    Code:
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <form name="form1" method="post" action="http://webone.com.au/cgi-bin/formmail/formmail.pl">
    <input type="hidden" name="subject" value="EMAILSUBJECTTITLE">
    <input type="hidden" name="recipient" value="RECIPIENTMAIL">
    <input type="hidden" name="redirect" value="CONFIRMATIONPAGE">
    <tr>
    	<td align="right"><font size="2" face="Verdana">Your Name:</font>&nbsp;&nbsp;&nbsp;</td>
    	<td><input type="text" name="name"></td>
    </tr>
    <tr>
    	<td align="right"><font size="2" face="Verdana">Email Address:</font>&nbsp;&nbsp;&nbsp;</td>
    	<td><input type="text" name="address"></td>
    </tr>
    <tr>
    	<td align="right"><font size="2" face="Verdana">Your Age:</font>&nbsp;&nbsp;&nbsp;</td>
    	<td>
    	<select name="age" size="1">
    	    <option value="10-20">10-20</option>
    	    <option value="21-30">21-30</option>
    	    <option value="31-50">31-50</option>
    	    <option value="51-70">51-70</option>
    	    <option value="71-100">71-100</option>
    	    </select><tr></td>
    	    <td align="right"><font size="2" face="Verdana">Sex:</font>&nbsp;&nbsp;&nbsp;</td>
    	    <td><font size="2" face="Comic Sans MS">
    	    Male&nbsp;<input type="radio" name="Male" value="Male">&nbsp;&nbsp;&nbsp;Female&nbsp;<input type="radio" name="Female" value="Female"></font></tr>
    	    <tr>
    	<td valign="top" align="right"><font size="2" face="Verdana">Feedback:</font>&nbsp;&nbsp;&nbsp;
    	<td><textarea name="feedback" rows="6" cols="35"></textarea></td></tr>
    <tr>
    	<td>&nbsp;</td>
    	<td><input type="submit">&nbsp;<input type="reset"></td>
    </tr>
    </form>
    </table>
    I got it from http://www.webone.com.au/form.html

    The problem is, it seems I have to change those words at the top EMAILSUBJECTTITLE, RECIPIENTEMAIL, CONFIRMATIONPAGE but I don't know what I have to put instead.

    Can anyone help please?

    By the way, if you want, the form is already uploaded (obviously not working), www.pctechdaniel.com/contact.php Thanks in advance mates.

  2.  

  3. #2
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Okay, after going on the link you provided, heres what you gotta do.

    1: Where it says EMAILSUBJECTTITLE, replace that with whatever you want the email's subject to be, such as "New site feedback"

    2: Where it says RECIPENTEMAIL, replace that with the email address you want to be e-mailed. Such as me(at)myhouse.com

    3: Where it says CONFIRMATIONPAGE, repalce that with the URL of the page you want the user to be directed to after emailing the form, such as http://mysite.com/thanks.htm

    Hope this helps

  4. #3
    Senior Member
    Join Date
    Mar 2005
    Location
    Malta
    Posts
    143
    Member #
    9468
    Ok, I've filled those with the correct data.

    I put, instead of CONFIRMATIONPAGE, www.pctechdaniel.com/index.htm so it will direct the visitor to the main page (just for testing, I will do another page later).

    The problem is, when you click on Submit, it will direct you here:

    http://webone.com.au/cgi-bin/formmail/formmail.pl

    The page you are looking for cannot be found.

    There is nothing on this server at that address. The page you are looking for may have moved. Please check the address and try again.
    That is the exact link which is written at the 2nd line of the code. Do I have to change that also? Test it yourself, www.pctechdaniel.com/contact.php

    Thanks again

  5. #4
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Well, that is indeed the URL the site you got it from mentions.

    Try contacting them.

  6. #5
    Senior Member
    Join Date
    Mar 2005
    Location
    Malta
    Posts
    143
    Member #
    9468
    Thanks again bfsog.

    It seems you have to pay to benefit from their service. Anayways, can I use a free service to direct the message from the feedback form to my e-mail account? Perhaps another URL, or PHP stuff.

    PS: I don't have any idea how PHP works. Can you guide me please? It's very important to have a feedback form in websites, it is simpler for the visitors to use a form rather than an e-mail client

    Best Regards

    Daniel

  7. #6
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    If you have PHP, here is a free contact form, (the author is a member of this forum) http://www.karinne.net/scripts/?s=3

    If you need help etting it up just post back here.

    Hope this helps.

  8. #7
    Senior Member
    Join Date
    Mar 2005
    Location
    Malta
    Posts
    143
    Member #
    9468
    Yup, I think I need a little help :nervous: Here's what I've done:

    I've replaced that URL with emailit.php

    Created a new .php file and copied the code from http://www.karinne.net/scripts/?s=3

    Saved the file as emailit.php and uploaded both files.

    Now, when you try to send a message via feedback form, you will be directed to www.pctechdaniel.com/index.htm (By default it was sent.php but I've replaced it with index.htm). But I'm not recieving the message @ racdan_f@onvol.net Do I have to use a domain e-mail, because this is POP3? Here's the code just in case.

    Feedback Form:

    Code:
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <form name="form1" method="post" action="emailit.php">
    <input type="hidden" name="subject" value="DCS Feedback Form Reply">
    <input type="hidden" name="recipient" value="racdan_f@onvol.net">
    <input type="hidden" name="redirect" value="http://www.pctechdaniel.com/index.htm">
    <tr>
    	<td align="right"><font size="2" face="Verdana">Your Name:</font>&nbsp;&nbsp;&nbsp;</td>
    	<td><input type="text" name="name"></td>
    </tr>
    <tr>
    	<td align="right"><font size="2" face="Verdana">Email Address:</font>&nbsp;&nbsp;&nbsp;</td>
    	<td><input type="text" name="address"></td>
    </tr>
    <tr>
    	<td align="right"><font size="2" face="Verdana">Your Age:</font>&nbsp;&nbsp;&nbsp;</td>
    	<td>
    	<select name="age" size="1">
    	    <option value="10-20">10-20</option>
    	    <option value="21-30">21-30</option>
    	    <option value="31-50">31-50</option>
    	    <option value="51-70">51-70</option>
    	    <option value="71-100">71-100</option>
    	    </select><tr></td>
    	    <td align="right"><font size="2" face="Verdana">Sex:</font>&nbsp;&nbsp;&nbsp;</td>
    	    <td><font size="2" face="Comic Sans MS">
    	    Male&nbsp;<input type="radio" name="Male" value="Male">&nbsp;&nbsp;&nbsp;Female&nbsp;<input type="radio" name="Female" value="Female"></font></tr>
    	    <tr>
    	<td valign="top" align="right"><font size="2" face="Verdana">Feedback:</font>&nbsp;&nbsp;&nbsp;
    	<td><textarea name="feedback" rows="6" cols="35"></textarea></td></tr>
    <tr>
    	<td>&nbsp;</td>
    	<td><input type="submit">&nbsp;<input type="reset"></td>
    </tr>
    </form>
    </table>
    emailit.php:

    Code:
    <?php
    $name = addslashes($_POST['name']);
    $email = addslashes($_POST['email']);
    $subject = addslashes($_POST['subject']);
    $comments = addslashes($_POST['comments']);
    
    $sendto = "racdan_f@onvol.net";
    $body = "Message from ". $name ."\n Comments = ". $comments;
    
    mail($sendto, $subject, $body, "From:$email");
    
    header( 'Location: index.htm' );
    ?>

  9. #8
    Senior Member Stylise's Avatar
    Join Date
    Jul 2005
    Location
    Mount Martha, Australia
    Posts
    229
    Member #
    10679
    sent.php is where the user will be redirected to once they have finished submitting. So that can be whatever page you wish.

  10. #9
    Senior Member
    Join Date
    Mar 2005
    Location
    Malta
    Posts
    143
    Member #
    9468
    Yup, infact I've changed it to index.htm for now. But the problem is I'm not recieveing any e-mail messages. Do I have to use a domain e-mail, because the one I wrote is POP3? Or else something is wrong with the code?

  11. #10
    Senior Member Stylise's Avatar
    Join Date
    Jul 2005
    Location
    Mount Martha, Australia
    Posts
    229
    Member #
    10679
    You have:

    $email = addslashes($_POST['email']);

    However, as you have it in your form, it should be

    $email = addslashes($_POST['address']);

    I assume, because this is not there, it is unaware of who the email is coming from...


Page 1 of 3 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 12:16 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com