Default Image?

Thread Solved

Join Date: Oct 2006
Posts: 1,002
Reputation: ardav will become famous soon enough ardav will become famous soon enough 
Solved Threads: 129
ardav's Avatar
ardav ardav is online now Online
Veteran Poster

Re: Default Image?

 
0
  #21
Sep 20th, 2009
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?
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.
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 20
Reputation: JayGeePee is an unknown quantity at this point 
Solved Threads: 0
JayGeePee JayGeePee is offline Offline
Newbie Poster

Re: Default Image?

 
0
  #22
Sep 20th, 2009
Originally Posted by ardav View Post
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?
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.

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...
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 1,002
Reputation: ardav will become famous soon enough ardav will become famous soon enough 
Solved Threads: 129
ardav's Avatar
ardav ardav is online now Online
Veteran Poster

Re: Default Image?

 
0
  #23
Sep 20th, 2009
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.
Obviously.

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.

  1. if(isset($_GET['username'])){
  2. $username = addslashes(htmlentities($_GET['username']));
  3. $recordset = mysql_query("SELECT * FROM users WHERE username = '{$username}'");
  4. if(mysql_num_rows($recordset) > 0){
  5. $data = mysql_fetch_array($recordset);
  6. $avatar = $data['avatar'];
  7.  
  8. (... etc for all the fields you want ...)
  9.  
  10. }else{
  11. //put message to screen if user doesn't exist
  12. }
  13. }
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.
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 20
Reputation: JayGeePee is an unknown quantity at this point 
Solved Threads: 0
JayGeePee JayGeePee is offline Offline
Newbie Poster

Solved...

 
0
  #24
Sep 20th, 2009
Solved... Thanks for your persistence, most people would of gave up on me. I didnt upload my .htaccess file right, the first way you told me to do it worked. Persistance pays off. Thanks.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 1,002
Reputation: ardav will become famous soon enough ardav will become famous soon enough 
Solved Threads: 129
ardav's Avatar
ardav ardav is online now Online
Veteran Poster

Re: Default Image?

 
-1
  #25
Sep 20th, 2009
Da nada, Jay - glad you made it.
"...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.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC