Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php5] nie pobiera zmiennych metoda post
--buli--
post
Post #1





Goście







Mianowicie mam prosty formularzyk do pobierania danych i wrzucania ich mysqla
  1. <?
  2.  
  3. if($_SESSION['access'] != 'root'){
  4. @header ("Location: index.htm");
  5. }
  6. ?>
  7. <a href="list.php">pokaz liste</a>
  8. <div style="position:relative">
  9. <form enctype="text/plain" action="add_file.php" method="post">
  10. <fieldset>
  11. <legend>Formularz - dodaj</strong></legend>
  12. <p><strong>Imię</strong>: <input type="text" name="imie" value="Jan" size="30" maxlength="40" style="position: absolute; left: 150px; background-color: cornsilk; font-style: italic; color: gray "></p>
  13. <p><strong>Nazwisko</strong>: <input type="text" name="nazwisko" value="Kowalski" size="30" maxlength="40" style="position: absolute; left:150px; background-color: cornsilk; font-style: italic; color: gray "></p>
  14. <p><strong>Pesel</strong>: <input type="text" name="pesel" value="88071506678" size="30" maxlength="40" style="position: absolute; left:150px; background-color: cornsilk; font-style: italic; color: gray "></p>
  15. <p><strong>Lekarz</strong>: <input type="text" name="lekarz" value="Klos" size="30" maxlength="40" style="position: absolute; left:150px; background-color: cornsilk; font-style: italic; color: gray "></p>
  16. <p><strong>Ilość naświetleń</strong>: <input type="text" name="ilosc" value="3" size="30" maxlength="40" style="position: absolute; left:150px; background-color: cornsilk; font-style: italic; color: gray "></p>
  17. <p><strong>Lekarz</strong>: <input type="text" name="dawka" value="2,6" size="30" maxlength="40" style="position: absolute; left:150px; background-color: cornsilk; font-style: italic; color: gray "></p>
  18. <p><strong>Lekarz</strong>: <input type="text" name="uwagi" value="chory zmarl" size="30" maxlength="40" style="position: absolute; left:150px; background-color: cornsilk; font-style: italic; color: gray "></p>
  19. </fieldset>
  20. <p><input type="submit" name="wyslij" value="Dodaj"></p>
  21. </form>

do tego plik przekazujacy dane do mysqla
  1. <?
  2.  
  3. if($_SESSION['access'] != 'root'){
  4. @header ("Location: index.htm");
  5. }
  6. require_once('./config.php');
  7. $sql=mysql_query("INSERT INTO `badania` (`data`, `imie`, `nazwisko`, `pesel`, `lekarz`, `ilosc`, `dawka`, `uwagi`) VALUES ('curdate();','".$_POST['imie']."', '".$_POST['nazwisko']."', '".$_POST['pesel']."', '".$_POST['lekarz']."', '".$_POST['ilosc']."', '".$_POST['dawka']."', '".($_POST['uwagi'])."')") 
  8. or die("błąd");
  9. ?>


Mianowicie wpisy do mysqla dodaja sie ale nie ma w nich zadnej wartosci.. doszedlem do tego ze poprostu $_POST nie pobiera mi zmiennych z formularza bo nawet gdy dam mu echo($_POST['imie']); to nic nie zwraca..
W czym jest problem..?
wlaczylem global registry w php.ini i wylaczylem safe mode snitch.gif
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.08.2025 - 21:39