OK, I have got that working, but now face another problem.
I have the below code which I use to say if the drop down menu = 2, show the file form2.php but it is showing lots of other pages.
[php]<?php
$numberforms = $_POST[‘D1’];
print “you have selected $numberforms fields, click back on your browser if this is incorrect”;
if
( $numberforms == “1” ); {
include (‘form.php’ );
}
if
( $numberforms == “2” ); {
include (‘form2.php’ );
}
if
( $numberforms == “3” ); {
include (‘form3.php’ );
}
if
( $numberforms == “4” ); {
include (‘form4.php’ );
}
if
( $numberforms == “5” ); {
include (‘form5.php’ );
}
if
( $numberforms == “6” ); {
include (‘form6.php’ );
}
if
( $numberforms == “7” ); {
include (‘form7.php’ );
}if
( $numberforms == “8” ); {
include (‘form8.php’ );
}
if
( $numberforms == “9” ); {
include (‘form9.php’ );
}
if
( $numberforms == “10” ); {
include (‘form10.php’ );
}[/php]
If you try out my script on http://www.07005.net/test/how%20many%20forms.htm and select any from the drop down menu you can see that it is including all 20 form.php files.
I know the reason for this and this is because I have simply entered the code include (‘formx.php’); and this is the problem.
I need to make it so that if $numberfroms == “5” THEN include form5.php and not all the others.
Please help!