"Martin Hudec" <[EMAIL PROTECTED]> wrote in message
news:18910327021.20021029184135@;corwin.sk...
> Hello Tine,
>
> it looks okay to me but....looks like you have met two conditions at
> time ($sted == "") and ($telefon == "0")....why dont u make something
> like this?
>
> if (empty($sted) || empty($telefon)) {
>  include header
>    if (empty($sted)){
>    echo ....STED NOT FILLED...
>    }
>    if (empty($telefon)){
>    echo .....TELEFON NOT FILLED...
>    }
>  include footer
> }
>
> that checks value of both variables...checks if they are empty....
> that || means or...so if $sted or $telefon are empty it will display
> your code.....first it will implement include header then he will
> display what is not filled based on if...and finaly it will include
> footer....
>
> hope it helps
------------

Ok, wrote the following code, but get a parse error line 74 (last part of
the code):

if (empty($navn) || empty($addresse)  || empty($postnummer)  || empty($sted)
|| empty($epost))

{
 include("head.inc");
}

   if (empty($navn)){
      echo("Du fylte ikke ut <span class=\"formfelt\">navn</span>.<br>
<blockquote>&raquo; <a href=\"m_skap.html\" class=\"linkdot\">Tilbake til
skjemaet</a></blockquote>");

   }
   if (empty($addresse)){
       echo("Du fylte ikke ut <span class=\"formfelt\">addresse</span>.<br>
<blockquote>&raquo; <a href=\"m_skap.html\" class=\"linkdot\">Tilbake til
skjemaet</a></blockquote>");

   }

   if (empty($postnummer)){
       echo("Du fylte ikke ut <span
class=\"formfelt\">postnummer</span>.<br> <blockquote>&raquo; <a
href=\"m_skap.html\" class=\"linkdot\">Tilbake til
skjemaet</a></blockquote>");

   }


   if (empty($sted)){
       echo("Du fylte ikke ut <span class=\"formfelt\">sted</span>.<br>
<blockquote>&raquo; <a href=\"m_skap.html\" class=\"linkdot\">Tilbake til
skjemaet</a></blockquote>");

   }


   if (empty($epost)){
       echo("Du fylte ikke ut <span class=\"formfelt\">e-post</span>.<br>
<blockquote>&raquo; <a href=\"m_skap.html\" class=\"linkdot\">Tilbake til
skjemaet</a></blockquote>");

   }
 include("foot.inc");
}

What's wrong here?













> T> if ($sted == ""){
> T>   include("head.inc");
> T>      echo("Du fylte ikke ut <span class=\"formfelt\">sted</span>.<br>
> T> <blockquote>&raquo; <a href=\"m_skap.html\" class=\"linkdot\">Tilbake
til
> T> skjemaet</a></blockquote>");
> T>   include("foot.inc");
> T>      $Envoi = 0;
> T> }
> T> else {
> T>      $MailBody .= "Sted : $sted\n";
> T> }
> T> if ($telefon == "0"){
> T>   include("head.inc");
> T>      echo("Du fylte ikke ut <span
class=\"formfelt\">telefonnummeret</span>
> T> ditt.<br> <blockquote>&raquo; <a href=\"m_skap.html\"
> class=\"linkdot\">>Tilbake til skjemaet</a></blockquote>");
> T>   include("foot.inc");
> T>      $Envoi = 0;
> T> }
> T> else {
> T>      $MailBody .= "Telefon : $telefon\n";
> T> }
> T> if ($epost == ""){
> T>   include("head.inc");
> T>      echo("Du fylte ikke ut <span
class=\"formfelt\">e-postaddressen</span>
> T> din.<br> <blockquote>&raquo; <a href=\"m_skap.html\"
> class=\"linkdot\">>Tilbake til skjemaet</a></blockquote>");
> T>   include("foot.inc");
> T>      $Envoi = 0;
> T> }
> T> else {
> T>      $MailBody .= "E-post : $epost\n";
>
> T> }
> T> if ($kommentarer == ""){
> T>   include("head.inc");
> T>      echo("Du fylte ikke ut <span
class=\"formfelt\">kommentarer</span>.<br>
> T> <blockquote>&raquo; <a href=\"m_skap.html\" class=\"linkdot\">Tilbake
til
> T> skjemaet</a></blockquote>");
> T>   include("foot.inc");
> T>      $Envoi = 0;
> T> }
> T> else {
> T>      $MailBody .= "Kommentarer : $kommentarer\n";
>
> T> }
>
>
>
> --
> Best regards,
>  Martin                            mailto:corwin@;corwin.sk
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to