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

  • Home
  • SEARCH
  • 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 8129309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:16:11+00:00 2026-06-06T08:16:11+00:00

I’ve just moved over from shared to dedicated hosting, and suddenly POST is not

  • 0

I’ve just moved over from shared to dedicated hosting, and suddenly POST is not working. The variables are being sent according to firebug

jquery....min.js (line 4)
HeadersPostResponseHTML
Parametersapplication/x-www-form-urlencoded
current_subtab_1    0
current_tab_1   0
delivery_options    Standard (5 working days)
new_copies  1500
p_binding   Portrait
p_colours_fs    Full Colour. (CMYK Process)
p_colours_fs_c  No Lamination
p_colours_t Full Colour. (CMYK Process)
p_copies    1000
p_cover Self Cover
p_cover_c   Silk
p_format    A4 (Portrait Only)
p_pages 8
p_paper 130 GSM, coated
p_paper_type    Silk
Source
current_tab_1=0&current_subtab_1=0&delivery_options=Standard+(5+working+days)&    p_copies=1000&p_paper=130+GSM%2C+coated&p_paper_type=Silk&p_colours_t=Full+Colour.+(CMYK+Process)&p_pages=8&p_binding=Portrait&p_format=A4+(Portrait+Only)&p_cover=Self+Cover

But when I turn on error reporting on the server side, it says all variables are undefined. Yes they are defined correctly and the scripts worked fine before…

<br />
<b>Notice</b>:  Undefined index:  current_tab_1 in <b>calculate.php</b> on line     <b>6</b><br />
<br />
<b>Notice</b>:  Undefined index:  current_tab_1 in <b>calculate.php</b> on line     <b>215</b><br />
<br />
<b>Notice</b>:  Undefined index:  current_subtab_1 in <b>calculate.php</b> on line     <b>216</b><br />
<br />
<b>Notice</b>:  Undefined index:  p_format in <b>calculate.php</b> on line <b>220</b><br />

etc

So why is it doing this? Is there something I need to changed (a php.ini, config) setting? It must be a PHP thing

UPDATE:

I did a print_r($_POST); to see if anything is being posted and it returned an empty array

EDIT:

client side

if (current_tab == 0) {
    if (current_subtab == 0) {
        if ($("#saddle_brochure_copies").val() != "Please select...") {
            if ($("#saddle_brochure_copies").val().match('^(0|[1-9][0-9]*)$')) {

                if ($("#saddle_brochure_copies").val() != 25000) {
                    var new_copies = $('#saddle_brochure_copies option:selected').next().val(); //get next selected option for offer price
                }

                var p_copies = $("#saddle_brochure_copies"),
                    p_paper = $("#saddle_brochure_paper"),
                    p_paper_type = $("#saddle_brochure_paper_type"),
                    p_colours_t = $("#saddle_brochure_colours_t"),
                    p_pages = $("#saddle_brochure_pages"),
                    p_binding = $("#saddle_brochure_binding"),
                    p_format = $("#saddle_brochure_format"),
                    p_cover = $("#saddle_brochure_cover"),
                    p_cover_c = $("#saddle_brochure_cover_c"),
                    p_colours_fs = $("#saddle_brochure_colours_fs"),
                    p_colours_fs_c = $("#saddle_brochure_colours_fs_c"),
                    allFields = $([]).add(p_copies).add(p_paper).add(p_paper_type).add(p_colours_t).add(p_pages).
                                    add(p_binding).add(p_format).add(p_cover).add(p_cover_c).add(p_colours_fs).add(p_colours_fs_c),
                                    tips = $(".validateTips");

                $.post("order/calculate.php", {
                    current_tab_1: current_tab,
                    current_subtab_1: current_subtab,
                    delivery_options: delivery_options.val(),
                    p_copies: p_copies.val(),
                    p_paper: p_paper.val(),
                    p_paper_type: p_paper_type.val(),
                    p_colours_t: p_colours_t.val(),
                    p_pages: p_pages.val(),
                    p_binding: p_binding.val(),
                    p_format: p_format.val(),
                    p_cover: p_cover.val(),
                    p_cover_c: p_cover_c.val(),
                    p_colours_fs: p_colours_fs.val(),
                    p_colours_fs_c: p_colours_fs_c.val(),
                    new_copies: new_copies
                }, function (data) {
                    var resultArray = eval('(' + data + ')');
                    checkIfNull();
                    $(".value_2").append("&pound;");
                    if ($("#hf_quote").val() != null) {
                        $("#hf_quote").val(null);
                    }
                    $("#hf_quote").val(resultArray[0]);
                    if ($("#hf_vat").val() != null) {
                        $("#hf_vat").val(null);
                    }
                    $("#hf_vat").val(resultArray[1]);
                    cashFlow($('.value'), 0, resultArray[0], 1 * 1000, 0);
                    if (resultArray[1] != "No VAT on this product!") {
                        $("#quote_vat").append("&pound;", resultArray[1], " Inc. VAT");
                    } else {
                        $("#quote_vat").append(resultArray[1]);
                    }
                    if (resultArray[2]) {
                        if ($("#quote_offer").text() != null) {
                            $("#quote_offer").text("");
                        }
                        $("#quote_offer").append("Get ", new_copies, " copies for &pound;", resultArray[2]);
                    }
                });

print_r($_REQUEST); returns –

Array (
    [ppRemember] => 35iq0m8oi3ldr1f8603sifpv52 [__utma] => 201771013.995365705.1339148067.1339148067.1339155188.2 [__utmc] => 201771013 [__utmz] => 201771013.1339148067.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none) [__utmb] => 201771013.9.10.1339155188
)

print_r($_GET); returns empty array

server side code in question

if ($_POST['current_tab_1']==0) {
   if ($_POST['current_subtab_1']==0) {
    //for saddle stitched brochures
    //cost 1

    $format = strip_tags(substr($_POST['p_format'],0,100)); //format
    $B = strip_tags(substr($_POST['p_copies'],0,10)); //copies
    $C1 = strip_tags(substr($_POST['p_paper'],0,100)); //paper inner pages
    $C2 = strip_tags(substr($_POST['p_cover'],0,100));
    $lamination = strip_tags(substr($_POST['p_colours_fs_c'],0,100)); //lamination
    $P = strip_tags(substr($_POST['p_pages'],0,100));
    $new_copies = strip_tags(substr($_POST['new_copies'],0,100));

    }
}

UPDATE:

I tried echo $_POST[‘current_tab_1’]; right at the top of script and it returned an undefined error.

Also noticed one of the errors is this…?

Fatal error: Call to undefined function json_encode() in calculate.php on line 975

which is a built in function.. right?

  • 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-06T08:16:12+00:00Added an answer on June 6, 2026 at 8:16 am

    found out why everything wasn’t working. Tried updating my server from 5.1.6 to 5.3 using plesk control panel, which ended up breaking halfway through the installation. When I finally got it working again I reverted back to 5.1.6 and decided to do the update another time. I presume it messed up my php installation, because after I updated to 5.3 successfully, everything started working again.

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

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am currently running into a problem where an element is coming back from
I need a function that will clean a strings' special characters. I do NOT

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.