RE: [PHP-WIN] isset
| From: | Ross Fleming | Date: | Tue, 25 Jun 2002 22:11:01 +0000 |
| Subject: | RE: [PHP-WIN] isset | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-14409@lists.php.net to get a copy of this message | ||
One of the first things I ever did in PHP was something similar. Feel free
to play about with these. They can probably be merged into one php file,
but I never bothered.
Please be kind if the code is laughable, I just know it works. :D
Ross
> -----Original Message-----
> From: Jan - CWIZO [mailto:cwizo@3delavnica.com]
> Sent: 25 June 2002 21:49
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] isset
>
>
> 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
>