Hallo,
Mit POST kann ich folgendes machen
<form action="/x.php?var1=1&var2=1&var3=1" method="POST">
(...)
<input type=text name="var3" value="1">
(...)
Und mir stehen beide Variablen in PHP zu Verfügung. Geht das mit GET nicht mehr?!?!
Ich generiere folgendes Formular mit PHP (entschuldigung dass ich den ganzen Code poste aber ich bin so ratlos, dass es vielleicht echt nützlich ist den ganzen Code zu senden):
Damit nicht alles doppelt abgeschickt wird, entferne ich alle Variablen aus der Request URI und nehme das dann als action:
$removeFields = "s_zielgebiet|s_personen|s_thema|s_region|s_budget_von|s_budget_bis|s_zeit_von|s_zeit_bis";
<form name="prog_suche" action="<?=preg_replace("/&($removeFields)=[0-9]*/", "", $REQUEST_URI)?>" method="GET">
<form name="prog_suche" action="/incentives/layout/index.php?scheme=21" method="GET">
<table border=0 cellspacing=3 cellpadding=1 width="100%">
<tr>
<td background="http://www2.scc.co.at/incentives/layout/pics/verlauf_dunkelblau.png" class="find_h1">
FINDEN
</td>
</tr>
<tr>
<td background="http://www2.scc.co.at/incentives/layout/pics/verlauf_dunkelblau.png" class="find_h2">
TEILNEHMER
</td>
</tr>
<tr>
<td background="http://www2.scc.co.at/incentives/layout/pics/verlauf_hellblau.png">
<input type="text" name="s_personen" value="" style="width: 40px">
mind. 10 Personen
</td>
</tr>
<tr>
<td background="http://www2.scc.co.at/incentives/layout/pics/verlauf_dunkelblau.png" class="find_h2">
ZIELGEBIET
</td>
</tr>
<tr>
<td background="http://www2.scc.co.at/incentives/layout/pics/verlauf_hellblau.png">
<select name="s_zielgebiet" style="width: 150px">
<option value="-1">beliebig</option>
<option value="1" selected>Österreich</option>
<option value="2" >Deutschland</option>
<option value="3" >Slowenien</option>
<option value="4" >Italien</option>
<option value="5" >Kroatien</option>
<option value="6" >Frankreich</option>
<option value="7" >Schweiz</option>
<option value="8" >Lichtenstein</option>
<option value="9" >Ungarn</option>
<option value="10" >Tschechien</option>
<option value="11" >Rumänien</option>
<option value="12" >Russland</option>
<option value="13" >Weissrussland</option>
<option value="14" >Polen</option>
</select>
</td>
</tr>
<tr>
<td background="http://www2.scc.co.at/incentives/layout/pics/verlauf_dunkelblau.png" class="find_h2">
REGION
</td>
</tr>
<tr>
<td background="http://www2.scc.co.at/incentives/layout/pics/verlauf_hellblau.png">
<select name="s_region" style="width: 150px">
<option value="-1">beliebig</option>
<option value="2" >Tirol</option>
<option value="3" >Salzburg</option>
<option value="4" >Niederösterreich</option>
<option value="5" >Oberösterreich</option>
<option value="7" >Burgenland</option>
<option value="8" >Kärnten</option>
<option value="9" >Steiermark</option>
</select>
</td>
</tr>
<tr>
<td background="http://www2.scc.co.at/incentives/layout/pics/verlauf_dunkelblau.png" class="find_h2">
BUDGET
</td>
</tr>
<tr>
<td background="http://www2.scc.co.at/incentives/layout/pics/verlauf_hellblau.png">
<table border=0 cellspacing=0 cellpadding=0 width="100%">
<tr>
<td align="left">von</td>
<td align="right">
<select name="s_budget_von" style="width: 100px">
<option value="-1">beliebig</option>
</select>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td background="http://www2.scc.co.at/incentives/layout/pics/verlauf_hellblau.png">
<table border=0 cellspacing=0 cellpadding=0 width="100%">
<tr>
<td align="left">bis</td>
<td align="right">
<select name="s_budget_bis" style="width: 100px">
<option value="-1">beliebig</option>
</select>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td background="http://www2.scc.co.at/incentives/layout/pics/verlauf_dunkelblau.png" class="find_h2">
THEMA
</td>
</tr>
<tr>
<td background="http://www2.scc.co.at/incentives/layout/pics/verlauf_hellblau.png" class="find_h2">
<select name="s_thema" style="width: 150px">
<option value="-1">beliebig</option>
<option value="1" >Rahmenprogramm</option>
<option value="2" >Tagesprogramm</option>
<option value="5" selected>Themenprogramm</option>
<option value="3" >Incentives</option>
<option value="4" >Incentivereisen</option>
<option value="6" >VIP Pakete</option>
<option value="7" >Betriebsausflug</option>
<option value="8" >Exclusiv für Sie</option>
</select>
</td>
</tr>
<tr>
<td background="http://www2.scc.co.at/incentives/layout/pics/verlauf_dunkelblau.png" class="find_h2">
ZEITRAUM
</td>
</tr>
<tr>
<td background="http://www2.scc.co.at/incentives/layout/pics/verlauf_hellblau.png">
<table border=0 cellspacing=0 cellpadding=0 width="100%">
<tr>
<td align="left">von</td>
<td align="right">
<select name="s_zeit_von" style="width: 100px">
<option value="-1">beliebig</option>
</select>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td background="http://www2.scc.co.at/incentives/layout/pics/verlauf_hellblau.png">
<table border=0 cellspacing=0 cellpadding=0 width="100%">
<tr>
<td align="left">bis</td>
<td align="right">
<select name="s_zeit_bis" style="width: 100px">
<option value="-1">beliebig</option>
</select>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td background="http://www2.scc.co.at/incentives/layout/pics/verlauf_hellblau.png">
<p onClick="document.prog_suche.submit()"><b>JETZT FINDEN</b></p>
</td>
</tr>
</table>
</form>
Wieso bekomme ich dann beim Abschicken
index.php?s_personen=10&s_zielgebiet=1&s_region=-1&s_budget_von=-1&s_budget_bis=-1&s_thema=5&s_zeit_von=-1&s_zeit_bis=-1
und nicht
index.php?scheme=21&s_personen=10&s_zielgebiet=1&s_region=-1&s_budget_von=-1&s_budget_bis=-1&s_thema=5&s_zeit_von=-1&s_zeit_bis=-1
?
Vielen Dank (trotz des langen Posts)
Peter