mange tak det virkede, nu mangler jeg bare, at kode den her ind
og den gør sådan at det jeg vælger under server og produkt i formen, det bliver jeg sendt hen til.
- <?php
- if($_POST) //Formularen er blevet sendt
- {
- //Normalisere input så det er små bogstaver og ingen overflødig mellemrum, hvis nogen prøver at sende uønsket data
- $server = strtolower(trim($_POST['server']));
- $produkt = strtolower(trim($_POST['produkt']));
-
- $relations = array(
- 's1' => array(
- 'bronze' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Name=&TransactionEmail_Subject=K%C3%B8b+af+Umbrella+Bronze+p%C3%A5+S1&TransactionEmail_Message=Dette+produgt+er+Umbrella+Bronze+p%C3%A5+S1%0d%0a%0d%0aHUSK:+L%C3%A6s+betingelserne+inden+k%C3%B8b!&TransactionEmail_Amount=39,00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0&action=validate',
- 'silver' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Name=&TransactionEmail_Subject=K%C3%B8b+af+Umbrella+Silver+p%C3%A5+S1&TransactionEmail_Message=Dette+produkt+er+Umbrella+Silver+p%C3%A5+S1%0d%0a%0d%0aHUSK:+L%C3%A6s+betingelserne+inden+k%C3%B8b!&TransactionEmail_Amount=49,00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0&action=validate',
- 'gold' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Name=&TransactionEmail_Subject=K%C3%B8b+af+Umbrella+Gold+p%C3%A5+S1&TransactionEmail_Message=Dette+produkt+er+Umbrella+Gold+p%C3%A5+S1%0d%0a%0d%0aHUSK:+L%C3%A6s+betingelserne+inden+k%C3%B8b!&TransactionEmail_Amount=99,00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0&action=validate'
- ),
- 's2' => array(
- 'bronze' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Name=&TransactionEmail_Subject=K%C3%B8b+af+Umbrella+Bronze+p%C3%A5+S2&TransactionEmail_Message=Dette+produkt+er+Umbrella+Bronze+p%C3%A5+S2%0d%0a%0d%0aHUSK:+L%C3%A6s+betingelserne+inden+k%C3%B8b!&TransactionEmail_Amount=39,00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0&action=validate',
- 'silver' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Name=&TransactionEmail_Subject=K%C3%B8b+af+Umbrella+Silver+p%C3%A5+S2&TransactionEmail_Message=Dette+produkt+er+Umbrella+Silver+p%C3%A5+S2%0d%0a%0d%0aHUSK:+L%C3%A6s+betingelserne+inden+k%C3%B8b!&TransactionEmail_Amount=49,00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0&action=validate',
- 'gold' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Name=&TransactionEmail_Subject=K%C3%B8b+af+Umbrella+Gold+p%C3%A5+S2&TransactionEmail_Message=Dette+produkt+er+Umbrella+Gold+p%C3%A5+S2%0d%0a%0d%0aHUSK:+L%C3%A6s+betingelserne+inden+k%C3%B8b!&TransactionEmail_Amount=99,00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0&action=validate'
- ),
- 's3' => array(
- 'bronze' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Subject=K%c3%b8b+af+Umbrella+Bronce+p%c3%a5+S3&TransactionEmail_Message=Husk+at+l%c3%a6se+betingelserne%0d%0aDette+er+Death-Run+Serveren%0d%0a%0d%0aMed+venlig+hilsen%0d%0aX-Umbrella%0d%0awww.x-umbrella.tk&TransactionEmail_Amount=40%2c00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0">Betal med ewire',
- 'silver' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Subject=K%c3%b8b+af+Umbrella+Silver+p%c3%a5+S3&TransactionEmail_Message=Husk+at+l%c3%a6se+betingelserne%0d%0aDette+er+Death-Run+Serveren%0d%0a%0d%0aMed+venlig+hilsen%0d%0aX-Umbrella%0d%0awww.x-umbrella.tk&TransactionEmail_Amount=50%2c00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0">Betal med ewire',
- 'gold' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Subject=K%c3%b8b+af+Umbrella+Gold+p%c3%a5+S3&TransactionEmail_Message=Husk+at+l%c3%a6se+betingelserne%0d%0aDette+er+Death-Run+Serveren%0d%0a%0d%0aMed+venlig+hilsen%0d%0aX-Umbrella%0d%0awww.x-umbrella.tk&TransactionEmail_Amount=100%2c00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0">Betal med ewire'
- ),
- 's4' => array(
- 'bronze' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Subject=K%c3%b8b+af+Umbrella+Bronce+p%c3%a5+S4&TransactionEmail_Message=Husk+at+l%c3%a6se+betingelserne%0d%0aDette+er+Hoejhus++Serveren%0d%0a%0d%0aMed+venlig+hilsen%0d%0aX-Umbrella%0d%0awww.x-umbrella.tk&TransactionEmail_Amount=40%2c00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0">Betal med ewire',
- 'silver' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Subject=K%c3%b8b+af+Umbrella+Silver+p%c3%a5+S4&TransactionEmail_Message=Husk+at+l%c3%a6se+betingelserne%0d%0aDette+er+Hoejhus++Serveren%0d%0a%0d%0aMed+venlig+hilsen%0d%0aX-Umbrella%0d%0awww.x-umbrella.tk&TransactionEmail_Amount=50%2c00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0">Betal med ewire',
- 'gold' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Subject=K%c3%b8b+af+Umbrella+Gold+p%c3%a5+S4&TransactionEmail_Message=Husk+at+l%c3%a6se+betingelserne%0d%0aDette+er+Hoejhus++Serveren%0d%0a%0d%0aMed+venlig+hilsen%0d%0aX-Umbrella%0d%0awww.x-umbrella.tk&TransactionEmail_Amount=100%2c00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0">Betal med ewire'
- ),
- 's5' => array(
- 'bronze' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Subject=K%c3%b8b+af+Umbrella+Bronce+p%c3%a5+S5&TransactionEmail_Message=Husk+at+l%c3%a6se+betingelserne%0d%0aDette+er+Zombie+Serveren%0d%0a%0d%0aMed+venlig+hilsen%0d%0aX-Umbrella%0d%0awww.x-umbrella.tk&TransactionEmail_Amount=40%2c00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0">Betal med ewire',
- 'silver' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Subject=K%c3%b8b+af+Umbrella+Silver+p%c3%a5+S5&TransactionEmail_Message=Husk+at+l%c3%a6se+betingelserne%0d%0aDette+er+Zombie+Serveren%0d%0a%0d%0aMed+venlig+hilsen%0d%0aX-Umbrella%0d%0awww.x-umbrella.tk&TransactionEmail_Amount=50%2c00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0">Betal med ewire',
- 'gold' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Subject=K%c3%b8b+af+Umbrella+Gold+p%c3%a5+S5&TransactionEmail_Message=Husk+at+l%c3%a6se+betingelserne%0d%0aDette+er+Zombie+Serveren%0d%0a%0d%0aMed+venlig+hilsen%0d%0aX-Umbrella%0d%0awww.x-umbrella.tk&TransactionEmail_Amount=100%2c00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0">Betal med ewire'
- )
- );
-
- //Valider data
- if(!preg_match('/s[1-6]{1}/', $server) ||
- !preg_match('/bronze|silver|gold/',$produkt))
- {
- echo '<span style="color:red;font-size:20px;">Der opstod en fejl, prøv igen</span>';
- }
- else {
- //Data bestod validering, send til ewire
- header('Location: '.$relations[$server][$produkt]);
- }
- }
- ?>
men den skal gøre sådan at den åbner en ny fane
hvordan gør jeg det ?
Indlæg senest redigeret d. 01.04.2011 06:44 af Bruger #16454