Andere pagina bij andere keuze.

Gestart doorDaan9 reacties20 weergaven

10 berichten · pagina 1 van 1

Daan

Lid · Topicstarter

Berichten
692
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hallo,

Ik heb nu dit: http://daan.s3.one2xs.com/bestel/betaal.php

Maar ik wil graag dat als je voor ideal kiest dat je dan bijv op idealapi.php komt.
Als je voor PayPal kiest dat je dan op paypalapi.php komt en als je voor Bankoverschrift kiest dat je dan op bankoverschrift.php komt.

Hoe doe ik dit?

Ik heb nu dit:

<form method=post>
<select name=betaal class=btn>
<option action=nogniet.php value=ideal>iDeal</option>
<option action=nogniet.php value=paypal>PayPal</option>
<option action=bank.php value=bankoverschrift>Bankoverschrift</option>
</select>


Maar dat werkt niet zo best. smile
Daan
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
met onchange en dan this.value daarheen linken?
Ik weet niet zeker of dat werkt maar ik zou zoiets doen

onchange="window.location=this.value + .php"
0
Berichten
5.897
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
0
Berichten
3.112
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ten eerste zie ik dat je je form niet afsluit. Let daar op wink
De mogelijkheid van Xjessex zou kunnen werken, je zou het ook zo kunnen proberen:

[COLOR= #0000BB]<?PHP[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]verder2[/COLOR][COLOR= #007700]])){[/COLOR]
[COLOR= #0000BB]$post[/COLOR] [COLOR= #007700]=[/COLOR] htmlspecialchars[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]betaal[/COLOR][COLOR= #007700]]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$post[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]ideal[/COLOR][COLOR= #007700]){[/COLOR]
[COLOR= #0000BB]$link[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]ideal.php[/COLOR][COLOR= #007700];
}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$post[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]paypal[/COLOR][COLOR= #007700]){[/COLOR]
[COLOR= #0000BB]$link[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]paypal.php[/COLOR][COLOR= #007700];
}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$post[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]bankoverschrift[/COLOR][COLOR= #007700]){[/COLOR]
[COLOR= #0000BB]$link[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]bank.php[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]<meta http-equiv="refresh" content="0;URL=[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$link[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]" />[/COLOR][COLOR= #007700];
}[/COLOR]
?>
<form method=post>
<select name=betaal class=btn>
<option value=ideal>iDeal</option>
<option value=paypal>PayPal</option>
<option value=bankoverschrift>Bankoverschrift</option>
</select><br />
<input type=submit class=btn value=Ga verder naar stap 4! name=verder2/></form><br /><a href=javascript:history.go(-3);>Of keer terug naar de vorige pagina</a>


Moet je alleen even de variabelen naar de goede bestanden aanpassen.
0
Daan

Lid · Topicstarter

Berichten
692
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Gamedealer schreef:
Ten eerste zie ik dat je je form niet afsluit. Let daar op wink
De mogelijkheid van Xjessex zou kunnen werken, je zou het ook zo kunnen proberen:
Spoiler tonen
[COLOR= #0000BB]<?PHP[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]verder2[/COLOR][COLOR= #007700]])){[/COLOR]
[COLOR= #0000BB]$post[/COLOR] [COLOR= #007700]=[/COLOR] htmlspecialchars[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]betaal[/COLOR][COLOR= #007700]]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$post[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]ideal[/COLOR][COLOR= #007700]){[/COLOR]
[COLOR= #0000BB]$link[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]ideal.php[/COLOR][COLOR= #007700];
}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$post[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]paypal[/COLOR][COLOR= #007700]){[/COLOR]
[COLOR= #0000BB]$link[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]paypal.php[/COLOR][COLOR= #007700];
}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$post[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]bankoverschrift[/COLOR][COLOR= #007700]){[/COLOR]
[COLOR= #0000BB]$link[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]bank.php[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]<meta http-equiv="refresh" content="0;URL=[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$link[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]" />[/COLOR][COLOR= #007700];
}[/COLOR]
?>
<form method=post>
<select name=betaal class=btn>
<option value=ideal>iDeal</option>
<option value=paypal>PayPal</option>
<option value=bankoverschrift>Bankoverschrift</option>
</select><br />
<input type=submit class=btn value=Ga verder naar stap 4! name=verder2/></form><br /><a href=javascript:history.go(-3);>Of keer terug naar de vorige pagina</a>
Moet je alleen even de variabelen naar de goede bestanden aanpassen.

Ontzettend bedankt! Hij werkt!
0
Berichten
3.112
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Graag gedaan smile
0
Berichten
545
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
<form method=post>
<select name=betaal class=btn onchange="window.location.href=this.value + .php">
<option value=ideal>iDeal</option>
<option value=paypal>PayPal</option>
<option value=bankoverschrift>Bankoverschrift</option>
</select><br />
<input type=submit class=btn value=Ga verder naar stap 4! name=verder2/></form><br /><a href=javascript:history.go(-3);>Of keer terug naar de vorige pagina</a>


Dit kan je beter gebruiken i.p.v. Meta refresh...
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Gamedealer schreef:
Ten eerste zie ik dat je je form niet afsluit. Let daar op wink
De mogelijkheid van Xjessex zou kunnen werken, je zou het ook zo kunnen proberen:

[COLOR= #0000BB]<?PHP[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]verder2[/COLOR][COLOR= #007700]])){[/COLOR]
[COLOR= #0000BB]$post[/COLOR] [COLOR= #007700]=[/COLOR] htmlspecialchars[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]betaal[/COLOR][COLOR= #007700]]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$post[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]ideal[/COLOR][COLOR= #007700]){[/COLOR]
[COLOR= #0000BB]$link[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]ideal.php[/COLOR][COLOR= #007700];
}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$post[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]paypal[/COLOR][COLOR= #007700]){[/COLOR]
[COLOR= #0000BB]$link[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]paypal.php[/COLOR][COLOR= #007700];
}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$post[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]bankoverschrift[/COLOR][COLOR= #007700]){[/COLOR]
[COLOR= #0000BB]$link[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]bank.php[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]<meta http-equiv="refresh" content="0;URL=[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$link[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]" />[/COLOR][COLOR= #007700];
}[/COLOR]
?>
<form method=post>
<select name=betaal class=btn>
<option value=ideal>iDeal</option>
<option value=paypal>PayPal</option>
<option value=bankoverschrift>Bankoverschrift</option>
</select><br />
<input type=submit class=btn value=Ga verder naar stap 4! name=verder2/></form><br /><a href=javascript:history.go(-3);>Of keer terug naar de vorige pagina</a>
Moet je alleen even de variabelen naar de goede bestanden aanpassen.

Waarom 13 regels onnodige codes??
0
Berichten
3.112
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Omdat je ook gelijk op kunt slaan welke betaling al gestart is, en je controleert of de pagina klopt.
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Hoe bedoel je?
En dat kan toch ook op de pagina die geopend word?
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren