PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old October 4th, 2002, 02:20 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
Search Engine Friendly URLs / Shopping Cart Problem...

I'm all outa ideas, hopefully someone here has something that can help me. I wanted to build a PHP shopping cart, and website that would be driven by MySQL. So I got everything working pretty well for the most part, even using Search Engine Friendly URLs ( ie no query strings )

So my URLs look like this:

href="index.php/user/2398525"

Or somethign similar, where 2398525 is a randomly assigned UserID which gets passed to every page through the URL.

The problem I thought of, is that when search engines index my pages, they will be indexing whatever UserID they have, and then when people find my pages in search engines, everyone that comes from the search engine will have the same UserID... ie they will all be going to index.php/user/[whatever userid the search engine had when it spidered website]

Which means that a lot of users could end up with the same UserID... which could cause problems in people putting things in others shopping carts and such...

Can anyone think of a way to get around this? To fix this? If I could tell it was a search engine, I could just not use a UserID for it... anyway to do this?

Thanks!

Reply With Quote
  #2  
Old October 4th, 2002, 02:26 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Search Engine Friendly URLs / Shopping Cart Problem...

You could track the userids in a database and then expire them after a certain period of time. If the id doesn't exist in the database, then assign a new one....

Reply With Quote
  #3  
Old October 4th, 2002, 09:26 PM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: Search Engine Friendly URLs / Shopping Cart Problem...

imho you shouldn't pass user id in the url. instead, u should put in the url only "navigational" and "action" variables.

what do i mean by these? well, for a example, look at this forum. all variables that are there surve navigational or action purpuse.

ie, when i am writing this post, url looks like this:

http://codewalkers.com/forum/index.php?action=reply&forum=phpcoding&id=894&realm=default

in it, "action" var shows what i am doing on this page. "forum" var shows a forum where i am posting, "id" contains post id to what i am replaying...


your user id, and similar stuff that difer from user to user should be passed in a cookie, or saved within a session...

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > Search Engine Friendly URLs / Shopping Cart Problem...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway