I’m in the process of learning how to make a shopping cart. I’m making good progress but some things keep getting me off track.
Here is one of those things…
If a users going to a page that does not exist on the host how do I just direct them automatically to the home page.
“sdfgswfdgsgf.php” does not exist so I want to direct them to the home page at http://www.yoursite.com
A real world example of this is at alienware.com – if you type after the “/” anything it will simply direct you to the home page.
This will help because getting an ugly error file not found message in awful.
Also another question:
(RELATED TO THE SAME AREA)
When constructing my shopping cart I noticed that if someone is linked to and taken to:
the page will load fine. But if someone changes the URL to:
http://www.yoursite.com/products/index. … ct_id=5555
I will have an error (I think it was an SQL error) …
How would I fix this so that it will just default to index.php OR EVEN BETTER Right back to the Homepage like the above question.
I’m asking all of this because I want to prevent people from snooping around and trying things on my shopping cart if they wanted too.
Let me know.
Thank you for reading my questions.