Help - Search - Members - Calendar
Full Version: forms and handler
Hostony Board > General > Anything and Everything
emiliejay
Hello All,

I have put together a webpage and I am currently trying to put together a feedback form that will email me comments and suggestions from those that visit my site. However, I am having a problem getting the cgi script that I am using to work or maybe I am just not doing it correctly.

Anyone out there that can help me with this? I am a beginner at webdesign and learning as I go along.

Many thanks

ej
phobos
You can write own freedback application or use some scripts collection.
I recommend you to use PHP on Linux or ASP on Windows, because those scripting languages are most progressive and easy to learn.

If you don't wanna learn scripting languages you can find huge scripts collection at Hotscripts.com.
emiliejay
Thank you phobos for your input. I looked at the site you recommended and there is some great stuff there. Now to get it to work...lol. I am determined to get this feedback form off the ground.

I do have one more question. Last year, I had enquired about my account supporting ASP. At the time I was told it did not. Has this changed?

I am still having difficulty with setting this up. Mainly where do I place the files, what do I need to change in some of the scripts to accomadate my needs for my page etc. Most of the tutorials I have read assumes you know more (I am new to all of this, so it can be fustrating when those steps are missing). The concept of how it works I understand but I don't have the basic programming knowledge to pull me through to make this successful without spending hours and hours of trial and error.

Many thanks
ej
Stanly
1. Linux still don't support ASP at our servers.
2. Sure, you need to configure each script. Look at README file for this script.
emiliejay
oh my! and I thought I was confused before.

I followed the directions of the readme file with the script I am using. Like I stated previously, most of the tutorials and/or readme files assume you know the basic knowledge of programming. For the person that is new, this is the fustrating part of the process.

ASP is not supported. Phobos mentioned ASP earlier in his recommendation. What type of script should I be looking for to use as a handler for my forms? The site that was recommended to me has a vast amout of ASP scripts and others but I don't wish to waste my time setting it up if it isn't support by the server and it is going to fail regardless of my lack of knowledge ie ASP

Many thanks
ej
Stanly
He recommend you

QUOTE
PHP on Linux or ASP on Windows


What account type do you have? Linux or Windows.
MartinB
If you have Linux based hosting, make a html form like:

CODE
<form action="mailer.php" method="post">
    Name:
    <br>
    <input type="text" name="name">
    <br>
    Your Email:
    <br>
    <input type="text" name="email">
    <br>
    Your comments:
               <br>
    <textarea cols="10" rows="10" name="comments"></textarea>
    <br>
    <input type="submit" name="submit">
</form>


and put it in you html page.
next, create a new file named "mailer.php" with the follow php script:

CODE
<?php

// Mail destination, put your email here:
$to = "yourmail@yourdomain.com";

// SUBJECT:
$subject = "The subject of the email";

$from = $_POST['email']; // Email from the form

// BODY
$msg .= "\nName: ".$_POST['name']; // Name from the form
$msg .= "\nComment: ".$_POST['comments']; //Comment from the form

// Mail Header (No touch it)
$header.= "From: ".$from."\r\n";
$header.= "Reply-To: ".$from."\r\n";
$header.= "X-Mailer: PHP/" . phpversion();
// ---------------------------

if(mail($to , $subject , $msg, $header))
{
 // Redirection to the "Thank you" page if the operation was succesfull.
 header("Location:thankyou.html");
}  
else
{
 // Redirection to the Error page If can't send.
 header("Location:error.html");
}
?>


summary: Create this two files, put them in your public_html folder an access the html form file with your browser like http://yourdomain.com/themailform.html

if you want you can change customize the look & feel, add the html code in your existing webpage, and change the form's flield's (remember edit the mailer.php for match the new var's names) and you can do what you want.

enjoy.
emiliejay
Thank you mblendinger!!!! this is EXACTLY what I am looking for. So far I got things to work while testing it out. I am just waiting for the email to confirm that all is okay. cool.gif

Many thanks to everyone for all your help!!

ej
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.
IPS Driver Error

IPS Driver Error

There appears to be an error with the database.
You can try to refresh the page by clicking here