isset

From: Date: Tue, 25 Jun 2002 20:48:35 +0000
Subject: isset
Groups: php.windows 
Request: Send a blank email to php-windows+get-14403@lists.php.net to get a copy of this message
Hi I am a building a guestbook as a course of my learning of PHP. I have a page, on wich theree are some input boxes, on th enext page the data typet in those boxes is putet in to a database. I would like to check if there are nay empty input boxes, and if there are the user would get the sam form back and on the top it would say : Please fill the empty text boxes, and in the boxes would be the data that he has puet in. And I dount know how to include that in to this code : <? include ("../head.php"); MYSQL_CONNECT("localhost", "user", "password" ) or
              die(MYSQL_ERROR() . "napaka1");
MYSQL_SELECT_DB("knjiga") or
               die(MYSQL_ERROR() . "napaka2");
$ime = strip_tags($_POST[ime]); $naslov = strip_tags($_POST[naslov]); $email = strip_tags($_POST[email]); $url = strip_tags($_POST[url]); $kom = strip_tags($_POST[kom]); if ($_POST["submit"]) {
    $query = "insert into knjiga
    (ime, naslov, email, url, komentarji) values
('$ime','$naslov','$email','$url','$kom')"
          ;
          MYSQL_QUERY($query) or
          die(MYSQL_ERROR() . "napaka3");
?> <h2>Thanx</h2> <h2><a href="poglej.php">Poglej knjigo gostov!</a> <? } else {
    include("index.php");
} ?> Help would be weary helpfull ! PS : Sorry for my spelling, English is not my native langugae !! LP JaN www.3delavnica.com

« previous php.windows (#14403) next »