PHP ver gevorderde |
|
Zoiets:
if($_GET['album'] == 1) {
print '<select size="1" onChange="javascript:document.location='?pagina=Album&member=Spyfox&album=' + this.value" name="album" >
<option selected value="1">Test1</option>
<option value="2">Test2</option>
</select>';
} else {
print '<select size="1" onChange="javascript:document.location='?pagina=Album&member=Spyfox&album=' + this.value" name="album" >
<option value="1">Test1</option>
<option selected value="2">Test2</option>
</select>';
}
if($_GET['album'] == 1) { print '<select size="1" onChange="javascript:document.location='?pagina =Album &member =Spyfox &album =' + this.value" name="album" > <option selected value="1">Test1</option> <option value="2">Test2</option> </select>'; } else { print '<select size="1" onChange="javascript:document.location='?pagina =Album &member =Spyfox &album =' + this.value" name="album" > <option value="1">Test1</option> <option selected value="2">Test2</option> </select>'; }
Alleen hoe bouw jij die dropdown op? Via een while?
Dan kan het namelijk sneller ;) |