You can do
if(!isset($_POST['email'])) {
go_back();
} else {
print "Thanx";
}
or
if($_POST['email'] == "") {
go_back();
} else {
print "Thanx";
}
"Jan - Cwizo" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php