hi I am new to this forum and new to using php. Everyone says it is really easy and so far so good until I was trying to display pictures based on the selected option from a drop down menu.
so I have 3 options:
dromidary
bactrian
mollie
I have an image from each. so I sent the form in the localhost from the HTML document to my php document using my webrowser but the pictures I cannot get to appear. This is my php code so far
<?php
$Fname = $_POST["txta"];
$add1 = $_POST["txtb"];
$add2 = $_POST["txtc"];
$add3 = $_POST["txtd"];
$postcode = $_POST["txte"];
$EM= $_POST["txtf"];
$mob= $_POST["txtg"];
$sex = $_POST["gender"];
$cam = $_POST["camel"];
$inv = $_POST["invoice"];
$subm = $_POST["sub"];
$TOT =500;
$B = $TOT * 17.5/100;
$A = $B + $TOT;
echo "INVOICE","<br>","<br>","<br>";
echo "name- ", $Fname,"<br>";
echo "adress1- ", $add1,"<br>";
echo "adress2- ",$add2,"<br>";
echo "adress3- ",$add3,"<br>";
echo "postcode- ",$postcode,"<br>";
echo "Email- ",$EM,"<br>";
echo "mobile- ",$mob,"<br>";
echo "sex of camel- ",$sex,"<br>";
echo"camel name-", $cam, "<br>";
echo "information will be sent to you via-",$inv,"<br>","<br>","<br>";
echo "subtotal:","£",$TOT,"<br>";
echo "vat is 17.5% is:",$B,"<br>";
echo "total cost:","£",$A;
if ($cam = camelx)
require ("maledromidary.jpg");
elseif ($cam = camely)
require ("malebactrian2.jpg");
else ($cam= camelz)
require ("mollie.jpg");
?>
Now I couldnt work out how to set it up as an array cus I dont know if it is possible to do super and subvariables. So I tried it as an if statement and i did nothing. This php page is an invoice showing the data That is typed in on the form and I just want to be able to display the pictures at thebottom of the page depending on the choise that is selected.