Jump to content

Archived

This topic is now archived and is closed to further replies.

Eugene

(url)?settings

Recommended Posts

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\" /]

Share this post


Link to post
Share on other sites
[!--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]

Share this post


Link to post
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]

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

×

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.