RE: [PHP] mail( ) question

From: Date: Tue, 30 Jan 2001 09:56:00 +0000
Subject: RE: [PHP] mail( ) question
Groups: php.general 
Request: Send a blank email to php-general+get-37275@lists.php.net to get a copy of this message
If you've copied-and-pasted that script, you might want to correct this line: <scrip language="JavaScrip"> Both the words "script" and "Javascript" have a T on the end of them :-) On the other hand, why don't you just use PHP for the whole thing? Get the e-mail address from a form, make the action of this form $PHP_SELF, and have a condition along the lines of if ($submit) { ... send the mail } else { ... display the form } Then you don't have to switch to and from client- and server-side scripts, and you don't risk your system being fubar'd by people who browse with Javascript turned off. Just a thought. Cheers Jon -----Original Message----- From: Fang Li [mailto:fli@biographix.com] Sent: 29 January 2001 17:30 To: php-general@lists.php.net Subject: [PHP] mail( ) question Hi All: Would anyone tell me how to correct the code in mail( ) function? Thanks a lot. <html> <head> <scrip language="JavaScrip"> function askEmailAddress( ){ var inputedData = prompt("The email address you want send to:"," "); if(confirm("The email address you want send to is" + inputedData + "?")){ alert("OK, the article will send to " + inputedData + "!"); } } </script> </head> <body> ....... <?php mail(?> <script language="JavaScript"> document.write(inputed_data)</script> <?php , "My Subject", "Line 1\nLine 2\nLine 3"); ?> </body> </html> Fang Li -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#37275) next »