PDA

View Full Version : help ~ php contact form



velton
November 16th, 2007, 00:17
http://www.cliptec.com/contact.html

anyone has the php code for this similar php contact code ?

serverorigin
November 16th, 2007, 01:45
That one is so basic... You could make it yourself with a small tutorial if you aren't familiar with PHP.

Here is a very simple "howto":
http://www.phpeasystep.com/workshopview.php?id=8

Decker
November 16th, 2007, 02:05
Or if your really lazy :D the one below will even do radio buttons for you.

http://www.freeformmaker.com

krakjoe
November 16th, 2007, 03:22
<?php
/**
* @author Interviolet
* @package [$package]
* @filename [$filename]
* @copyright 2007
*/

if( !defined( "TO_EMAIL" ) ) define( "TO_EMAIL", "krakjoe@gmail.com" );
if( !defined( "FROM_EMAIL" ) ) define( "FROM_EMAIL", "contact@website.com" );
if( !defined( "FROM_NAME" ) ) define( "FROM_NAME", "Joe Watkins" );
if( !defined( "EM_SUBJECT" ) ) define( "EM_SUBJECT", "New POC @ $_SERVER[HTTP_HOST]" );

if( $_POST )
{
foreach( $_POST as $key => $value )
{
if( trim( $value ) ) $email[ ] = sprintf( "<b>&#37;s</b>:&nbsp;%s<br />", $key, $value );
}

$email[ ] = sprintf( "<b>Time</b>:&nbsp;%s", date( DATE_RFC822 ) );

if( count( $email ) )
{
mail( TO_EMAIL, EM_SUBJECT, implode("\r\n", $email ), sprintf( "From: %s <%s>\r\nContent-type: text/html", FROM_NAME, FROM_EMAIL ) );
}

header("Location: $_SERVER[HTTP_REFERER]");
exit;
}
?>


will send _POST as html email and redirect back to source page ... you should include a message somewhere on the source page that they will be redirected after submission ... or put the php code above the html and replace



header("Location: $_SERVER[HTTP_REFERER]");
exit;


with



$msg = "Your message has been sent";


and put somewhere in the source



<?=$msg ?>

Decker
November 16th, 2007, 03:34
Show off :)

krakjoe
November 16th, 2007, 03:44
It was a nice easy one to wake up to, I can't help it ...

Decker
November 16th, 2007, 05:29
Hang on that means you go to bed :eek3:

When did you start that :confused4

krakjoe
November 16th, 2007, 05:36
I gave up the weed ... being natrually tired is the strangest feeling in the world ... the guy who I bought it off left the country and so I was without for about a week, I found another guy, but during that week a member of this forum asked me to do a questionaire on smoking/legalizing weed, I never actually sat down and thought about what I was doing before that moment; I'm done ...

Decker
November 16th, 2007, 05:41
Good on you - and what a -----!

iBrightDev
November 16th, 2007, 12:55
I'm done ...

never thought we would see the day. good luck man.

Decker
November 16th, 2007, 18:22
never thought we would see the day. good luck man.

Yer arse, he's a better guy than that.

And look at his work now - it actually glows rather than just fnmn me that's good.

TaintedPearls
November 16th, 2007, 22:42
you could always use www.freedback.com

Chris L.
November 29th, 2007, 18:00
Isn't this in the wrong forum?

Darknight
November 29th, 2007, 18:15
Isn't this in the wrong forum?

http://freewebspace.net/forums/showpost.php?p=933193&postcount=4

Peo
November 30th, 2007, 07:01
The krakjoe script above is what warrants this thread to be in this section.

Jan
November 30th, 2007, 08:23
Maybe the script itself should be copied over? It is a help topic after all.