PHP Form Processing hangs page load

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JasonDamianUs

    PHP Form Processing hangs page load

    Hello all,

    I am trying to write a simple PHP script to process a form.. the
    function seems to be working fine

    // subscriber is the users email in the form
    if (( $subscriber ) && ($_SERVER['REQUEST_METHOD '] == 'POST') )

    thing is while this processing is taking place the page load hangs...
    in IE i see nothing the page background, in Firefox (even worse) I get
    only 1/2 the page....

    I would like the whole page to load the the processign to take place,
    except that my PHP is 1/2 way down the page, inside the form

    Any help would be greatly appreciated.

    Thanks

    Jason

  • Jerry Stuckle

    #2
    Re: PHP Form Processing hangs page load

    JasonDamianUs wrote:
    Hello all,
    >
    I am trying to write a simple PHP script to process a form.. the
    function seems to be working fine
    >
    // subscriber is the users email in the form
    if (( $subscriber ) && ($_SERVER['REQUEST_METHOD '] == 'POST') )
    >
    thing is while this processing is taking place the page load hangs...
    in IE i see nothing the page background, in Firefox (even worse) I get
    only 1/2 the page....
    >
    I would like the whole page to load the the processign to take place,
    except that my PHP is 1/2 way down the page, inside the form
    >
    Any help would be greatly appreciated.
    >
    Thanks
    >
    Jason
    >
    Jason,

    This should not hang the processing, unless you have a loop or error in
    your PHP code.

    What do you get if you add the following to the start of your PHP code?

    ini_set("displa y_errors","1");
    error_reporting (E_ALL);

    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    • JasonDamianUs

      #3
      Re: PHP Form Processing hangs page load

      jerry,

      thanks for the prompt response

      those functions produce -
      1
      2037

      Jerry Stuckle wrote:
      JasonDamianUs wrote:
      Hello all,

      I am trying to write a simple PHP script to process a form.. the
      function seems to be working fine

      // subscriber is the users email in the form
      if (( $subscriber ) && ($_SERVER['REQUEST_METHOD '] == 'POST') )

      thing is while this processing is taking place the page load hangs...
      in IE i see nothing the page background, in Firefox (even worse) I get
      only 1/2 the page....

      I would like the whole page to load the the processign to take place,
      except that my PHP is 1/2 way down the page, inside the form

      Any help would be greatly appreciated.

      Thanks

      Jason
      >
      Jason,
      >
      This should not hang the processing, unless you have a loop or error in
      your PHP code.
      >
      What do you get if you add the following to the start of your PHP code?
      >
      ini_set("displa y_errors","1");
      error_reporting (E_ALL);
      >
      --
      =============== ===
      Remove the "x" from my email address
      Jerry Stuckle
      JDS Computer Training Corp.
      jstucklex@attgl obal.net
      =============== ===

      Comment

      • JasonDamianUs

        #4
        Re: PHP Form Processing hangs page load

        sorry,

        obviously I was not supposed to display those results.

        I have to lookup the function to see how to obtain the results

        Jason

        JasonDamianUs wrote:
        jerry,
        >
        thanks for the prompt response
        >
        those functions produce -
        1
        2037
        >
        Jerry Stuckle wrote:
        JasonDamianUs wrote:
        Hello all,
        >
        I am trying to write a simple PHP script to process a form.. the
        function seems to be working fine
        >
        // subscriber is the users email in the form
        if (( $subscriber ) && ($_SERVER['REQUEST_METHOD '] == 'POST') )
        >
        thing is while this processing is taking place the page load hangs...
        in IE i see nothing the page background, in Firefox (even worse) I get
        only 1/2 the page....
        >
        I would like the whole page to load the the processign to take place,
        except that my PHP is 1/2 way down the page, inside the form
        >
        Any help would be greatly appreciated.
        >
        Thanks
        >
        Jason
        >
        Jason,

        This should not hang the processing, unless you have a loop or error in
        your PHP code.

        What do you get if you add the following to the start of your PHP code?

        ini_set("displa y_errors","1");
        error_reporting (E_ALL);

        --
        =============== ===
        Remove the "x" from my email address
        Jerry Stuckle
        JDS Computer Training Corp.
        jstucklex@attgl obal.net
        =============== ===

        Comment

        • JasonDamianUs

          #5
          Re: PHP Form Processing hangs page load

          ok.

          I move those functions to the very beginning of my code

          it produces

          Notice: Undefined index: subscriber in
          /homepages/43/d94351932/htdocs/email/email.php on line 22


          Which referes to the line
          $subscriber = $_POST['subscriber']; // get the subscriber name

          Not sure why that is invalid, isnt that how you declare variables in
          PHP??

          Also the code works, so I am confused.

          thanks


          Jason




          JasonDamianUs wrote:
          jerry,
          >
          thanks for the prompt response
          >
          those functions produce -
          1
          2037
          >
          Jerry Stuckle wrote:
          JasonDamianUs wrote:
          Hello all,
          >
          I am trying to write a simple PHP script to process a form.. the
          function seems to be working fine
          >
          // subscriber is the users email in the form
          if (( $subscriber ) && ($_SERVER['REQUEST_METHOD '] == 'POST') )
          >
          thing is while this processing is taking place the page load hangs...
          in IE i see nothing the page background, in Firefox (even worse) I get
          only 1/2 the page....
          >
          I would like the whole page to load the the processign to take place,
          except that my PHP is 1/2 way down the page, inside the form
          >
          Any help would be greatly appreciated.
          >
          Thanks
          >
          Jason
          >
          Jason,

          This should not hang the processing, unless you have a loop or error in
          your PHP code.

          What do you get if you add the following to the start of your PHP code?

          ini_set("displa y_errors","1");
          error_reporting (E_ALL);

          --
          =============== ===
          Remove the "x" from my email address
          Jerry Stuckle
          JDS Computer Training Corp.
          jstucklex@attgl obal.net
          =============== ===

          Comment

          • Jerry Stuckle

            #6
            Re: PHP Form Processing hangs page load

            JasonDamianUs wrote:
            JasonDamianUs wrote:
            >>Jerry Stuckle wrote:
            >>
            >>>JasonDamianU s wrote:
            >>>
            >>>>Hello all,
            >>>>
            >>>>I am trying to write a simple PHP script to process a form.. the
            >>>>function seems to be working fine
            >>>>
            >>>>// subscriber is the users email in the form
            >>>>if (( $subscriber ) && ($_SERVER['REQUEST_METHOD '] == 'POST') )
            >>>>
            >>>>thing is while this processing is taking place the page load hangs...
            >>>>in IE i see nothing the page background, in Firefox (even worse) I get
            >>>>only 1/2 the page....
            >>>>
            >>>>I would like the whole page to load the the processign to take place,
            >>>>except that my PHP is 1/2 way down the page, inside the form
            >>>>
            >>>>Any help would be greatly appreciated.
            >>>>
            >>>>Thanks
            >>>>
            >>>>Jason
            >>>>
            >>>
            >>>Jason,
            >>>
            >>>This should not hang the processing, unless you have a loop or error in
            >>>your PHP code.
            >>>
            >>>What do you get if you add the following to the start of your PHP code?
            >>>
            >>>ini_set("dis play_errors","1 ");
            >>>error_report ing(E_ALL);
            >>>
            >>>--
            >>>============ ======
            >>>Remove the "x" from my email address
            >>>Jerry Stuckle
            >>>JDS Computer Training Corp.
            >>>jstucklex@at tglobal.net
            >>>============ ======
            >>jerry,
            >>
            >>thanks for the prompt response
            >>
            >>those functions produce -
            >1
            >>2037
            >>
            ok.
            >
            I move those functions to the very beginning of my code
            >
            it produces
            >
            Notice: Undefined index: subscriber in
            /homepages/43/d94351932/htdocs/email/email.php on line 22
            >
            >
            Which referes to the line
            $subscriber = $_POST['subscriber']; // get the subscriber name
            >
            Not sure why that is invalid, isnt that how you declare variables in
            PHP??
            >
            Also the code works, so I am confused.
            >
            thanks
            >
            >
            Jason
            >
            >
            (top posting fixed)

            Yep. It means that $_POST doesn't have an element in the array with the
            key 'subscriber'. Either it's not in the form you posted here or you
            spelled it differently.

            You should always verify $_GET and $_POST elements exist before
            assigning them, i.e.

            $subscriber = isset($_POST['subscriber']) ? $_POST['subscriber'] : null;

            or something similar.

            P.S. Please don't top post.

            --
            =============== ===
            Remove the "x" from my email address
            Jerry Stuckle
            JDS Computer Training Corp.
            jstucklex@attgl obal.net
            =============== ===

            Comment

            Working...