Array
(
[id_typ] => 1
[rach_obciazony] => 12345678910111213141516171
[rach_docelowy] =>
[nazwa_odbiorcy] =>
[adres_odbiorcy] =>
[tytul] =>
[kwota] =>
[data] =>
[submit] => Wykonaj
)
Oto kod formularza:
i przekazuje te dane do nastepnego pliku tranzakcja.php:
<?php include "auth_user.inc.php"; include "conn.inc.php"; ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1250"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <script language="javascript" src="kalendarz.js"></script> <title>Serwis internetowy</title> </head> <body onLoad="document.onmousemove = mysz;"> <table border="0" cellpadding="2" width="100%"> <tr> <td width="50%"><img border="0" src="logoPKO.gif" width="240" height="67"></td> <td width="100%"> <div align="Right"> <table border="0" cellpadding="2" width="40%"> <?php $query = "SELECT CONCAT_WS(' ',imie,nazwisko) as imie, login, stan, nr_rachunku " . "FROM klienci JOIN hasla ON klienci.id_haslo=hasla.id JOIN rachunek ON klien
ci.id=rachunek.id_klienta " . "WHERE login = '" . $_SESSION['user_logged'] . "' ". "AND haslo = '" . $_SESSION['user_password'] . "' "; ?> <tr> </tr> <tr> </tr> </table> </div> </td> </tr> </table> <table align="center" cellpadding="0" cellspacing="0" width="100%" bgcolor="#000064"> <tr> <td width="4"> </td> <td class="topmenu"> </td> <td width="4"> </td> </tr> </table> <p> </p> <table border="0" width="99%" cellpadding="2"> <tr> <td width="10%"><a href="index.php">Strona g³ówna</a> <p><a href="przelew.php">Przelew jednorazowy</a></p> <p>Lokaty</p> <p>Historia rachunku</p> <p><a href="dane.php">Dane osobowe</a></p> <p><a href="wyloguj.php">Wyloguj</a></td> <td width="50%"> <div align="center"> <center> <form action="tranzakcja.php" method="post"> <input type="hidden" name="id_typ" value="1"> <table border="1" cellpadding="2" width="72%" bgcolor="#FFF0D2"> <tr> <td width="100%"><b>Przelew jednorazowy:</b></td> </tr> </table> </center> </div> <div align="center"> <center> <table border="1" cellpadding="2" width="72%"> <tr> <td width="24%">Z rachunku:</td> <td width="57%"> <table border="1" cellpadding="2" width="100%"> <tr> <td width="100%"><center><select name="rach_obciazony"> </tr> </table> <table border="1" cellpadding="2" width="129%"> <tr> <td width="50%">¦rodki dostêpne:</td> </tr> </table> </td> <td width="19%"><b>Wymagane</b></td> </tr> <tr> <td width="24%">Numer rachunku odbiorcy:</td> <td width="57%"><input type="tekst" name="rach_docelowy" size="30"></td> <td width="19%"><b>Wymagane</b></td> </tr> <tr> <td width="24%">Nazwa odbiorcy:</td> <td width="57%"><input type="tekst" name="nazwa_odbiorcy" size="30"></td> <td width="19%"></td> </tr> <tr> <td width="24%">Adres odbiorcy:</td> <td width="57%"><input type="tekst" name="adres_odbiorcy" size="30"></td> <td width="19%"></td> </tr> <tr> <td width="24%">Tytu³ przelewu:</td> <td width="57%"><input type="tekst" name="tytul" size="30"></td> <td width="19%"><b>Wymagane</b></td> </tr> <tr> <td width="24%">Kwota:</td> <td width="57%"><input type="tekst" name="kwota" size="30"></td> <td width="19%"><b>Wymagane</b></td> </tr> <tr> <td width="24%">Zlecona data:</td> <td width="57%"><input type="text" name="data" onclick="showKal(this)"></td> <td width="19%"><b>Wymagane</b></td> </tr> </table> </center> </div> <center><input type="submit" name="submit" value="Wykonaj"></center> </form> </td> </tr> </table> </body> </html>
<?php include "auth_user.inc.php"; include "conn.inc.php"; ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1250"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>Serwis internetowy</title> </head> <table border="0" cellpadding="2" width="100%"> <tr> <td width="50%"><img border="0" src="logoPKO.gif" width="240" height="67"></td> <td width="100%"> <div align="Right"> <table border="0" cellpadding="2" width="40%"> <?php $query = "SELECT CONCAT_WS(' ',imie,nazwisko) as imie, login " . "FROM klienci JOIN hasla ON klienci.id_haslo=hasla.id " . "WHERE login = '" . $_SESSION['user_logged'] . "' ". "AND haslo = '" . $_SESSION['user_password'] . "' "; ?> <tr> </tr> <tr> </tr> </table> </div> </td> </tr> </table> <table align="center" cellpadding="0" cellspacing="0" width="100%" bgcolor="#000064"> <tr> <td width="4"> </td> <td class="topmenu"> </td> <td width="4"> </td> </tr> </table> <p> </p> <?php $sql = "INSERT INTO transfery(id_typ, rach_docelowy, rach_obciazony, data, tytul, kwota, nazwa_odbiorcy,
adres_odbiorcy) values ('" . $_POST['id_typ'] . "', '" . $_POST['rach_docelowy'] . "', '" . $_POST['rach_obciazony'] . "', '" . $_POST['data'] . "', '" . $_POST['tytul'] . "', '" . $_POST['kwota'] . "', '" . $_POST['nazwa_odbiorcy'] . "', '" . $_POST['adres_odbiorcy'] . "')"; ?> <div align="center"> <center> <table border="1" cellpadding="2" width="79%" bgcolor="#FFF0D2"> Transakcja wykonana pomyslnie. Kliknij w link aby powrocic na strone g³ówn±.<a href="index.php">Strona g³ówna</a> <pre> <?php ?> </pre></table> </div> </body> </html>
moj problem jest taki ze nie dodaje mi zadnego wiersza do bazy mimo ze nigdzie nie wyswietla sie blad. Prosze o pomoc