Voll Upload SGD Fachinformatiker PHP
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
// 2.4.1.2
|
||||
|
||||
function setOption ($gang, $wert, $text){
|
||||
$ausgabe = "<option value='{$wert}'";
|
||||
|
||||
if (isset($_POST["vSpeise"])) {
|
||||
if ($_POST[$gang] == $wert) {
|
||||
$ausgabe .= " selected";
|
||||
}
|
||||
}
|
||||
|
||||
// Wenn Kein Text übergeben wird, dann soll der Text mit dem Wert identisch sein
|
||||
|
||||
if(empty($text)) {
|
||||
$text = $wert;
|
||||
}
|
||||
$ausgabe .= ">$text</option>\n";
|
||||
echo $ausgabe;
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user