(IMG:
style_emoticons/default/oneeyedsmiley02.png) Witam mam taki problem :
A mianowicie jestem sobie na swojej stronie zrobiłem formularz dodałem kod żeby ten dane z formularza trafiały do bazy danych no jest ok trafiać trafiają ale jest małe ale
mam 3 zakładki Strona główna Kontakt(ten formularz właśnie) i Logowanie Admina
i po kliknięciu na Kontakt automatycznie wysyła mi pusty zbiór mam pytanie czemu tak się dzieje może ktoś pomoże mi to rozwiązać Poniżej zamieszczam swój kodzik (IMG:
style_emoticons/default/smile.gif)
<?php
include ('config.php');
//dodawanie według typu
if($_GET['typ'])
{
//list polecon dodawanie
if($_GET['typ']=='list_polecony')
{
//dodanie
if($_POST['refresh'] and $_POST['refresh']!=$_SESSION['refresh'])
{
$_SESSION['refresh']=$_POST['refresh'] ;
$date = $_POST['data_nadania']." ".$_POST['data_nadania_g'].":".$_POST['data_nadania_m'];
if(mysql_query("INSERT INTO `reklamacja` (`nr_nadania` ,`imie_rekl` ,`nazwisko_rekl` ,`ulica_rekl` ,`kod_poczt_rekl` ,`miasto_rekl` ,`mail`, `tel_rekl` , `temat` ,`tresc`)VALUES ( '".$_POST['nr_nadania']."', '".$_POST['imie_rekl']."', '".$_POST['nazwisko_rekl']."', '".$_POST['ulica_rekl']."', '".$_POST['kod_poczt_rekl']."', '".$_POST['miasto_rekl']."', '".$_POST['mail']."', '".$_POST['telefon']."', '" .$_POST['tresc']."','".$_POST['temat']."');")) {
Echo "<font color='green'>Wysłano Pomyślnie Wiadomość</font>"; }
else
{
Echo "<font color='red'>Nie udało się wysłać wiadomości - prawdopodobnie zrobiłeś/-aś jakiś mały błąd</font>"; }
?>
I Formularz
<form action="" method="POST" style="margin-top:10px;" > <table width="493" id="tbl_insert"> <th width="149" scope="col"> </th> <th width="250" scope="col">Proszę wypenić wszystkie pola
</th> <th scope="row">Numer nadania
</th> <td><input type="text" name="nr_nadania" id="nr_nadania"></td>
<th scope="row">Imię
</th> <td><input type="text" name="imie_rekl" id="imie_rekl"></td>
<th scope="row">Nazwisko
</th> <td><input type="text" name="nazwisko_rekl" id="nazwisko_rekl"></td>
<th scope="row">Ulica
</th> <td><input type="text" name="ulica_rekl" id="ulica_rekl"></td>
<th scope="row">Kod Pocztowy
</th> <td><input type="text" name="kod_poczt_rekl" id="kod_poczt_rekl"></td>
<th scope="row">Miasto
</th> <td><input type="text" name="miasto_rekl" id="miasto_rekl"></td>
<th scope="row">E-mail
</th> <td><input type="text" name="mail" id="mail"></td>
<th scope="row">Telefon
</th> <td><input type="text" name="tel_rekl" id="tel_rekl"></td>
<th scope="row">Godzina
</th> <td><input size="2" maxlength="2" name="data_nadania_g" type="text" value="<?=date("H");?>"/>
minuta
<input size="2" maxlength="2" name="data_nadania_m" type="text" value="<?=date("i");?>"/>
</td> <th scope="row">Temat
</th> asdasdasd
<th scope="row">Treść
</th>
<td><input name="btn" type="image" src="images/menu/wyslij.png" id="btn" style="width: 100px;float:right;" value="Wyślij" /></td> <input type="hidden" name="MM_insert" value="form">
Ten post edytował fakenmr 18.04.2012, 12:07:02