Jump to content

Form with a lot of different pages


NLCJ

Recommended Posts

Hello,

I'm creating a form which depends on their first input, when they select the first type from a dropdownlist and press 'Go to step 2' they'll go there and select a subtype (which depends on their first input). Above the input of subtype I've created the dropdownlist from step 1, so they'll be able to see what they've chosen. The problem is hard to explain, but I'll try.

<?php 
$page = $_GET['p'];

$gotchatype = $_POST['gotchatype'];
$gotchasubtype = $_POST['gotchasubtype'];

if($page == gotcha){
if($gotchatype == movies) {
	if($gotchasubtype == rip){
		<!-- Form of step 3 --!>
	}
	<!-- Form of step 2 --!>
}
<!-- Form of step 1 --!>
}
?>

 

But since I've 'DISABLED' the dropdown box that they've chosen earlier it doesn't send that part, so it doesn't go further than if($page == gotcha){.

I hope that you understand my problem.

 

Regards,

 

EDIT:

I've made the script more 'simple' to understand.

Link to comment
https://forums.phpfreaks.com/topic/192190-form-with-a-lot-of-different-pages/
Share on other sites

Thanks, I think I might be able to do that, but that would take a lot of time. Isn't it possible to send the information from a 'Disabled' dropdown-box? Like:

<form method="POST" action="page.php">
<select name="gotcha-type" DISABLED>
<option value="movies">Movies / Images</option>
</select>
</form>

Right now it sends the information if I remove 'DISABLED' (of course, totally logic), but is it also possible to keep it sending while it is disabled?

 

Regards,

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.