| | |
Default Image?
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
I don't see the point. htaccess will enable you to enter the url you want and the $_GET['username'] variable in the index.php page will then give you a hook to the db to extract the user's details. That's it. Cookies shouldn't really feature here. The htaccess method will work whether cookies are enabled, eaten, disabled etc etc.
There are 20 ways to boil an egg, but I think using cookies for this will leave it raw.
Have you tried my suggestion?
There are 20 ways to boil an egg, but I think using cookies for this will leave it raw.
Have you tried my suggestion?
Last edited by ardav; Sep 20th, 2009 at 1:25 pm.
"...the woods would be a very silent place if no birds sang except for the best"
All opinions count - unless you're a serial downvoter.
F'enw i yw Mr. Blaidd. Byddwch yn ofalus - dwi'n cnoi.
All opinions count - unless you're a serial downvoter.
F'enw i yw Mr. Blaidd. Byddwch yn ofalus - dwi'n cnoi.
•
•
Join Date: Aug 2009
Posts: 20
Reputation:
Solved Threads: 0
•
•
•
•
I don't see the point. htaccess will enable you to enter the url you want and the $_GET['username'] variable in the index.php page will then give you a hook to the db to extract the user's details. That's it. Cookies shouldn't really feature here. The htaccess method will work whether cookies are enabled, eaten, disabled etc etc.
There are 20 ways to boil an egg, but I think using cookies for this will leave it raw.
Have you tried my suggestion?
www.Mysite.com/username
I bought this php script from a guy who closed down his website shortly after... So I had no way of contacting him with questions.
If mysite.com/somename dosnt exist on my server as a visible URL. Does this .htaccess file still work on a url thats not visible? I think this url is set in my script I bought, and the only evidence i have that its there is my admin panel, or my database.
I dont know if im going to get this to work...
•
•
•
•
I have tried it, but it dont seem to do anything... None of my member urls exist on my server... They all reside on my database.
Use this with the htaccess file in place:
index.php - I wouldn't use this on the index.php, I'd change it to member.php or something, but it's your funeral.
PHP Syntax (Toggle Plain Text)
if(isset($_GET['username'])){ $username = addslashes(htmlentities($_GET['username'])); $recordset = mysql_query("SELECT * FROM users WHERE username = '{$username}'"); if(mysql_num_rows($recordset) > 0){ $data = mysql_fetch_array($recordset); $avatar = $data['avatar']; (... etc for all the fields you want ...) }else{ //put message to screen if user doesn't exist } }
Last edited by ardav; Sep 20th, 2009 at 3:29 pm.
"...the woods would be a very silent place if no birds sang except for the best"
All opinions count - unless you're a serial downvoter.
F'enw i yw Mr. Blaidd. Byddwch yn ofalus - dwi'n cnoi.
All opinions count - unless you're a serial downvoter.
F'enw i yw Mr. Blaidd. Byddwch yn ofalus - dwi'n cnoi.
![]() |
Similar Threads
- How to replace missing images with default image (PHP)
- converting grayscale image into pixels and storing in 1D array (Java)
- div image long link problem (JavaScript / DHTML / AJAX)
- Correctly displaying image in PictureBox? (VB.NET)
- Image shows only on mouseover instead of by default. (JavaScript / DHTML / AJAX)
- add watermark in image (ASP.NET)
- Image uploader with Ajax or similiar technology.. (JavaScript / DHTML / AJAX)
- [help] Image changes (JavaScript / DHTML / AJAX)
- display image if applet is "not inited" (Java)
Other Threads in the PHP Forum
- Previous Thread: Help
- Next Thread: pagination in php
| Thread Tools | Search this Thread |
advanced ajax apache api array basics beginner binary broken cakephp check checkbox class cms code combobox cookies cron curl database date datepart display dynamic echo email error file files folder form forms function functions google head href htaccess html image include includingmysecondfileinthechain insert integration ip java javascript job joomla js limit link login loop mail menu mlm multiple mysql oop parse password paypal pdf php problem procedure query radio random recursion regex remote script search server sessions smarty smash sms soap source space sql stored syntax system table traffic tutorial unicode update upload url validator variable video web xml youtube






