Look in your index.php for $_GET[‘p’]. This variable is being used in an SQL query and is not being first escaped by mysql_real_escape string or a type declaration like (int). So find the line with the $_GET[‘p’] and where it is used… The query may not be in the index.php, so you might have to track it down.
Then post both the declaration and the query here, and we’ll make a fix for you.
Think about using something else. The code in the tutorial is of poor quality, and I spotted a few vulnerabilities in just a few minutes of peeking at it.
It’s fine to learn the overall logic/structure of a shopping cart from a tutorial, but tutorial code isn’t always a good thing to use as production code. Tutorials often skip many critical details in an effort of brevity. They also tend to be written by amateurs.
@crmaliby: can’t change, i’ve already got the site working now, so i need help in finding a fix, if you can post what vulnerabilities you found or even better fixes for them, that would be helpful.
crmaliby is right that there are a lot of vulnerabilities. It may be best if we teach you what to look for, and you go through all the files and fix it if your set on not changing scripts.