| | |
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.
It's full of stars...
•
•
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.
It's full of stars...
![]() |
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 |
.htaccess action ajax apache api array auto beginner binary bounce broken cakephp checkbox class cms code cron curl database date display dynamic echo email error errorlog file files folder form format forms function functions google href htaccess html image include insert integration interactive ip java javascript joomla limit link login loop mail malfunctioning masterthesis menu mlm mod_rewrite multiple mysql nodes oop paypal pdf php popup problem query radio ram random recursion reference regex remote return script search server sessions sms soap source space sql syntax system table tutorial unset update upload url validation validator variable video web websitecontactform xml youtube






