Php urls and wildcard
I have a few questions about php.
How would I make a script accept the url ?=abc. I think that it has something with the $_GET but I have no other ideas.
Also does php have a wildcard character?
These questions are related to my project Post-it CMS, which is my own ideas for a content management system. If you need to see the code I will post what I need help with if you need more info.
Thanks in advance.
kazimmerman posted this at 03:02 — 29th November 2008.
He has: 698 posts
Joined: Jul 2005
If you have a URL like the following:
http://www.your-site.com/index.php?url=abc
Then your PHP code could look something like this:
<?php
$url = $_GET['url']; //This now holds the value 'abc'
?>
I think the best way to think about wildcards is something like this:
http://www.sitepoint.com/article/regular-expressions-php/
I don't have too much experience with it, but I started reading the tutorial and that article is very detailed and explanatory.
Kurtis
cmoyer posted this at 15:42 — 29th November 2008.
He has: 131 posts
Joined: Jun 2008
Thanks kazimmerman that fixed my urls.
The wildcards are still confusing but I'll try that article, it does go pretty in depth.
pr0gr4mm3r posted this at 04:34 — 30th November 2008.
He has: 1,502 posts
Joined: Sep 2006
What are you using wildcards for?
cmoyer posted this at 23:50 — 30th November 2008.
He has: 131 posts
Joined: Jun 2008
It was in a mysql search query but I figured it out, just the *, duh on me
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.