Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8341771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:35:02+00:00 2026-06-09T05:35:02+00:00

I’m creating a setup wizard using AJAX. It’s a multi-step form submission with 6

  • 0

I’m creating a setup wizard using AJAX. It’s a multi-step form submission with 6 total steps. Steps 1-5 work fine, they are just form fields and only submit text. The final step, step 6, will allow the user to upload 7 images. This step does not work. I get a 500 Internal Server Error

Am I passing the image data correctly via JSON? Is there something else I’m doing wrong or forgetting?

The relevant code is below:

HTML (For step 6 only)

<form action="/ajax/wizard.php/<?php echo $userName ?>?step=3" 
class="defaultRequest" enctype="multipart/form-data" method="post">

<input type="hidden" name="token" value="<?php echo $token; ?>"/>

<fieldset>
    <p><label>Profile Picture</label>
    <input type="file" name="pPic" value="" /></p>

    <p><label><a href="#help-username" class="show_helper"><span>(?)</span>
    Pic 1</a></label> <input type="file" name="Album1" value="" />
    </p>

    <p><label><a href="#help-password" class="show_helper"><span>(?)</span>
    Pic 2</a></label><input type="file" name="Album2" value="" />
    </p>

    <p><label>Pic 3</label>
    <input type="file" name="Album3" value="" /></p>

    <p><label>Pic 4</label>
    <input type="file" name="Album4" value="" /></p>

    <p><label>Pic 5</label>
    <input type="file" name="Album5" value="" /></p>

    <p><label>Pic 6</label>
    <input type="file" name="Album6" value="" /></p>

</fieldset>

<fieldset>
     <p><label>&nbsp;</label>
     <button type="submit"><span>Upload Images</span></button></p>
</fieldset>

JS

$.ajax({
type: 'POST',
url: requestUrl,
data: $(this).serialize(),
dataType: 'json',
success: function(data) {

            if(data.response){
                $('div.errormsg').remove();
                $(eventHeadline).html(data.eventHeadline);
                console.log(data.eventHeadline);
                //$(eventDate).html(data.eventName);

                if(data.step){
                    openStep(data.step);
                }else{
                        openStep('next');
                }
            }else{
                $('div.errormsg').remove();
                $('<div class="errormsg">'+data.message+"</div>").insertBefore(form);
            }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T05:35:04+00:00Added an answer on June 9, 2026 at 5:35 am

    File fields don’t serialize conveniently to JSON, in order to upload them you would need to create a FormData object which can be uploaded using jQuery so long as you prevent jQuery from processing the data object using processData: false. This will only work with a few of the newest browsers though: http://caniuse.com/#search=formdata

    In order to support file uploads with jQuery for older browsers / IE, your best bet is to find a plugin that uploads the files using a standard POST and ties it back to the jQuery callback – this should provide you with a few: https://www.google.co.uk/search?q=jquery+file+upload+plugin

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Paperclip to handle profile photo uploads in my app. They upload
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have a text area in my form which accepts all possible characters from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.