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 9158509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:15:48+00:00 2026-06-17T13:15:48+00:00

Issue I have a script that’s been running fine since forever. It never gave

  • 0

Issue

I have a script that’s been running fine since forever. It never gave any issues. It was last used in December with no issues whatsoever. No one changed anything. But now, it doesn’t work. What it’s supposed to do is submit a review and then notify users about the review. But it’s not entering that section were it saves and notifies.

What I Have Done And Results

I have taken out that specific piece of the script that saves and notifies users, and tested it. It doesn’t return anything which means it doesn’t enter it. I’ve checked the post data, and that displays correct. I have also forced correct data to be posted (by changing params = $('#reviewForm').serialize(); to params = 'counter=1'.

My Code

Here is the form that is filled in by the user:

<form id="reviewForm">
    Employee that will be reviewed: <input type="text" id="reviewed" name="reviewed" class="items"/><br>
    <div id="openReviews" class="ui-corner-all ui-state-error" style="padding: 5 5 5 5"></div>
    Employees that will do the review:<br>
    <div id="reviewee_1">
        <ul><b>Employee 1:</b>
            <li>Name: <input type="text" id="reviewer_1" name="reviewer_1" class="items"/></li>
            <li>Position: <select id="position_1" name="position_1" class="items">
                <option value="sup">Supervisor</option>
                <option value="supp">Peers: Support</option>
                <option value="tech">Peers: Technical</option>
                <option value="sub">Sub-Ordinate</option>
            </select></li>
        </ul>
    </div>
    <input type="hidden" id="counter" name="counter" value="1" class="items"/>
    Add Another Reviewer <input type="button" id="add" value="Go >>"/><br>
    <input type="button" onClick="sendInfo()" value="Create Review"/>
</form>

When Create Review is clicked, it calls this piece of jQuery code:

function sendInfo() 
{
    if($('#reviewed').val() != "")
    {
        var params = $("#reviewForm").serialize();
        $.post('reviews.php',
        params, // as stated, even if I change this to counter = 1, it doesn't work
        function(data) {
            $('#reviewForm').hide();
            $('<p>' + data + '</p>').insertBefore('#reviewForm');
        });
    }
    else
    {
        alert("Please complete all fields in this form!");
    }
}

And then lastly, the code that processes the request:

if($_POST['counter'] > 0) // check if review was submitted
{
    // do stuff...
    // it doesn't even enter this...
}

Question

Did something change in the PHP or jQuery specs that could cause this to stop working?
Is there something that I’m missing?
What’s going on!?

Please help!

  • 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-17T13:15:50+00:00Added an answer on June 17, 2026 at 1:15 pm

    All depends on what JQuery version you use.

    I would replace:

    var params = $("#reviewForm").serialize();
    

    to

    var params = {};
    $.each($("#reviewForm").serializeArray(),function(key, elem){ params[elem.name] = elem.value });
    

    and for post i would use

    $.ajax({
        type: "POST",
        'url': 'reviews.php',
        'cache': false,
        'async': true,
        'data': params
    }).done(function( data ) {
        $('#reviewForm').hide();
        $('<p>' + data + '</p>').insertBefore('#reviewForm');
    }); //before ; you can use 'fail' methot to catch errors
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a script that somebody from SO kindly provided to solve an issue
I have the strangest issue. I have a script that calculates what the current
I am having this issue. I have a script that checks if variable exists,
I am stuck with a peculiar issue here. I have a script that basically
I have a Python script that needs to issue a number of shell commands.
I have a script that adds a class to an element on hover. Issue
I have a script that works fine locally but on the server fails. It
I have an odd issue. I have one PHP script that is used for
I have a script that I have been using on a number of different
I've search for the issue, but cant find it, I have a script that

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.