Re: code troble
| From: | * R&zE: | Date: | Fri, 07 Sep 2001 12:48:42 +0000 |
| Subject: | Re: code troble | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-66401@lists.php.net to get a copy of this message | ||
Well... I've already found something I overlooked. You call emty()
io empty(); see below...
> > <html>
> > <head>
> > <title>Example 2.01</title>
> > <meta http-equiv="Content-Type" content="text/html;
> > charset=iso-8859-1">
> > </head>
> > <body>
> > <?php
>
> > if (emty(provera)) {pokazi();}
^^
^^
Here you forgot the 'p' in emPty()
>
> I'd use $ here :)
> if (empty ($provera)) ...
> ^
> ^
>
> > else {obrada();}
> > ?>
> > <?php
> > function pokazi() {
> > global $PHP_SELF;
> > ?>
> > <form target = "<?php echo $PHP_SELF ?>;" METHOD = get>
> > <input type = "text" name = "ime">
>
> > <input type = "text" name = "vrednost"
>
> If I were you I'd close the input-tag :)
> <input type = "text" name = "vrednost">
> ^
> ^
>
> > <input type ="hidden" name = "provera" value =
> > "rezultati"
>
> and again...
> <input type ="hidden" name = "provera" value =
> "rezultati">
> ^
> ^
>
>
> > </form>
> > <?php
> > }
> > ?>
> > <?php
> > function obrada() {
>
> > global $ime;
> > global $vrednost;
>
> Did you check whether or not $ime and $vrednost are defined/set at
> all? (isset ($ime) or !empty ($ime))
>
> > if ($ime == "Nikola" && $vrednost == 100){
> > echo "Zdravo $ime <br>";
> > echo "Iznos na Vasem racunu je $vrednost dolara";
> > }
> > ?>
> > </body>
> > </html>
--
* R&zE:
-- »»»»»»»»»»»»»»»»»»»»»»»»
-- Renze Munnik
-- DataLink BV
--
-- E: renze@datalink.nl
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- ««««««««««««««««««««««««