RE: [PHP-WIN] Multi-Task on PHP by submitting a form!
| From: | Asendorf, John | Date: | Mon, 20 Aug 2001 13:57:48 +0000 |
| Subject: | RE: [PHP-WIN] Multi-Task on PHP by submitting a form! | ||
| Groups: | php.db php.general php.windows | ||
| Request: | Send a blank email to php-general+get-63505@lists.php.net to get a copy of this message | ||
No problem... I do this with a file upload. Just include a mail function
before or after the other work you do with the information:
if ( isset ( $files ) ) {
//send an email to the webmaster if someone hits this area
MAIL( "webmaster@lcounty.com", "CC Resolution Uploads Attempted", "From:
$email\nX-Mailer: PHP/" . phpversion());
for ( $i=0 ; file_exists ( $files[$i] ) ; $i++ ) {
echo "Trying to upload " . $files_name[$i] . "...<br />\n";
// if the file is too big, don't accept it (200K)
if ( $files_size[$i] > 200000 ) {
echo "The file, $result_name ($file_size bytes), is too big.
Files that large are too big for this particular use. Possible attack
dropped. Please contact $webmaster if you receive this message.<br />\n";
}
// if $result_name isn't empty, try to copy the file
elseif ( eregi ( "([0-9]{1,3})\-([0-9]{1,3})([A-Za-z]?)([a-z0-9
,.]*).(doc|rtf)" , $files_name[$i] , $newres_name ) ) {
etc. etc. etc.
}
---------------------
John Asendorf - jasendorf@lcounty.com
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Aliquando et insanire iucundum est
> -----Original Message-----
> From: Jack [mailto:jack@nedcor.com]
> Sent: Monday, August 20, 2001 9:13 AM
> To: php-db@lists.php.net; php-general@lists.php.net;
> php-windows@lists.php.net
> Subject: [PHP-WIN] Multi-Task on PHP by submitting a form!
>
>
> Dear all
> I was trying to get a user input form to insert to a
> mysql_database and
> e-mail to me!
> Is it possible to make php perform two task in one single
> submit button?
>
> The form will post the input --> mail.php.
>
> In the mail.php, i was thinking to add another process just
> after the mail
> process had finish, which will insert the data from the from to
> mysql_database.
>
> Thx
> Jack
> jack@nedcor.com
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>