문제

I have a php form that sends input data to mysql via a processing php page, for example, process.php - and that works just dandy.

However, the process.php page then redirects the user to another page http://anotherpage.html">. This new page contains several iframes, which in turn loads pages content 1,2,3,4 in the iframes etc.

My question is, how best do I code this so that the values chosen in the form determine which iframes are loaded? For example, say a user selects "cars" from drop-down list 1, and "bananas" from drop down list 2 (these vars for example: $vehicle = $_POST['vehicle'];and $fruit = $_POST['fruit'];) - I want them to see only the iframes that have content relating to cars and bananas. I know there are probably several ways to to this, but it's driving me nuts.

Any help would be greatly appreciated. 3 Hail Marys for the best answer.

Thanks,

Frank

도움이 되었습니까?

해결책

If you are saving data in database (as you have said - using process.php) than you don't need to use $_POST['vehicle']; and $_POST['fruit'];.

Get data from database and according to that load your iframe.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top