> If the OP does clean his $_POST before putting the results in his database,
> his database will look like 'poo' if the wrong person comes along.

Gary had mentioned in his initial post he was testing on a local machine and
would add the checks after resolving this issue.


Also, the OP's code reads:

  ($image_type == 'image/pjpeg') || ($image_type == 'image/png') &&

 That should be:

  ($image_type == 'image/jpeg') || ($image_type == 'image/png') &&

Tedd, Gary's original code does include jpeg AND pjpeg types (if you omit
pjpeg's, you'll miss some images.)

That said, Gary, Tedd did point out some important issues with the logic in
your code.

Additionally, you were asked politely to not top post, but you continued to
> do so. If you expect us to help you but you won't accommodate a simple, and
> appropriate request, then don't expect any more help from me.

> bye!

Where was he asked to avoid top-posting in this thread?

What is top posting?

Gary, top-posting is when you add your content to an email thread at the top
(as opposed to the bottom) of the email message.  The preferred method of
this list's admins is that you add your reply to the bottom of the message
thread.  So, in future posts, please try to remember to add your message to
the bottom of the thread instead of the top.  Thanks :)

Gary, what is the INSERT line for the images table supposed to be (it looks
like it got mangled in your copying and pasting?)

$sqlStatements = "INSERT INTO guns( id,manufacturer, type, model,

caliber, condition, price, description, image_file_name,submitted

,available) VALUES ('','$manufacturer', '$type', '$model', '$caliber',

'$condition', '$price', '$description','$image_file_name', ' ',


> INSERT INTO images (id, image_file) VALUES('','$image_file')";

>  $sqlResult = $batchconnection->multi_query($sqlStatements);

  if($sqlResult == true) {

      echo "Successfully Inserted Records";

  } else {

      echo "Some Error Occured While Inserting Records";



Nephtali:  PHP web framework that functions beautifully

Reply via email to