Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,471
There are 1540 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

Building a secure contact form

Thread title: Building a secure contact form
Closed Thread  
Page 4 of 4 < 1 2 3 4
    Thread tools Search this thread Display Modes  
05-26-2008, 02:38 AM
#31
JulesR is offline JulesR
Status: Member
Join date: Apr 2008
Location:
Expertise:
Software:
 
Posts: 129
iTrader: 0 / 0%
 

JulesR is on a distinguished road

  Old

Just build an "if" check around the form, no need to redirect at all.

First you should set a variable or something if the mail has been successfully sent:

PHP Code:
if (mail(...blah)) {
$success yes;

Then around the actual <form> elements in the page you should do something like:

PHP Code:
<?php
if (!isset($success)) {
// Break out of PHP and show the form:
?>
<form.... blah blah>
Insert your form mumbo jumbo.
</form>
<?php
}
else {
echo 
"Thanks for contacting us. Blah blah blah";
}
?>

05-27-2008, 11:08 AM
#32
mason.sklut is offline mason.sklut
mason.sklut's Avatar
Status: Junior Member
Join date: Mar 2007
Location: North Carolina
Expertise: Photography
Software:
 
Posts: 73
iTrader: 0 / 0%
 

mason.sklut is on a distinguished road

  Old

I found what I needed on CSS-tricks, ironically he posted exactly what I have been looking for. Sorry for being a newb and wasting anyone's time (if I did, I apologize).

In a few months I'll be fine with PHP after some practice of course.

Thanks again,
Mason

Closed Thread  
Page 4 of 4 < 1 2 3 4


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed