Note that there are some explanatory texts on larger screens.

plurals
  1. POphp with mysql, the code is not inserting into my table
    text
    copied!<p>Big edit:</p> <p>New script:</p> <pre><code>&lt;?php error_reporting(E_ALL|E_NOTICE); $nazwabazydanych = "projekt"; $pesel = mysql_real_escape_string($_POST['pesel']); $imie = mysql_real_escape_string($_POST['imie']); $nazwisko = mysql_real_escape_string($_POST['nazwisko']); $telefon = mysql_real_escape_string($_POST['telefon']); $adres = mysql_real_escape_string($_POST['adres']); $nr_konta = mysql_real_escape_string($_POST['nr_konta']); $zarobek = mysql_real_escape_string($_POST['zarobek']); if (!$pesel || !$imie || !$nazwisko || !$telefon || !$adres || !$nr_konta || !$zarobek) { print "Nie zostały wypełnione wszystkie pola"; exit; } $db = mysql_pconnect("localhost", "root", ""); if (!$db) { print "Nie można nawiązać połączenia z bazą danych"; exit; } mysql_select_db("$nazwabazydanych"); $query = mysql_query("CALL dodaj_osobe ('$pesel','$imie','$nazwisko','$telefon','$adres','$nr_konta','$zarobek')"); ?&gt; </code></pre> <p>Action:</p> <pre><code>&lt;form action="lool.php" method="post"&gt; PESEL: &lt;input type="text" name="pesel" maxlength=11 size=12&gt;&lt;br&gt;&lt;br&gt; Imię: &lt;input type="text" name="imie" maxlength=45 size=46&gt;&lt;br&gt;&lt;br&gt; Nazwisko: &lt;input type="text" name="nazwisko" maxlength=45 size=46&gt;&lt;br&gt;&lt;br&gt; Telefon: &lt;input type="text" name="telefon" maxlength=9 size=10&gt;&lt;br&gt;&lt;br&gt; Adres: &lt;input type="text" name="adres" maxlength=45 size=46&gt;&lt;br&gt;&lt;br&gt; Numer konta: &lt;input type="text" name="nr_konta" maxlength=20 size=21&gt;&lt;br&gt;&lt;br&gt; Zarobek: &lt;input type="text" name="zarobek" maxlength=8 size=9&gt;&lt;br&gt;&lt;br&gt; &lt;input type="submit" value="Dodaj klienta"&gt; &lt;/form&gt; </code></pre> <p>And the updated error:</p> <p>NONE!</p> <p>Thanks guys, but I got a question: How can I send an error if for example "nr_konta" or "pesel" or "telefon" are too low digits?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload