On Feb 10, 12:04 am, spiderling <webmas...@spiderling.ca> wrote:
> I am using prettyPopin lightbox for a file upload form, and I am also
> using jQuery Form Plugin to upload the image file and update it
> accordingly. Unfortunately, the file is not being sent. The $_FILES
> array is empty. I've included the jQuery and HTML being used. If
> someone can please look and let me know if I'm missing something,
> because from all the examples I've seen it doesn't seem to require too
> much to upload a file.
>
> Thanks.
>
> updatephoto.php jQuery:
> $(document).ready(function() {
>  var options = {
>   target: '#divupdate',
>   beforeSubmit : function() {
>    $('#divupdate').html('<img src="pics/loader.gif" border="0"
> alt="Please wait..." />');
>   }
>  };
>
>  $('#phupdt').ajaxForm(options);
>
> // $('#phupdt').submit(function() {
> //  $(this).ajaxSubmit(options);
> //  return false;
> // });
>
> });
>
> updatephoto.php HTML:
> <div id="divupdate">
> <br /><br />
> <form id="phupdt" action="updtphresponse.php" method="post"
> enctype="multipart/form-data">
> <input type="hidden" name="MAX_FILE_SIZE" value="5250000" />
> <table>
>  <tr>
>   <td><input type="file" name="headshot" size="30" /></td>
>  </tr>
>  <tr>
>   <td><input type="submit" name="request" value="Update photo" /></td>
>  </tr>
> </table>
> </form>
> </div>
>
> updtphresponse.php HTML:
> print_r($_FILES);
> $html = '
> <table>
>  <tr>
>   <td><b>Successfully updated.</b></td>
>  </tr>
> </table>
> ';
> echo $html;


Everything you posted looks fine.  Where does the prettyPopin lightbox
come into play?

Mike

Reply via email to