Hi
I am having a few problems with a piece of code I am using in my shopping cart, see below.
//is price -1?
if ($price == -1)
{
//echo "Here\n\n";
//echo $POST['size'];
//echo "\n\n";
$pos1 = strpos($POST['size'], "$");
$pos2 = strpos($POST['size'], ")");
$POST['price'] = substr($_POST['size'], $pos1+1, $pos2 - $pos1 - 1);
}
The code is suppose to look at the price and if its value is -1 then it looks at the size column and gets the price from the text there. This code is only used items where the price changes when the size changes, however at present it is only showing -1 which is no help. All others look at price value and display that, which works fine.
Site is www dot toptennz dot com
Any help would be greatly appreciated, as it is just driving me insane as to why it isn't working.
My web host is running on PHP 4.4.7.
Thanks
Richard