2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by almostbob
0
<?php if(isset($_post['ud'])) {
if(($_post['ud']=='first allowed entry')||($_post['ud']=='second allowed entry')||($_post['ud']=='third allowed entry') ) { include("$_post['ud'].php"); }
}
else include("default.php");
?>

permitted values include a php scrap containing the html appropriate to the value
there can be any number of acceptible values and insert pages
its not pretty, but its a thought concept

Edited by almostbob: n/a

0
<?php if(isset($_post['ud'])) {
if(($_post['ud']=='first allowed entry')||($_post['ud']=='second allowed entry')||($_post['ud']=='third allowed entry') ) { include("$_post['ud'].php"); }
}
else include("default.php");
?>

permitted values include a php scrap containing the html appropriate to the value
there can be any number of acceptible values and insert pages
its not pretty, but its a thought concept

Interesting concept, I guess I never thought of doing it via PHP. I was thinking about Javascript, but I like the php version due to browser compatibility.

Thanks for the idea!

1

welcome

or use an array of ud/html

<?php
$UD = array(
'yes' => 'this way up',
'no' => 'other way up',
'up' => 'down',
'down' =>	'up',
'green' => 'red',
'red' => 'green'
);

if(all_condtions_as_b4) { echo $UD["$_post['ud']"]; } ?>

Edited by almostbob: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.