Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Cancling an entire script and showing an error message base on what happened
Old 12-22-2007, 12:19 AM Cancling an entire script and showing an error message base on what happened
goheadtry's Avatar
Webmaster Talker

Posts: 730
Name: John
Location: United States of America, California
Trades: 0
Hi I want a script that uploads a file, runs ffmpeg, and then writes the info to mysql I have tried this I am a bit confused with the code I do not use php-ffmpeg because I just run it from the command line. Could some body show me how to do this with code not as specifics but maybe I just can't grasp this concept but I sure have been trying.


I don't under because I need it to

Upload the file If It can't upload or the file type based on extension not mime type is not correct or the upload has just failed
cancel the entire script and say upload failed.

Or if it was successful
Continue by:
convert the file from command line with ffmpeg if it fails then cancel the entire script and say error and send me a message in an email

or if it was successful
continue by:
writing details to mysql such as title etc from the webpage form if it fails with mysql it will try again with mysql, then if it it succeeds
say "video upload successful
or if it failed send error message to me and tell the user: the database is currently down.


__________________
Free $1 gift card when you signup at
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

goheadtry is offline
Reply With Quote
View Public Profile Visit goheadtry's homepage!
 
 
Register now for full access!
Old 12-22-2007, 05:26 AM Re: Cancling an entire script and showing an error message base on what happened
solomongaby's Avatar
Webmaster Talker

Latest Blog Post:
How Do You Find Music Online ?
Posts: 522
Name: Gabe Solomon
Location: Romania
Trades: 1
Code:
if (UploadOK && in_array($fileType,$allowTypes) {
   if (runComand()===true){
      if (InsertAttempt()===true) {
         echo 'Upload Succesful';
      } else {
         DeleteConvertedFile();
         ThrowError('Database Error');
      }
   } else {
     SendMail('ConvertingError');
     ThrowError('Converting Error');
   }
} else {
  ThrowError('Bad Upload Or File Type');
}
__________________
If you like my posts ... TK is appreciated:)

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
solomongaby is offline
Reply With Quote
View Public Profile Visit solomongaby's homepage!
 
Reply     « Reply to Cancling an entire script and showing an error message base on what happened
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.10113 seconds with 12 queries