You can use a PHP workarround. Install a custom ob_handler, that has a
static file descriptor, and writes all output to the file. In order to also
see everything, you need to also activate implicit flush. i know that there
would be lots of elegant ways to do this on linux in C, but AFAIK php
bruce wrote:
hi...
got a situation where i have a parent app that spawns children. trying
to figure out how to get the output of the spawned/forked children to
be written to an external file...
Normally I would use freopen() on stdout and stderr, but that's not
available in PHP :-(
can't
...
Really, for URLs that don't exist you should be showing a 404, This
way the user doesn't falsely believe that the URL is a valid one and
keep using it. By using the ErrorDocument directive like Per
suggested, you can customise it to be distinct helpful, like this:
Richard Heyes wrote:
...
Really, for URLs that don't exist you should be showing a 404, This
way the user doesn't falsely believe that the URL is a valid one and
keep using it. By using the ErrorDocument directive like Per
suggested, you can customise it to be distinct helpful
Apache also
What if the file exists, but it's kinda file to update database, like
// get request $_REQUEST
// execute sql statement to update database
// redirect to the other page, showing results?
in this case 404 approach does not mean to do correctly, so what else is
suggested?
2009/1/22 Per Jessen
What if the file exists, but it's kinda file to update database, like
GET requests shouldn't really modify data.
--
Richard Heyes
HTML5 Graphing for Firefox, Chrome, Opera and Safari:
http://www.rgraph.org (Updated January 17th)
--
PHP General Mailing List (http://www.php.net/)
To
Morris wrote:
What if the file exists, but it's kinda file to update database, like
// get request $_REQUEST
// execute sql statement to update database
// redirect to the other page, showing results?
in this case 404 approach does not mean to do correctly, so what else
is suggested?
I
Richard Heyes schreef:
...
Really, for URLs that don't exist you should be showing a 404, This
way the user doesn't falsely believe that the URL is a valid one and
keep using it.
if the invalid URL (which outputs a 404 header) then automatically redirects
to another URL then I think it's
On Wed, Jan 21, 2009 at 10:12 AM, Dušan Novaković ndu...@gmail.com wrote:
Hi,
Is there some elegant solution how to redirect if someone try to open
some non existing page (e.g www.domain.com/nonexistingpage.php) to
main page www.domain.com on website?
thnx, Dusan
--
made by Dusan
--
2009/1/21 Kyle Terry k...@kyleterry.com:
On Wed, Jan 21, 2009 at 10:12 AM, Dušan Novaković ndu...@gmail.com wrote:
Hi,
Is there some elegant solution how to redirect if someone try to open
some non existing page (e.g www.domain.com/nonexistingpage.php) to
main page www.domain.com on website?
apache :-)
2009/1/21 Kyle Terry k...@kyleterry.com:
2009/1/21 Kyle Terry k...@kyleterry.com:
On Wed, Jan 21, 2009 at 10:12 AM, Dušan Novaković ndu...@gmail.com wrote:
Hi,
Is there some elegant solution how to redirect if someone try to open
some non existing page (e.g
On Wed, Jan 21, 2009 at 10:40 AM, Dušan Novaković ndu...@gmail.com wrote:
apache :-)
2009/1/21 Kyle Terry k...@kyleterry.com:
2009/1/21 Kyle Terry k...@kyleterry.com:
On Wed, Jan 21, 2009 at 10:12 AM, Dušan Novaković ndu...@gmail.com wrote:
Hi,
Is there some elegant solution how to
Dušan Novaković wrote:
Hi,
Is there some elegant solution how to redirect if someone try to open
some non existing page (e.g www.domain.com/nonexistingpage.php) to
main page www.domain.com on website?
See Apache ErrorDocument directive.
/Per Jessen, Zürich
--
PHP General Mailing List
Per Jessen schreef:
Dušan Novaković wrote:
Hi,
Is there some elegant solution how to redirect if someone try to open
some non existing page (e.g www.domain.com/nonexistingpage.php) to
main page www.domain.com on website?
See Apache ErrorDocument directive.
ai,
ErrorDocument 404
On Feb 3, 2008 10:08 PM, Richard Lynch [EMAIL PROTECTED] wrote:
On Fri, February 1, 2008 10:58 pm, js wrote:
Hi,
I was trying to write a script in PHP that takes a program name
as an argument and invoke it as a daemon.
PHP provides fork(pcntl_fork), setsid(posix_setsid) and umask,
On Fri, February 1, 2008 10:58 pm, js wrote:
Hi,
I was trying to write a script in PHP that takes a program name
as an argument and invoke it as a daemon.
PHP provides fork(pcntl_fork), setsid(posix_setsid) and umask,
so it was easy.
However, I couldn't find a way to redirect STDERR a
js wrote:
I was trying to write a script in PHP that takes a program name
as an argument and invoke it as a daemon.
PHP provides fork(pcntl_fork), setsid(posix_setsid) and umask,
so it was easy.
However, I couldn't find a way to redirect STDERR a file.
I like to have the daemon write its
nohup would work in some ways, but that's not a real daemon
because the process will have tty, in a session and has a process group.
I like to have a real daemon.
On Feb 2, 2008 5:25 PM, Per Jessen [EMAIL PROTECTED] wrote:
js wrote:
I was trying to write a script in PHP that takes a program
js wrote:
nohup would work in some ways, but that's not a real daemon
because the process will have tty, in a session and has a process
group. I like to have a real daemon.
Well, it depends on what you're after. Are you solving a problem or are
you doing an exercise because you can?
If
Hi Per,
nohup would work in some ways, but that's not a real daemon
because the process will have tty, in a session and has a process
group. I like to have a real daemon.
Well, it depends on what you're after. Are you solving a problem or are
you doing an exercise because you can?
Not
js wrote:
C would be the last resort. I suppose it would be easily done in Perl,
but most of my colleagues prefer PHP.
I love to make taking over the code easy, so PHP is more preferable to
me.
That makes perfect sense, but sometimes PHP is not the best/right
answer.
What I think you need
C would be the last resort. I suppose it would be easily done in Perl,
but most of my colleagues prefer PHP.
I love to make taking over the code easy, so PHP is more preferable to
me.
That makes perfect sense, but sometimes PHP is not the best/right
answer.
What I think you need to do
C would be the last resort. I suppose it would be easily done in Perl,
but most of my colleagues prefer PHP.
I love to make taking over the code easy, so PHP is more preferable to
me.
That makes perfect sense, but sometimes PHP is not the best/right
answer.
What I think you need to do is:
On Wed, June 13, 2007 11:12 pm, Yamil Ortega wrote:
Lets say that I have the next structure on my web directory
/file1.php
/procces/file2.php
/file3.php
So, when I see the file1.php on the browser I see the page in this
route
http://localhost/apache2/file1.php
I have a button that
On Apr 25, 2007, at 8:25 AM, Don Don wrote:
Hi all, whats the best way to perform a redirect after out put
has started ? using header:location will not work unless theres
been no output.
I usuall use the method below, however am concerned for browsers
that do not support
At 6:25 AM -0700 4/25/07, Don Don wrote:
Hi all, whats the best way to perform a redirect after out put
has started ? using header:location will not work unless theres
been no output.
I usuall use the method below, however am concerned for browsers
that do not support javascript.
On Wed, April 25, 2007 8:25 am, Don Don wrote:
Hi all, whats the best way to perform a redirect after out put has
started ? using header:location will not work unless theres been no
output.
The BEST way is to re-structure your code logically, with the heavy
lifting calculations done
Larry Bradley wrote:
I need to goto different PHP pages in my web site depending on what
happens within some PHP code.
For example, if the user is not logged in when he goes to a page, I want
to send him to a LOGIN page.
I've have everything working fine, using the following Javascript
At 11:28 PM -0500 3/14/07, Richard Lynch wrote:
On Tue, March 13, 2007 11:54 pm, Chris Shiflett wrote:
Tijnema wrote:
Did you guys ever noted that little arrow down just right of
the back button, where you can go back 2 steps at once, so you
don't have to click very fast?
I think we
- Original Message -
From: tedd [EMAIL PROTECTED]
At 11:28 PM -0500 3/14/07, Richard Lynch wrote:
On Tue, March 13, 2007 11:54 pm, Chris Shiflett wrote:
Tijnema wrote:
Did you guys ever noted that little arrow down just right of
the back button, where you can go back 2 steps at
On 3/14/07, Chris Shiflett [EMAIL PROTECTED] wrote:
Tijnema wrote:
Did you guys ever noted that little arrow down just right of
the back button, where you can go back 2 steps at once, so you
don't have to click very fast?
I think we both remember browsing before that feature was invented.
On 3/13/07 4:50 PM, Tijnema ! wrote:
Did you guys ever noted that little arrow down just right of the back
button, where you can go back 2 steps at once, so you don't have to
click very fast??
Browsers have buttons in them? Next thing, you'll be telling me I can
see images and color in my
On Tue, March 13, 2007 3:41 pm, Chris Shiflett wrote:
Robert Cummings wrote:
I've found clicking really fast can get you back :)
I, too, have successfully used this technique. :-)
+1
Sometimes back button followed at just the right time by top so I
get the HTML, but no JS runs.
--
Some
On Tue, March 13, 2007 3:50 pm, Tijnema ! wrote:
On 3/13/07, Chris Shiflett [EMAIL PROTECTED] wrote:
Robert Cummings wrote:
I've found clicking really fast can get you back :)
I, too, have successfully used this technique. :-)
Chris
Did you guys ever noted that little arrow down just
On Tue, March 13, 2007 11:54 pm, Chris Shiflett wrote:
Tijnema wrote:
Did you guys ever noted that little arrow down just right of
the back button, where you can go back 2 steps at once, so you
don't have to click very fast?
I think we both remember browsing before that feature was invented.
On 3/12/07, Larry Bradley [EMAIL PROTECTED] wrote:
I need to goto different PHP pages in my web site depending on what
happens within some PHP code.
For example, if the user is not logged in when he goes to a page, I want to
send him to a LOGIN page.
I've have everything working fine, using
If you do want to use the header function after html has been output, you
can always look at using output buffering (ob_start()).
On Tue, 2007-03-13 at 21:50 +0100, Tijnema ! wrote:
On 3/13/07, Chris Shiflett [EMAIL PROTECTED] wrote:
Robert Cummings wrote:
I've found clicking really fast can get you back :)
I, too, have successfully used this technique. :-)
Chris
Did you guys ever noted that little arrow down
Tijnema wrote:
Did you guys ever noted that little arrow down just right of
the back button, where you can go back 2 steps at once, so you
don't have to click very fast?
I think we both remember browsing before that feature was invented.
Chris
--
Chris Shiflett
http://shiflett.org/
--
PHP
On 3/12/07, Larry Bradley [EMAIL PROTECTED] wrote:
I need to goto different PHP pages in my web site depending on what
happens within some PHP code.
For example, if the user is not logged in when he goes to a page, I want
to
send him to a LOGIN page.
I've have everything working fine, using
On Mon, 2007-03-12 at 22:43 +0100, Satyam wrote:
The only way to actually go back in
those is to open the dropdown list for the back button and skip over one
item.
I've found clicking really fast can get you back :)
That does not happen when using the header() PHP function.
That is my
On Wed, July 20, 2005 1:04 pm, Matt Darby said:
babu wrote:
It will become a big mess up for me if i combine all the files as they
are large files.
Scenario #1:
Use include/require to suck in the files, when needed.
Scenario #2:
Use header(Location: ) to re-direct the browser to another file.
babu wrote:
I am using header method for redirecting to another php file.I also want to
pass some variables to the redirected file.
for example:
file1.html where i have a dropdown menu. the user selects the options...
this form has a action to file2.php
file2.php--- i get the values of
It will become a big mess up for me if i combine all the files as they are
large files.
Matt Darby [EMAIL PROTECTED] wrote:
babu wrote:
I am using header method for redirecting to another php file.I also want to
pass some variables to the redirected file.
for example:
file1.html where i
babu wrote:
It will become a big mess up for me if i combine all the files as they are
large files.
Matt Darby [EMAIL PROTECTED] wrote:
babu wrote:
I am using header method for redirecting to another php file.I also want to
pass some variables to the redirected file.
for example:
does session.auto_start should be set to 1 for sessions to work.
Mikey [EMAIL PROTECTED] wrote:babu wrote:
I am using header method for redirecting to another php file.I also want to
pass some variables to the redirected file.
for example:
file1.html where i have a dropdown menu. the user
babu wrote:
does session.auto_start should be set to 1 for sessions to work.
Mikey [EMAIL PROTECTED] wrote:babu wrote:
I am using header method for redirecting to another php file.I also want to
pass some variables to the redirected file.
for example:
file1.html where i have a
You can send a header to redirect like below.
?php
header(location: successpage.php);
?
Or you can print out some javascript
location.href='successpage.php';
-randy rinehart
- Original Message -
From: Judson Vaughn [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 22,
[snip]
I have a create_login.php page, which works (it inserts data into the
database), but I need for the script once executed to redirect to a
success.php page.
[/snip]
http://www.php.net/header
header(Location: success.php); exit();
--
PHP General Mailing List (http://www.php.net/)
To
On Mon, 2004-11-22 at 09:13 -0500, Judson Vaughn wrote:
Group,
I have a create_login.php page, which works (it inserts data into the
database), but I need for the script once executed to redirect to a
success.php page.
It doesn't do this and I can't figure out how to do it. I've
Hello Judson,
Monday, November 22, 2004, 2:13:13 PM, you wrote:
JV The original script, created by Dreamweaver, gives an error that says
JV header has already been sent. I tried different options to no avail. I
JV realize this script is now seriously hosed but thought I would include
JV it
eh hem,,, that is a great question to consult the manual... but as for a
hint, search for header()
Jason
AMC [EMAIL PROTECTED] wrote:
Hi,
What code do I use to redirect a user to a different page in php?
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
--- AMC [EMAIL PROTECTED] wrote:
What code do I use to redirect a user to a different page in php?
There are several methods, but my favorite is to use a Location header
which also changes the response status code. This method is transparent to
the history mechanism, so users can still click the
bruce wrote:
hi...
can anyone point me to a way to do a page redirect using the php 'Header'
function to another frame. I have a page in one frame, when the user does a
submit, i want to have the app do a redirect using the 'Header' function,
with the subsequent page being displayed in another
bruce wrote:
can anyone point me to a way to do a page redirect using the php 'Header'
function to another frame.
No. Use Javascript.
--
John Holmes
php|architect - The magazine for PHP professionals - http://www.phparch.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
hi...
can anyone point me to a way to do a page redirect using the php 'Header'
function to another frame. I have a page in one frame, when the user does
a
submit, i want to have the app do a redirect using the 'Header' function,
with the subsequent page being displayed in another frame.
On Wed, 18 Feb 2004 17:19:03 +1100
ajay [EMAIL PROTECTED] wrote:
snip
i want the user to have say 5s to read that page and then be
redirected to another page.
/snip
'Not sure if it's only me but I think I've seen this recently ;)
http://marc.theaimsgroup.com/?t=10769831404r=1w=2
ajay wrote:
hi!
after having trawled through many google articles, i've been told that the best
way to redirect a person is using header(Location:url);
the problem is, i have form that is posted to another php script. This script then
processes the form and then writes up a html page and includes
Stick something like this in your html head/head:
meta HTTP-EQUIV=REFRESH CONTENT=5; URL=blah.php
Location won't work because you've already sent output to the browser.
Ian
On Wed, 2004-02-18 at 07:19, ajay wrote:
hi!
after having trawled through many google articles, i've been told that
--- Chris W [EMAIL PROTECTED] wrote:
3 of the fields in this form are to store various URL's so if they
are long URL's it is easy to see how I could go over the limit of
the max url length. So my question is what is the best alternative?
Is there a way to redirect and use a post instead of a
Chris W wrote:
In this application I am working on, if there is a problem with the
data, I use a redirect to go back to the form and send the data with an
error message in a get. That way the user doesn't need to retype
everything. Most errors can be caught with java script before they post
yes, got it working. thanks a lot.. i did use header
--
Thank you,
Louie Miranda ([EMAIL PROTECTED])
- Original Message -
From: Chris Shiflett [EMAIL PROTECTED]
To: Louie Miranda [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, July 18, 2003 11:45 PM
Subject: Re: [PHP] redirecting
,
Mun Heng, Ow
H/M Engineering
Western Digital M'sia
DID : 03-7870 5168
-Original Message-
From: Chris Shiflett [mailto:[EMAIL PROTECTED]
Sent: Friday, July 18, 2003 11:46 PM
To: Louie Miranda; [EMAIL PROTECTED]
Subject: Re: [PHP] redirecting to a url..
--- Louie Miranda [EMAIL PROTECTED
My solution..
echo meta http-equiv=\REFRESH\ CONTENT=\0; URL=us/index.php\;
Or you may have other more advance alternatives?
--
Thank you,
Louie Miranda ([EMAIL PROTECTED])
- Original Message -
From: Louie Miranda [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 18, 2003
Louie Miranda [EMAIL PROTECTED] wrote:
I have this form with 2 values under 1 name ColTemplate. I was hoping if i
can redirect it to another url? on the ?? if templateone or templatetwo.
header('Location: http://domain/file');
Curt
--
--
PHP General Mailing List (http://www.php.net/)
To
thanks, this is much better.
--
Thank you,
Louie Miranda ([EMAIL PROTECTED])
- Original Message -
From: Curt Zirzow [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 18, 2003 2:29 PM
Subject: Re: [PHP] redirecting to a url..
Louie Miranda [EMAIL PROTECTED] wrote:
I have
--- Louie Miranda [EMAIL PROTECTED] wrote:
echo meta http-equiv=\REFRESH\ CONTENT=\0; URL=us/index.php\;
Or you may have other more advance alternatives?
You can use a protocol redirect rather than relying on HTML:
header('Location: http://yoursite.org/us/index.php');
Chris
=
Become a
?php
if(strstr = ($HTTP_USER_AGENT, Mozilla/4)){
header(Location: http://www.mydomain.com/moz4_page.php;)
}
elseif(strstr = ($HTTP_USER_AGENT, MSIE)){
header(Location: http://www.mydomain.com/ie_page.php;)
}
etc...
?
HTML
HEAD
TITLEMy Page/TITLE
/HEAD
etc..
-Original
If I use this on index.html, it does nothing. If I use it on index.php I get:
Parse error: parse error, unexpected '=' in
/path/to/file_named/main.php on line 3
What am I doing wrong
On Tuesday 17 June 2003 02:11 pm, Ralph wrote:
?php
if(strstr = ($HTTP_USER_AGENT, Mozilla/4)){
[snip]
If I use this on index.html, it does nothing. If I use it on index.php
I get:
Parse error: parse error, unexpected '=' in
/path/to/file_named/main.php on line 3
What am I doing wrong
On Tuesday 17 June 2003 02:11 pm, Ralph wrote:
?php
if(strstr = ($HTTP_USER_AGENT, Mozilla/4)){
With that I get:
Parse error: parse error, unexpected T_STRING in /path/to/file_named/main.php
on line 4
Michael
On Tuesday 17 June 2003 02:50 pm, Jay Blanchard wrote:
[snip]
If I use this on index.html, it does nothing. If I use it on index.php
I get:
Parse error: parse error,
]
Sent: Tuesday, June 17, 2003 1:12 PM
To: Jay Blanchard; Ralph; [EMAIL PROTECTED]
Subject: Re: [PHP] Redirecting to index.php from index.html
With that I get:
Parse error: parse error, unexpected T_STRING in
/path/to/file_named/main.php
on line 4
Michael
On Tuesday 17 June 2003 02:50 pm, Jay
Hello,
This is a reply to an e-mail that you wrote on Tue, 17 Jun 2003 at 22:27,
lines prefixed by '' were originally written by you.
Oops. Typos. Try this:
if(strstr($HTTP_USER_AGENT, Mozilla/4)){
header(Location: http://www.mydomain.com/moz4_page.php;);
elseif(strstr($HTTP_USER_AGENT,
Parse error: parse error, unexpected T_STRING in /path/to/file_named/main.php
on line 4
Here is my actual code so you can look at it and see what I am doing
something wrong. I know I must be, since I don't see how php could become so
popular for site development when it appears to be so
Well it does appear to be working because according to this error, the
problem is with main.php on line 4.
-Original Message-
From: Michael [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 17, 2003 2:27 PM
To: Ralph; 'Jay Blanchard'; [EMAIL PROTECTED]
Subject: Re: [PHP] Redirecting
On Tue, 17 Jun 2003 12:41:34 -0600, you wrote:
I'm a relative newbie to PHP coming from the Zope/Python/DTML world. Does
anyone know of a good way, short of a javascript, to redirect from index.html
to index.php. Also, can I use PHP to test for browsers, then redirect them
to the
Argh, I was thinking about the problem backwards, redirect the fp to stdout
is the way to do it.
if(!$argv[1]) $argv[1] = php://stdout;
$fp = fopen($argv[1], w);
fputs($fp,blah\n);
fclose($fp);
On Fri, 2003-02-28 at 15:11, Jeff Bearer wrote:
I'm working on a shell script in php. The script has
You can do it with JavaScript or a Meta refresh, but why?
If both the pages are the same, why even use the HTML one?
Alberto Brea wrote:
Dear list,
My home page is index.html, that doesn't run PHP.
I also have index.php which shows the same content with PHP.
Can I do to automatically redirect a
There are three ways to do this that I can think of.
1.) The first is the most effective but also requires access to the
apache config file:
Find the line that reads:
DirectoryIndex index.html
Change it to read
DirectoryIndex index.html index.php
As always when working with a config file.
Put a .htaccess file in your document root for your website with this
line
DirectoryIndex index.php
Alberto Brea wrote:
My ISP tells me that the home page must be index.html.
However, I cannot make PHP scripts run on this page, so I made an
index.php page with the same content, and thought
Because apache has the same access when a user requests it as when a
page requests it. Try putting it outside of the web root...
Brad Esclavon wrote:
I have written a script that validates a username/pwd input and if usr/pwd
is correct, includes the protected page, or if usr/pwd is wrong,
--- Brad Esclavon [EMAIL PROTECTED] wrote:
the secured page is viewable from the internet if i
explicitly enter the url. I have set the secured
page's permissions to 700 and the input page to 755.
even though my permissions disallow outside access,
why can you get to the secured page?
Your
php.net/header
check out the examples
Andrew
- Original Message -
From: Denis L. Menezes [EMAIL PROTECTED]
To: PHP general list [EMAIL PROTECTED]
Sent: Thursday, January 16, 2003 4:21 PM
Subject: [PHP] Redirecting
Hello friends.
I want ot redirect users to another page after successful
--- Denis L. Menezes [EMAIL PROTECTED] wrote:
I want ot redirect users to another page after successful
login. Can someone please help me with the PHP code for
redirecting?
You have many options:
1. After a successful login, display the proper page to the
user instead of redirecting. This is
On Friday 17 January 2003 01:07, Denis L. Menezes wrote:
I tried. But I get an error as follows :
Warning: Cannot add header information - headers already sent by (output
Try searching the archives on the above error.
--
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source
:10 AM
Subject: Re: [PHP] Redirecting - here is the code
On Friday 17 January 2003 01:07, Denis L. Menezes wrote:
I tried. But I get an error as follows :
Warning: Cannot add header information - headers already sent by (output
Try searching the archives on the above error.
--
Jason
PROTECTED]
Sent: Friday, January 17, 2003 1:10 AM
Subject: Re: [PHP] Redirecting - here is the code
On Friday 17 January 2003 01:07, Denis L. Menezes wrote:
I tried. But I get an error as follows :
Warning: Cannot add header information - headers already sent by (output
Try searching
Hi!
From manual (http://www.php.net/manual/en/function.header.php):
Remember that header() must be called before any actual output is sent,
either by normal HTML tags, blank linek in a file, or from PHP.
You need to start with header()...
Example:
?php
header('Location:
I think your problem is with the meta tag
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 --
header
Also I'm not sure but the !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01
Transitional//EN
might cause problems too
Try the if statement at the top of the document.
One more thing.
Is the connection still valid after changing the IP?
I think this should work:
You should run your perl script from within shutdown function, so it is
run after the connection is closed
and any output is sent to the browser. Send header('Refresh: 5;
url=http://NEW_IP/next_page.php');
to redirect
Try direct connection to the server to see the response it sends, you
may also try to send header(HTTP/1.0 302 Found) and see if that helps.
What browsers does it happens to?
jana konickova wrote:
I have the php script with the command
Header(Location: https://$SERVER_NAME$path;);
which
It's curious that it should be working some times and not others. This may
be overkill but you might try a double redundent redirect where if the
Header() function does not do the job then the script falls down into a
Javascript which attempts the same thing.
?
.. rest of script..
Once they've been redirected, can they just bookmark the resulting page
and never have to log in again?
Actually, yes - after a couple hours of playing around with the login and
finally getting the Meta tags to work for me, I found that if the person
were to simply type in the URL of the
]
Subject: Re: [PHP] redirecting after login
Once they've been redirected, can they just bookmark the resulting page
and never have to log in again?
Actually, yes - after a couple hours of playing around with the login and
finally getting the Meta tags to work for me, I found
what doesn't work is after they login to Page 1, the
redirect sends them to
Page 2 and right back to Page 1 because the global session
isn't staying
registered.
Are you putting session_start() at the top of each page where you want
to be able to use the session stuff you've set?
why don't u do something like
if (!username)
{ you can not access this page
}
else
{
//page content
}
?
that's a quick fix but might be all you need to do..
Umm...I hope register_globals is off...
www.yourdomain.com/yourpage.php?username=a_bad_user
---John Holmes...
--
PHP
Umm...I hope register_globals is off...
And if not.
form action=http://www.yourdomain.com/yourpage.php; method=post
input type=text name=username
input type=submit
/form
Can be used from every server to login.
Op dinsdag 23 juli 2002 12:42, schreef John Holmes:
why don't u do something
[snip]
A site I'm working on requires a login screen where various individuals
will log into the site and add information for their various
departments. Rather than setup a different script for each department, I
was hoping to create one script that would either accept or deny a login
based on
using header() should work if you don't output anything before it. If you
can restructure your code so that you can remove any output until after the
header(), then that'd be the way to go.
You said the meta refresh didn't work - did you get the syntax right? Since
I don't use it much, it's one
On Mon, 22 Jul 2002, Tim Thorburn wrote:
A site I'm working on requires a login screen where various individuals
will log into the site and add information for their various
departments. Rather than setup a different script for each department, I
was hoping to create one script that would
1 - 100 of 117 matches
Mail list logo