Forum Topic: Email Form / Contact page

(1,375 views • 5 replies)

This topic is 1 page long.

<< < > >>
None

MihaS

Reply To Post Reply & Quote

Posted at: 3/16/06 02:01 PM

MihaS LIGHT LEVEL 05

Sign-Up: 06/04/05

Posts: 23

This is a Tutorial about making a Contact Page on your site using PHP
Ok so you hate spambots? So do I ! Making a contact page that doesent show your Email is a perfect solution!

Requirements :
- PHP 4.XX.XX
- Basic knowledge of HTML and PHP

So lets start. First if we dont have MySQL We make a file that will have our email!

include_email_info.php
<?php
$email = "myemail@myhost.com";
?>

Now we have our email written in a file.. So lets make the contact PHP page!
We will name it contact.php < duhh...

So: contact.php
<?php
//We include include_email_info.php so that we may acceas the email!
include_once("include_email_info.php");
// We check if variables are set!
if(isset($_POST['user_email'],$_POST['name
'],$_POST['meassege'])){

// If they are set. Set the text and filter the input thus send the email! If not, show the page...

$meassege = strip_tags($_POST['meassege']."\n\n".$_POS
T['name']);
mail($email,"Contact",$meassege);
echo "Email Sent!";
}
else
{
// So this is the boring part.. So im not going to write it.. Just echo your html code:
echo "<html>";
echo "<body>";
etc....
dont forget to name the <textarea type='text' name='meassege'> the inputs like the variables...
}
?>
Well hope it helped anyone!


None

citricsquid

Reply To Post Reply & Quote

Posted at: 3/16/06 02:03 PM

citricsquid DARK LEVEL 23

Sign-Up: 06/25/05

Posts: 13,470

Hmm, i am just testing it out now, so ill post back if it works, but seems a good tutorial anyway, welldone. +10 cool points for you. Submit it to php:main if it hasn't been done before.

rm -rf home/citricsquid/penis

BBS Signature

None

MihaS

Reply To Post Reply & Quote

Posted at: 3/16/06 02:09 PM

MihaS LIGHT LEVEL 05

Sign-Up: 06/04/05

Posts: 23

Ok tell me if sometin doesent work.. i will help you! :)


None

NinoGrounds

Reply To Post Reply & Quote

Posted at: 3/25/06 08:47 AM

NinoGrounds LIGHT LEVEL 17

Sign-Up: 11/28/05

Posts: 3,529

Basic.

I am not saying it is bad!!


None

thecoshman

Reply To Post Reply & Quote

Posted at: 8/8/06 08:27 AM

thecoshman DARK LEVEL 11

Sign-Up: 06/11/06

Posts: 812

ok, seems to be fairly simple to understand, jsut how do i actually use this code?

Do i use as a seprate file of code or somthing?


None

phyconinja

Reply To Post Reply & Quote

Posted at: 11/19/06 05:52 AM

phyconinja EVIL LEVEL 25

Sign-Up: 09/18/04

Posts: 2,838

At 3/16/06 02:03 PM, CitricSquid wrote: Hmm, i am just testing it out now, so ill post back if it works

does this mean its not working?
gonna use this now.
just what I was looking for. thanx


All times are Eastern Standard Time (GMT -5) | Current Time: 01:07 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!