Witam mam problem z API Zabijaka a dokładniej mój formularz jakby nie czytał w ogóle kodu php. Jeżeli wciśnie się "Zakup" przeładuje się tylko strona.
vip.php<?php
include('template.class.php');
include('page_header.php');
$template = new Template();
$template->set_filenames(array( 'body_vip' => 'body_vip.tpl')
);
if(isset($_POST['send'])){ $sms = '6';
$kod = $_GET['kod'];
$apikey = 'cd518a15794b028ec87ac49a93fc0581';
$_apiAnswer = file_get_contents("http://api.zabijaka.pl/1.1/".$apikey."/sms/".$sms."/".$kod."/sms.json/add"); $answer = json_decode($_apiAnswer);
if($answer->{'error'})
{
}
else if ($answer->{'success'})
{
echo 'Poprawny kod sms:'. $kod. ($answer->{'amount'}?
' DoĹadowuje kwotÄ
: '.$answer->{'amount'}:''); }
}
$template->pparse('body_vip');
include('page_footer.php');
?>
Formularz<form action="vip.php" method="post"> <table width="100%" border="1">
<td>Nick:(na serwerze)
</td> <td><input type="text" name="nick" maxlength="16" /></td> <td>Kod SMS:
</td> <td><input type="text" name="kod" maxlength="16" /></td> <td>Kontakt GG:
</td> <td><input type="text" name="kontakt" maxlength="16" /></td> <td><input type="submit" name="send" value="Zakup" /></td>
Proszę o pomoc.
@f5
Jest ktoś w stanie mi pomóc?