Attaching " Thank You " pop-up window in php form mail code

Thread Tools Search this Thread
Top Forums Web Development Attaching " Thank You " pop-up window in php form mail code
# 1  
Old 08-15-2011
Attaching " Thank You " pop-up window in php form mail code

Dear Sir,

I have got a php mail form code.

Using this code, I want to use the JavaScript for " Thank You " pop-up window in the php form mail code.

Where do I add the pop-up JavaScript for "thank you" ?

My code is as follows:

 //--------------------------Set these paramaters--------------------------
// Subject of email sent to you.
 $subject = 'Test mail'; 

// Your email address. This is where the form information will be sent. 
$emailadd = 'foo@bar.baz'; 

// Where to redirect after form is processed. 
$url = ''; 

// Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty.
 $req = '1'; 

// --------------------------Do not edit below this line--------------------------
 $text = "Results from form:\n\n"; 
$space = ' ';
 $line = '
 foreach ($_POST as $key => $value)
 if ($req == '1')
 if ($value == '')
 {echo "$key is empty";die;}
 $j = strlen($key);
 if ($j >= 20)
 {echo "Name of form element $key cannot be longer than 20 characters";die;}
 $j = 20 - $j;
 for ($i = 1; $i <= $j; $i++)
 {$space .= ' ';}
 $value = str_replace('\n', "$line", $value);
 $conc = "{$key}:$space{$value}$line";
 $text .= $conc;
 $space = ' ';
 mail($emailadd, $subject, $text, $attachement, 'From: '.$emailadd.'');
 echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';

thanks in adv.


Last edited by pludi; 08-15-2011 at 04:31 PM..
# 2  
Old 10-04-2011
Somewhere in register.php? Would have to occur after your meta redirect.
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

3. AIX

echo $varibla | mail -s "subject" "" not ruuning as expected

Hi Folks, As per the subject, the following command is not working as expected. echo $variable | mail -s "subject" "" Could anyone figure it out whats wrong with this. I am using AIX box. Regards, (2 Replies)
Discussion started by: gjarms
2 Replies

4. Solaris

Trap signal on Window Manager "X" button clicked?

Well, my first post... thanks in advance! Can applications be notified of the X Window close (with "X" button) so the signal handler can run a cleanup process method? About the app: built with GNU C/C++ on Solaris 10, with WxWidgets. It is launched by a shell script as a background task. The... (2 Replies)
Discussion started by: HandsOGold
2 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. Windows & DOS: Issues & Discussions

"Striping" the background of an Rxvt/Urxvt window in Cygwin

To get this: out of Cygwin's rxvt, you have to tweak your /cygwin/etc/x11/app-defaults/rxvt file, which is here:... (0 Replies)
Discussion started by: SilversleevesX
0 Replies

7. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep ""|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep ""|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies
Login or Register to Ask a Question