<?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, id_rachunku, rach_docelowy, rach_obciazony, data, tytul, kwota, naz
wa_odbiorcy, adres_odbiorcy) values ('" . $_POST['id_typ'] . "', '" . $_POST['id_rachunku'] . "', '" . $_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> </table> </div> </body> </html>
Chcialbym uzyskac nastepujacy efekt. Jezeli bedzie brakowalo jakiejs zmiennej $_POST to z tej strony przeniesie mnie spowrotem na strone formularza i wyswietli komunikat czego brakowalo.