UK Webmaster Talk - Online Marketing - SEO


 

Dynamic URLS

This is a discussion on Dynamic URLS within the Programming Articles forums, part of the Webmaster Articles/Tutorials category; Dynamic URL's are those things where you see http://www.blah.com/post.php?do=whatever , the dynamic part is the do=whatever. To get the dynamic ...


Go Back   UK Webmaster Talk - Online Marketing - SEO > Webmaster Articles > Webmaster Articles/Tutorials > Programming Articles

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Notices

Reply

 

LinkBack Thread Tools Display Modes
Old 13-04-2005, 22:12   #1 (permalink)
*poke* *poke*
 
Join Date: Apr 2005
Posts: 134
iTrader: 0 / 0%
mck9235 is on a distinguished road
Default Dynamic URLS

Dynamic URL's are those things where you see http://www.blah.com/post.php?do=whatever, the dynamic part is the do=whatever. To get the dynamic URL we use the $_GET variable, look below:
PHP Code:
<?php
$dyurl 
$_GET['dyurl'];
This crerate the dynamic url named dyurl, so ?dyurl=, is now possible.
Now to show stuff according to what they put after the equal sign:
PHP Code:
if($dyurl "hi")
{
echo(
"Hi. :)");
}
if(
$dyurl "bye")
{
echo(
"Bye. :(");
}
if(
$dyurl "")
{
echo(
"Uhh :S");
}
else
{
echo(
"Right.... :|");
}
?> 
You can see, the if statments will display diffrent things depending on what you have in the dyurl= spot. (Note you need to put a question mark after the .php, then the dynamic url and its name)

Cool, eh? Feel free to leave rep.
mck9235 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 14-04-2005, 20:59   #2 (permalink)
WMT Addict
 
Join Date: Apr 2005
Posts: 120
iTrader: 0 / 0%
Shwaza will become famous soon enough
Default

Mck: :P That else statement will echo at every dynamic url, so say you typed page.php?dyurl=blah it would tell you "Right.... :|" not sure if that's what you wanted :P, but it's good to see you learned how to use them
__________________
Kingdoms Of Battle << Check out my free to play online strategy game!

SomeCoders - Coding blog, coding tips
Shwaza is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 14-04-2005, 22:58   #3 (permalink)
Tim
Cool Newbie
 
Join Date: Apr 2005
Posts: 32
iTrader: 0 / 0%
Tim is just really nice
Default

Mmm, lots of problems. How about a double equal sign?
Tim is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 14-04-2005, 23:32   #4 (permalink)
*poke* *poke*
 
Join Date: Apr 2005
Posts: 134
iTrader: 0 / 0%
mck9235 is on a distinguished road
Default

Quote:
Originally Posted by Shwaza
Mck: :P That else statement will echo at every dynamic url, so say you typed page.php?dyurl=blah it would tell you "Right.... :|" not sure if that's what you wanted :P, but it's good to see you learned how to use them
Well, it worked fine when I tested it locally with the same code, so I guess i'm confused.
__________________
| - The Fast Track - |
Thanks to WMT for the new domain!
mck9235 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 15-04-2005, 02:08   #5 (permalink)
WMT Addict
 
Join Date: Apr 2005
Posts: 120
iTrader: 0 / 0%
Shwaza will become famous soon enough
Default

Ooh yeah, i didn't notice the single equal sign :P I don't know how that would work, by the looks of it, it would always give you one value for $dyurl. == is the equal to operator, so like if($dyurl == "blah"){akjwhfiawkhergiawre}

That's how it would work
__________________
Kingdoms Of Battle << Check out my free to play online strategy game!

SomeCoders - Coding blog, coding tips
Shwaza is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
dynamic, urls

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
How to create dynamic signiture images? robertall Programming Articles 2 28-06-2005 13:30
Static / dynamic???? benf Programming / Scripting / Coding 4 09-06-2005 13:39
Submit your URLs! Wistow Forum Announcements 13 11-04-2005 10:11


All times are GMT +1. The time now is 17:50.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
UK Webmaster Forum © WebmasterTalk.co.uk | Design by Forbairt

Ad Management by RedTyger

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41