Eugene Posted June 29, 2006 Share Posted June 29, 2006 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 Link to comment https://forums.phpfreaks.com/topic/13171-urlsettings/ Share on other sites More sharing options...
redarrow Posted June 29, 2006 Share Posted June 29, 2006 [!--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] Quote Link to comment https://forums.phpfreaks.com/topic/13171-urlsettings/#findComment-50639 Share on other sites More sharing options...
Eugene Posted June 29, 2006 Author Share Posted June 29, 2006 Doesn't work :s? Quote Link to comment https://forums.phpfreaks.com/topic/13171-urlsettings/#findComment-50640 Share on other sites More sharing options...
redarrow Posted June 29, 2006 Share Posted June 29, 2006 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 urland 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] Quote Link to comment https://forums.phpfreaks.com/topic/13171-urlsettings/#findComment-50643 Share on other sites More sharing options...
Eugene Posted June 29, 2006 Author Share Posted June 29, 2006 It always displays hi :-p... Quote Link to comment https://forums.phpfreaks.com/topic/13171-urlsettings/#findComment-50645 Share on other sites More sharing options...
redarrow Posted June 29, 2006 Share Posted June 29, 2006 [!--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. Quote Link to comment https://forums.phpfreaks.com/topic/13171-urlsettings/#findComment-50646 Share on other sites More sharing options...
Eugene Posted June 29, 2006 Author Share Posted June 29, 2006 [!--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 Quote Link to comment https://forums.phpfreaks.com/topic/13171-urlsettings/#findComment-50655 Share on other sites More sharing options...
redarrow Posted June 29, 2006 Share Posted June 29, 2006 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 byif you take away the !exist statement your get bye[code]<? // get know shows the word settings on the end of the urland the code gets executed if settings exists ok.if(!$_GET['settings']) {echo hi;}else{echo bye;}?>[/code]windup lol Quote Link to comment https://forums.phpfreaks.com/topic/13171-urlsettings/#findComment-50657 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.