Question: Check for reference how it should run. http://drlai.altervista.org/ITEC4450/Labs/Lab3-0/Lab3-0.php Having trouble when submitting input, info goes away. Name, address, email and the choices that were picked.

Check for reference how it should run. http://drlai.altervista.org/ITEC4450/Labs/Lab3-0/Lab3-0.php

Having trouble when submitting input, info goes away. Name, address, email and the choices that were picked. Here is my php code

Student Fruit Survey


Name *Name is required!
Address
Email *Email is required!
How many pieces of fruit do you eat per day? 0 1 2 More than 2
Your favorite fruit is:
Would you like a brochure?

$name = $_POST['name']; $address = $_POST['address']; $email = $_POST['email']; $howMany = $_POST['howMany']; $favFruit = $_POST['favFruit']; $brochure = $_POST['brochure']; // display the values of form along with text echo '

Your name is '.$name.'

'; echo '

Your address is '.$address.'

'; echo '

Your email is '.$email.'

'; echo '

Your eat '.$howMany.' pieces of fruit each day.

'; echo '

Your favorite fruit is '.$favFruit.'

'; $brochureValue = "brochure"; if($brochure !=""){

echo '

You would like a '.$brochureValue.'.

'; }

} else{ } ?>

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!