New to PHP and Need some help
Posted: Fri Oct 17, 2008 10:41 am
Hi
I have this code and I would like to put an if statement in it to look up a value in a database field in mysql and if the value is greater or equal to 7.99 display free shipping else display free shipping on order over 7.99
I tried this but it is well wrong it dod not get the info from the database the table is called products and the row id product_price. I am not sure how to do this. i would be greatfull if someone can point me in the right direction
$lc_text.= "<br>" . $sample = products_price;
IF ($sample > 7.99) {
print "Free Shipping";
}
ELSE {
print "Order over £7.99 gets free shipping";
break;
I have this code and I would like to put an if statement in it to look up a value in a database field in mysql and if the value is greater or equal to 7.99 display free shipping else display free shipping on order over 7.99
I tried this but it is well wrong it dod not get the info from the database the table is called products and the row id product_price. I am not sure how to do this. i would be greatfull if someone can point me in the right direction
$lc_text.= "<br>" . $sample = products_price;
IF ($sample > 7.99) {
print "Free Shipping";
}
ELSE {
print "Order over £7.99 gets free shipping";
break;