need help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bubble
Forum Newbie
Posts: 5
Joined: Wed May 28, 2008 8:43 am

need help

Post by bubble »

does someone can help me , how to change

http://www.mysite.com/myname
to
http://www.mysite.com/index.php?uid=myname

thx
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: need help

Post by onion2k »

I suspect you want url rewriting, but as you didn't specify I'll answer exactly what you posted:

Code: Select all

$url = "http://www.mysite.com/myname";
$url = str_replace("http://www.mysite.com/","http://www.mysite.com/index.php?uid=",$url);
If this isn't what you were after perhaps you'd like to give some more detail.
User avatar
panic!
Forum Regular
Posts: 516
Joined: Mon Jul 31, 2006 7:59 am
Location: Brighton, UK

Re: need help

Post by panic! »

Also please be more descriptive with your titles. Of course you 'need help'. As everyone on here posting threads does; so writing that is kind of redundant. Kind of like putting the title as 'I live on earth, I am human and would like PHP help'.

Try and be a bit more descriptive in future or people might not read your thread.
bubble
Forum Newbie
Posts: 5
Joined: Wed May 28, 2008 8:43 am

Re: need help

Post by bubble »

tq so much for onion2k for the answer

and sorry for panic, because i don't know how to describe the subject for my question, hehehehe,

i will more descriptive with my next question

tq all
Post Reply