Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help w simplest script...

Status
Not open for further replies.

blekfis

Programmer
Oct 19, 2001
38
SE
I've got a file1 with a form action=file2.php.

How do I get file2 to get back to file1 (or another file) after it has processed what it's supposed to do?

File2
<?
FunctionToProcessFirst

FunctionToReturnToFile1OrOtherFile
?>

Still a newbie....
 
yup, but remeber: no echos or print stmts before the herder function...

Known is handfull, Unknown is worldfull
 
<body onload=&quot;window.location='file1.php'&quot;>
however this can bugger up the back function on a browser

I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
:)

I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
It is good practise when dealing with scripts that use the header() function to also include session information.

When a user doesn't allow cookies and trans id is set to ON. The browser will automatically add the session id to all anchors and forms, so that is can be passed to the next page, continuing the session. However the header is not re-written, but if you add SID to the end of your header urls it will autmatically be added in IF needed.

header(&quot;location : home.php?&quot; . SID);

e.g.
If cookies are allowed then the home.php? page will open
if not the home.php?PHPSESSID=dsfhj3423340320 will open.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top