Hallo PHPler,
Ich habe einen Denkfehler, unzwar nutze ich ein fertiges Form indem es PHP variablen gibt.
Ursprünglich ist es dieser Code;
Mein Lösungansatz sieht so aus;
Bin auch auf dem richtien Weg oder gibt es eine viel einfachere Lösung ?
LG
re3ni
Ich habe einen Denkfehler, unzwar nutze ich ein fertiges Form indem es PHP variablen gibt.
Ursprünglich ist es dieser Code;
PHP-Code:
<form name="product" method="post" action="<?php print $this->action?>" enctype="multipart/form-data" autocomplete="off">
...
...
<?php print $freeattribut->input_field ; ?>
...
...
</form>
...
PHP-Code:
enctype="multipart/form-data" autocomplete="off">
...
...
$orte = array(
1 => 'Stadt ?',
2 => 'Berlin',
3 => 'Hamburg',
);
echo '<select style="width:100px" name="stadt">';
foreach($orte as $key => $stadt)
{
echo '<option value="' . $key . '">' . $stadt . '</option>';
}
echo '</select>';
if( isset($_POST['stadt']) )
{
$freeattribut = intval( $_POST['stadt'] );
}
...
..
LG
re3ni

Kommentar