Jump to content

Recommended Posts

[!--quoteo(post=389064:date=Jun 29 2006, 02:07 AM:name=G F D)--][div class=\'quotetop\']QUOTE(G F D @ Jun 29 2006, 02:07 AM) [snapback]389064[/snapback][/div][div class=\'quotemain\'][!--quotec--]
how can I do that without having it equal to anything?

like: [a href=\"http://google.com?settings\" target=\"_blank\"]http://google.com?settings[/a]

just being a example. [img src=\"style_emoticons/[#EMO_DIR#]/excl.gif\" style=\"vertical-align:middle\" emoid=\":excl:\" border=\"0\" alt=\"excl.gif\" /]
[/quote]

an example only not tested.
page
[code]
$settings="hi i am redarrow";

<a href="page_result.php?&$settings">settings</a>

[/code]

page_result
[code]

if(!$_GET['settings']) {

echo $settings;

}
[/code]
Link to comment
https://forums.phpfreaks.com/topic/13171-urlsettings/#findComment-50639
Share on other sites

does work ok lol

[code]
<?
//?&settings to use get on the other page.

echo"<a href='test_result.php?&settings'>settings</a>";

?>

[/code]





[code]

<?

// get know shows the word settings on the end of the url
and the code gets executed if settings exists ok.

if(!$_GET['settings']) {

echo hi;

}

?>

[/code]



AND this is the correct format good coding pratice ok.

[code]
<?

echo"<a href='test_result.php?&settings=$settings'>settings</a>";

?>

[/code]





[code]

<?

if(!$_GET['settings']=='$settings') {

echo hi;

}

?>

[/code]
Link to comment
https://forums.phpfreaks.com/topic/13171-urlsettings/#findComment-50643
Share on other sites

[!--quoteo(post=389075:date=Jun 29 2006, 02:43 AM:name=G F D)--][div class=\'quotetop\']QUOTE(G F D @ Jun 29 2006, 02:43 AM) [snapback]389075[/snapback][/div][div class=\'quotemain\'][!--quotec--]
It always displays hi :-p...
[/quote]

Thats becouse were the echo hi is,thats where your code goes.

if you need more help i am sure i can do so otherwise good luck.
Link to comment
https://forums.phpfreaks.com/topic/13171-urlsettings/#findComment-50646
Share on other sites

[!--quoteo(post=389076:date=Jun 28 2006, 10:48 PM:name=redarrow)--][div class=\'quotetop\']QUOTE(redarrow @ Jun 28 2006, 10:48 PM) [snapback]389076[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Thats becouse were the echo hi is,thats where your code goes.

if you need more help i am sure i can do so otherwise good luck.
[/quote]
Copied your code exactly.
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]
settings hi settings bye
[/quote]
That's what is displayed on the main page
Link to comment
https://forums.phpfreaks.com/topic/13171-urlsettings/#findComment-50655
Share on other sites

where the code is echoed you put your code to execute.

if the varable settings is in the url from get echo hi else echo by

if you take away the !exist statement your get bye
[code]
<?

// get know shows the word settings on the end of the url
and the code gets executed if settings exists ok.

if(!$_GET['settings']) {

echo hi;

}else{

echo bye;

}
?>

[/code]

windup lol
Link to comment
https://forums.phpfreaks.com/topic/13171-urlsettings/#findComment-50657
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.