Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


gw1500se last won the day on March 21

gw1500se had the most liked content!

Community Reputation

41 Good


About gw1500se

  • Rank
    Prolific Member

Profile Information

  • Location
    Georgia, USA

Contact Methods

  • Skype

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. SOAP responds with XML but uses namespaces. Parse it with DOM taking namespaces into consideration.
  2. Just so we understand. If the filename from drawings_pdf_files is not in any description field of production_data, you want to delete that row from drawings_pdf_files?
  3. You don't say what data type '$columnValue' is so I am assuming it is int. $table .= strval($columnValue);
  4. One thing I see off the top of my head is to not delete one row at a time. Build a query string that deletes everything you want then execute that query once. This is really a MySQL question and I am not experienced enough to give you the exact syntax but it involves using 'WHERE id IN (...)'
  5. if (preg_match('CO200428', $a)) { echo "<a href=\"#anchor\">$a</a>" } Or something like that.
  6. That is what is in $_FILES['userfile']? If so then that means it contains an empty array (I didn't know it would do that). I suggest you change the logic a bit and check for errors. Remove the 'if' outside the 'foreach' and try this: foreach($_FILES['userfile']['name'] as $name) { if ($name['error']==0) { /* handle file */ } else { /* handle error */ } } You will need to decide how to handle the errors. Oddly, I think code 4 means duplicate file names.
  7. Yes, for Linux use cron and for Windows use task scheduler.
  8. Did you look at the httpd error log?
  9. That means there is something in the array. See what it there with this: echo "<pre>"; print_r($_FILES['userfile']); echo "</pre>";
  10. My bad. The first error is a warning/notice. You did not specify the Content-type correctly but it assumed the correct value. As for the 2nd error it looks like you are running PHP version 5.1 or earlier. Version 5.2 or better has json built in. Your version does not and you will need to install php-pecl-json.
  11. The 2nd error is because the first failed. You don't show what '$context' contains but I'm guessing you only need 1 parameter, the file path.
  12. if (is_array($_FILES['userfile'])) { foreach($_FILES['userfile']['name'] as $name) { $type = pathinfo($name, PATHINFO_EXTENSION); if(!in_array($type, $allowed)) die("Error: Only jpg, jpeg, gif and png files are allowed.-".$type); } } }
  13. A good IDE will help you with your indents which are still messed up making it difficult to read. I don't see where you initialize '$msg' to an empty string and I am not sure what happens when you concatenate to a variable that does not yet exist. Poor programming practice even if that works. Do the other errors show up?
  14. It looks like you are missing one 'if' and have an extra 'else'. Where are you checking the file type? You need to practice good programming practice by properly indenting your code. if (move_uploaded_file($_FILES['userfile']['tmp_name'][$ct], $uploadfile)) { if ($mail->addAttachment($uploadfile, $filename)) { /* You need to check for the desired file types here berfore you add it to the attach array */ $attachmentNames[] = $_FILES['userfile']['name'][$ct]; } else { $msg .= 'Failed to attach file ' . $_FILES['userfile']['name'][$ct]; } } else { $msg .= 'Failed to move file to ' . $uploadfile; } /* Where is the if for the next else, which doesn't belong here anyway? */
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.