PHP help please. if "The reset button isn't pressed"? - KingPin's Forum
KPsDenKPsDen ArmoryImage HostingLegendz text RPGIp DisplayIRCFlash Arcade
Forum
      |        
Register
         The Vibrator (Posted By:djinnking - Replies:3 - Views:39)      « »     [epic] post you pic thread [/epic] (Posted By:wout - Replies:315 - Views:7491)      « »     Possable ganking? (Posted By:Texan - Replies:1 - Views:15)      « »     skinning (Posted By:landus - Replies:2 - Views:17)      « »     Sup sup (Posted By:The_FreeMan - Replies:1 - Views:13)      « »     [Check4SPAM] RE: Skinning?? (Posted By:landus - Replies:0 - Views:1)      « »     Where is everyone? (Posted By:Enfuego - Replies:10 - Views:135)      « »     Five Friends Vote (Posted By:redemption - Replies:3 - Views:57)      « »     Machinima.com Music Video (Posted By:Headshot - Replies:14 - Views:168)      « »     Guilds? (Posted By:redemption - Replies:1 - Views:25)      « »     
KingPin's Forum
 
K.P.s.N. Register vbBux / KPs Mall Bugs Blogs FAQ Search Today's Posts Mark Forums Read Donate
Go Back   KingPin's Forum > KP's Network Forum > RSS News
Reload this Page PHP help please. if "The reset button isn't pressed"?
 


RSS News This is a discussion on PHP help please. if "The reset button isn't pressed"? in the RSS News;
Description: I need to make it so that when the reset button is not pressed the email is sent. But when ...

Reply
 
LinkBack Thread Tools
PHP help please. if "The reset button isn't pressed"?
(#1 (permalink))
Old
Christopher V is Offline
Private
Points: 153, Level: 2 Points: 153, Level: 2 Points: 153, Level: 2
Activity: 0% Activity: 0% Activity: 0%
Christopher V is an unknown quantity at this point
 
Christopher V
Rupees: 82.00
Bank: 500.00
Total Rupees: 582.00
 
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jan 2008
PHP help please. if "The reset button isn't pressed"? - January 1st, 2008

I need to make it so that when the reset button is not pressed the email is sent. But when it is pressed the message "Cleared" is echo'd. What should I fill in for "The reset button isn't pressed"

<input name="image" type="image" src="images/clear.gif"
onClick="this.form.reset()" />

-----------

<?php
if "The reset button isn't pressed"
{
if (isset($_POST['email']))
{
if (ereg('.+', $_POST["name"]))
{
if (ereg('.+', $_POST["message"]))

{
$email = $_REQUEST['email'] ;
$subject = $_REQUEST['name'] ;
$message = $_REQUEST['message'] . " | " . $_REQUEST['email'];
mail( "christopher.verzonilla@gmail.com", "Subject: $subject",
$message, "christopher@shelterlistings.org" );
echo "Your email has been submitted.";
}

else echo "Please enter a valid message.";
}
else echo "Please enter your name.";
}
else echo "Please enter a valid email address.";
}
else echo "Cleared.";

?>

 
Reply With Quote
Revenue Shared Ads
(#2 (permalink))
Old
giloosh99 is Offline
Private
Points: 152, Level: 2 Points: 152, Level: 2 Points: 152, Level: 2
Activity: 0% Activity: 0% Activity: 0%
giloosh99 is an unknown quantity at this point
 
giloosh99
Rupees: 2.20
Bank: 500.00
Total Rupees: 502.20
 
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jan 2008
January 1st, 2008

when you click the reset button you could change the value of a hidden input field.
for example:
when you reset the form change the value of the hidden text field to 1.
in php just check that hidden input field for the value of 1

<?
if($_POST['hidden_field'] !=1){

//the form was not reseted

}
?>

 
Reply With Quote
(#3 (permalink))
Old
giloosh99 is Offline
Private
Points: 152, Level: 2 Points: 152, Level: 2 Points: 152, Level: 2
Activity: 0% Activity: 0% Activity: 0%
giloosh99 is an unknown quantity at this point
 
giloosh99
Rupees: 2.20
Bank: 500.00
Total Rupees: 502.20
 
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jan 2008
January 1st, 2008

when you click the reset button you could change the value of a hidden input field.
for example:
when you reset the form change the value of the hidden text field to 1.
in php just check that hidden input field for the value of 1

<?
if($_POST['hidden_field'] !=1){

//the form was not reseted

}
?>
 
Reply With Quote
Revenue Shared Ads
Reply

Bookmarks

Tags
php

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Rupees Per Thread View: 1.00
Rupees Per Thread: 15.00
Rupees Per Post: 5.00
Forum Jump



Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Copyright 2004-2009 KPsN


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81