This question already has an answer here:
- The 3 different equals 5 answers
I have a form that allows me to choose the size as M or L, I want to echo "20" if the size is M and "25" if the size is L, I have this code but not matter what option choose it only echo the 20:
$m_price=20;
$l_price=25;
if ($_POST['Size']='M'){
$size_price= $m_price;
echo $size_price;}
elseif ($_POST['Size']='L'){
$size_price= $l_price;
echo $size_price;}
Aucun commentaire:
Enregistrer un commentaire