[PHP] RE: [PHP-WIN] Multi-Task on PHP by submitting a form! From: Asendorf, John (JAsendorf <email protected>)
Date: 08/20/01

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 <email protected>", "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 <email protected>
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 <email protected>]
> Sent: Monday, August 20, 2001 9:13 AM
> To: php-db <email protected>; php-general <email protected>;
> php-windows <email protected>
> 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 <email protected>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe <email protected>
> For additional commands, e-mail: php-windows-help <email protected>
> To contact the list administrators, e-mail:
> php-list-admin <email protected>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>