468,290 Members | 1,993 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,290 developers. It's quick & easy.

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

Oct 29 '06 #1
5 2583
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("display_errors","1");
error_reporting(E_ALL);

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Oct 29 '06 #2
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("display_errors","1");
error_reporting(E_ALL);

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Oct 29 '06 #3
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("display_errors","1");
error_reporting(E_ALL);

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Oct 29 '06 #4
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("display_errors","1");
error_reporting(E_ALL);

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Oct 29 '06 #5
JasonDamianUs wrote:
JasonDamianUs wrote:
>>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("display_errors","1");
error_reporting(E_ALL);

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.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.
js*******@attglobal.net
==================
Oct 29 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by David Bradbury | last post: by
3 posts views Thread by Leo J. Hart IV | last post: by
13 posts views Thread by deko | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.