php-windows Digest 23 Feb 2008 08:41:46 -0000 Issue 3436

Topics (messages 28810 through 28814):

How do IF to redirect to a new page on my site?
        28810 by: Greg Cocks
        28811 by: Bill Bolte
        28813 by: germana

Re: PHP Mail Delayed
        28812 by: Bill Bolte

Um|   How can i
        28814 by: Pehden

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Hello,

I have a page <foo_query_select.php> where some users set some
parameters from pulldowns on a page (in a form.)

Based on the user selection, the code builds some SQL (i.e., building
the WHERE part of the SQL string), and grabs some data out of a
PostgreSQL, and returns it to an array, $ary_query_result

Then:

if(isset($ary_query_result))    {
                                          ...
                                          serialize array to text file
                                          few other tasks
                                          ['jump' to results page]
                                        ...
                                        }
                                        else
                                        {
                                          ...
                                          tell user to adjust parameters
                                          [stay on page] 
                                          ...
                                        }

I have built a results page that unserializes the results array above,
displays some of them in a table, and allows the user to chart, save all
the data columns & rows, etc - all works fine.


HERE IS THE PROBLEM: how do I ['jump' to results page]????

This would seem such a simple thing to do...

i.e., IF (condition) go to new url ELSE stay at this URL


-----

I tried:

(i) print "<script language... windows.location = \"foo_results.php\";
<\script>"
this works OK in Mozilla, funny frame refresh of foo_query.php before it
redirects to foo_results.php but I can live with that BUT it does not
work in IE, just (seemingly) refreshes foo_query.php

(ii) <meta http-equiv="refresh" ... />
Ugly I know (!) - again OK in Mozilla BUT again it does not work in IE,
same result (or lack)

(iii) Googled for more, tried a few, no luck - arghhh!!!

I guess I could create the SQL and get the data on the results page, and
use action="foo_results.php" on the form, passing the parameters as
$_SESSION variables - but what about if no results returned, etc, etc,
etc...



**************
*  HELP!!!!  *
**************

Thanks in advance...   :-)

P.S. When they return to the query page for a new search (in the same
session) from the results page (in Mozilla!), the check box values are
still set - tried using onload="javascript:document.forms[0].reset();"
in the <body> tag and a few other things - no luck, they stay set!! -
any thoughts?


----------
Regards,
GREG COCKS
GIS Analyst V
Gcocks|at|stoller.com
S. M. Stoller Corp
105 Technology Drive, Suite 190
Broomfield, CO 80021
www.stoller.com
303-546-4300
303-443-1408 fax
303-546-4422 direct
303-828-7576 cell

--- End Message ---
--- Begin Message ---
http://us.php.net/header 


header('Location: http://www.example.com/');

Just make sure that nothing is echo/print out to the page before doing
the header call, don't even have any spaces before your <?php tag, or it
will generate an error.

Bill


-----Original Message-----
From: Greg Cocks [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 22, 2008 2:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] How do IF to redirect to a new page on my site?

Hello,

I have a page <foo_query_select.php> where some users set some
parameters from pulldowns on a page (in a form.)

Based on the user selection, the code builds some SQL (i.e., building
the WHERE part of the SQL string), and grabs some data out of a
PostgreSQL, and returns it to an array, $ary_query_result

Then:

if(isset($ary_query_result))    {
                                          ...
                                          serialize array to text file
                                          few other tasks
                                          ['jump' to results page]
                                        ...
                                        }
                                        else
                                        {
                                          ...
                                          tell user to adjust parameters
                                          [stay on page] 
                                          ...
                                        }

I have built a results page that unserializes the results array above,
displays some of them in a table, and allows the user to chart, save all
the data columns & rows, etc - all works fine.


HERE IS THE PROBLEM: how do I ['jump' to results page]????

This would seem such a simple thing to do...

i.e., IF (condition) go to new url ELSE stay at this URL


-----

I tried:

(i) print "<script language... windows.location = \"foo_results.php\";
<\script>"
this works OK in Mozilla, funny frame refresh of foo_query.php before it
redirects to foo_results.php but I can live with that BUT it does not
work in IE, just (seemingly) refreshes foo_query.php

(ii) <meta http-equiv="refresh" ... />
Ugly I know (!) - again OK in Mozilla BUT again it does not work in IE,
same result (or lack)

(iii) Googled for more, tried a few, no luck - arghhh!!!

