@JickMar 21.2007 — #If I understand you correctly, I believe you're looking for something like this:[code=php]if(condition) { do this } else { header('Location: mypage.php'); exit(); }[/code]It uses the [B][FONT="Courier New"]header[/FONT][/B] function. Please let me know if I misunderstood the question.
@r_soleauthorMar 21.2007 — #Does that work if I have something like ... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@m_sahalyMar 21.2007 — #yes ofcourse , but this is in case you appended them to the URL and you can appened as many variables as you like in the URL like the following :
@r_soleauthorMar 21.2007 — #Just a question... Why is that forms can easily pass values on to another page but without a form you need to use the querystring.
@m_sahalyMar 21.2007 — #you surly know that evern forms may append there content to the Querystring if its method is GET .the alternatives are as you said Query string , session ,DB ,and files may be .
I donot know if i answered ur Q or not .but feel free to ask .
@r_soleauthorMar 21.2007 — #What I meant was, forms don't use the querystring but still manage to pass on values to other pages. Isn't there some way for me to pass on a certain value without the querystring?
@itbeingsMar 21.2007 — #[code=php]if(!empty($_SESSION['User']) && $_SESSION['User']['Log.Member'] == "Member.Logged"){ #Allow user to see the member area } else{ ## #Your Login page already defined in 'config.inc' if any define('LogIn', 'http://www.domain.com/LogIn/'); # ## header("Location: ".LogIn."?_rPath=".$_SERVER['HTTP_REFERER']."?".$_SERVER['QUERY_STRING'].""); //Go to login page and remember the last page view }
///Now on you login page //If user is authenticated ## #Your Member page already defined in 'config.inc' if any define('MemberArea', 'http://www.domain.com/Members/'); # ## if(!empty($_SERVER['QUERY_STRING']) || !empty($_GET['_rPath'])) $ReturnPath = $_GET['_rPath']; else: $ReturnPath = MemberArea; endif; #Forward user to the Return Path header("Location: ".$ReturnPath.""); [/code]
@itbeingsMar 21.2007 — #It's possible. All you have to do is to set a value to it as soon as it get to the other page. [code=php] //On page A $_SESSION['A'] = "Me"; echo '<a href="look.php">Check it</a>';
//On look.php $_SESSION['A'] = "What I like now"; [/code]
Does that help. I mean is that what you are asking?