ltoto Posted September 20, 2006 Share Posted September 20, 2006 Basically what I have got so far is an Initial Enquiry Form. And on this enquiry form there is a drop down list where you can select either 'hotel', 'villa' or ' golf', along with other information.When this is selected it goes to another page with the the form that has been selected on 'hotels', 'Villas' and 'golf'. ( hope this is making sense so far.This is the code used to do this.[code]header("Location:index.php?Id=18&type=".$_POST['selectType']);[/code]so i have three forms on one page, but if that form is not selected, i do not want to to show up on the pagee.gif hotel is selected in the dropdown menu from the initial enquiry form, i would not want the villa or golf form to appear.so what i want to know is what i have to put around each of the forms so they only show up if selected, , i would guess something like:so if the site = " golf " show the gold form on index?Id=18obviously with out the englishany suggestions? Quote Link to comment Share on other sites More sharing options...
Jocka Posted September 20, 2006 Share Posted September 20, 2006 it would be easier to use javascript (google it) but you can do it in php a much longer way. (could google this too).<?php// LETS CALL YOUR DROP DOWN 'place' //// SO IT'D BE SOMETHING LIKE THIS //$page = $_POST['page']if($page == 'hotel'){ // SHOW THIS FORM //} else if($page == 'villa'){ // SHOW THIS FORM //} else if($page == 'golf'){ // SHOW THIS FORM //} else { // DEFAULT FORM //}?>something like that should work Quote Link to comment Share on other sites More sharing options...
ltoto Posted September 20, 2006 Author Share Posted September 20, 2006 i cant connect to the ftp tonight, so i will give this a go tommorrow and let you know how i get on, thanks for the advice Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.