I guess I could create the SQL and get the data on the results page, and
use action="foo_results.php" on the form, passing the parameters as
$_SESSION variables - but what about if no results returned, etc, etc,
etc...



**************
*  HELP!!!!  *
**************

Thanks in advance...   :-)

P.S. When they return to the query page for a new search (in the same
session) from the results page (in Mozilla!), the check box values are
still set - tried using onload="javascript:document.forms[0].reset();"
in the <body> tag and a few other things - no luck, they stay set!! -
any thoughts?


----------
Regards,
GREG COCKS
GIS Analyst V
Gcocks|at|stoller.com
S. M. Stoller Corp
105 Technology Drive, Suite 190
Broomfield, CO 80021
www.stoller.com
303-546-4300
303-443-1408 fax
303-546-4422 direct
303-828-7576 cell

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
try changing print for echo  or header

On Fri, 2008-02-22 at 13:56 -0700, Greg Cocks wrote:

> Hello,
> 
> I have a page <foo_query_select.php> where some users set some
> parameters from pulldowns on a page (in a form.)
> 
> Based on the user selection, the code builds some SQL (i.e., building
> the WHERE part of the SQL string), and grabs some data out of a
> PostgreSQL, and returns it to an array, $ary_query_result
> 
> Then:
> 
> if(isset($ary_query_result))  {
>                                         ...
>                                         serialize array to text file
>                                         few other tasks
>                                         ['jump' to results page]
>                                       ...
>                                       }
>                                       else
>                                       {
>                                         ...
>                                         tell user to adjust parameters
>                                         [stay on page] 
>                                         ...
>                                       }
> 
> I have built a results page that unserializes the results array above,
> displays some of them in a table, and allows the user to chart, save all
> the data columns & rows, etc - all works fine.
> 
> 
> HERE IS THE PROBLEM: how do I ['jump' to results page]????
> 
> This would seem such a simple thing to do...
> 
> i.e., IF (condition) go to new url ELSE stay at this URL
> 
> 
> -----
> 
> I tried:
> 
> (i) print "<script language... windows.location = \"foo_results.php\";
> <\script>"
> this works OK in Mozilla, funny frame refresh of foo_query.php before it
> redirects to foo_results.php but I can live with that BUT it does not
> work in IE, just (seemingly) refreshes foo_query.php
> 
> (ii) <meta http-equiv="refresh" ... />
> Ugly I know (!) - again OK in Mozilla BUT again it does not work in IE,
> same result (or lack)
> 
> (iii) Googled for more, tried a few, no luck - arghhh!!!
> 
> I guess I could create the SQL and get the data on the results page, and
> use action="foo_results.php" on the form, passing the parameters as
> $_SESSION variables - but what about if no results returned, etc, etc,
> etc...
> 
> 
> 
> **************
> *  HELP!!!!  *
> **************
> 
> Thanks in advance...   :-)
> 
> P.S. When they return to the query page for a new search (in the same
> session) from the results page (in Mozilla!), the check box values are
> still set - tried using onload="javascript:document.forms[0].reset();"
> in the <body> tag and a few other things - no luck, they stay set!! -
> any thoughts?
> 
> 
> ----------
> Regards,
> GREG COCKS
> GIS Analyst V
> Gcocks|at|stoller.com
> S. M. Stoller Corp
> 105 Technology Drive, Suite 190
> Broomfield, CO 80021
> www.stoller.com
> 303-546-4300
> 303-443-1408 fax
> 303-546-4422 direct
> 303-828-7576 cell
> 

--- End Message ---
--- Begin Message ---
I would talk to your ISP to see what may need to be set.


Bill


-----Original Message-----
From: Chuck [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 21, 2008 8:43 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] PHP Mail Delayed

My ISP recently installed PHP on a Windows 2003 server. I am trying to
use
PHP to allow users to send form generated EMIL from our website.

The interface works but the mail takes 3-4 hours to arrive.

Is there a configuration setting that could be causing this problem?

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
How can I store a regetsered user name and password in a file as an array then 
search the file to verfy that the user has the certian password.
   


BTW: I have a reay neat site. Please check it out when yo get a chance (Pehdens 
Gallary).
  Ttyl.
   
   
  
   
  Click this add to support freeloading! You dont have to sign up or anything!
          
       
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

--- End Message ---

Reply via email to