php - How to get a User to select a plan and be dynamically created in the next page (form) -


i'd users select plan , information selected dynamically applied next page , stored can email users information entered in form.

<div class="pricing_box">   <h3><a href="#">professional</a></h3>   <div class="price-value">     <a href="#">$300.00/month</a>   </div>   <ul>     <li><a href="#">lorem ipsum</a></li>     <li><a href="#">dolor sitamet, consect</a></li>     <li><a href="#">adipiscing elit</a></li>     <li><a href="#">proin commodo turips</a></li>     <li><a href="#">laws pulvinarvel</a></li>     <li><a href="tables.html">more details</a></li>   </ul>   <div class="cart">     <a class="popup-with-zoom-anim" href="contact.html">buy now</a>   </div> </div><!--pricing_box-->    <form id="myform" action="process.php" method="post"> <label for="humans" class="humans">human check: leave field empty</label> <input type="text" name="humans" id="humans" class="humans" /> <h1 class="intro">professional edition - sign today</h1> <div class="form_style_wrapper"> <label>*name:</label> <input type="text" name="full_name" class="contact_first_name" title="please enter full  name" /> </div><!--end of form_style_wrapper--> <div class="form_style_wrapper"> <label>*email:</label> <input type="email" name="email" class="contact_email" title="please specify email" />   </div><!--end of form_style_wrapper--> <div class="form_style_wrapper"> <label>*phone:</label> <input type="tel" name="phone" class="contact_telephone" title="please enter mobile or telephone number" /> </div><!--end of form_style_wrapper--> <div class="form_style_wrapper"> <label>*company:</label> <input type="text" name="company" class="contact_company" title="please enter companies name" /> </div><!--end of form_style_wrapper--> <div class="form_style_wrapper"> <label for="comments">comments:</label> <textarea name="comments" class="contact-info" id="message"></textarea> </div><!--end of form_style_wrapper--> <button name="send" class="send" type="submit">send</button>  </form> 

i have 3 other choices, professional, basic, standard etc. (same box) instead of making additional 3 pages (forms) can create 1 page , have users selection stored dynamically? if chosen professional, professional form (title appears - same form all) , can in php still capture chosen field can email users current selection?

your question not clear attempt answer. if don't want create 3 pages can use $_get change content of page.

for example, can like

if ( isset($_get['plan']) ) //check if plan page set {     if ($_get['plan'] == "pro") {         //display professional page here     } elseif ($_get['plan'] == "basic") {         //display basic page here     } elseif ($_get['plan'] == "standard") {         //display standard page here     } else {         echo 'the selected plan invalid.'; //display error message or whatever     } } else {     //display initial page here } 

and url http://yourwebsite.com/index.php?plan=pro


Comments