"Tine" <[EMAIL PROTECTED]> wrote in message
news:20021029171957.30722.qmail@;pb1.pair.com...
> This is really my first major PHP encounter, and I have attempted to
modify
> a php form mail script to include a foot.inc and head.inc file, which
works
> fine if all required fields in the form is filled out. But if there are
more
> than 2 required fields missing I end up with what you see here:
>
> http://komposlo.inmono.net/sendform.php
>
> Now I can understand why that is, but how do I write a command that
includes
> the head/foot.inc file on certain conditions, so it isn't multiplied like
> seen at the above mentioned site?
>
>
> Again, all help is appreciated

Should have posted parts of the code to, so you see what I mean ;o)   :

}
if ($sted == ""){
  include("head.inc");
     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>");
  include("foot.inc");
     $Envoi = 0;
}
else {
     $MailBody .= "Sted : $sted\n";
}
if ($telefon == "0"){
  include("head.inc");
     echo("Du fylte ikke ut <span class=\"formfelt\">telefonnummeret</span>
ditt.<br> <blockquote>&raquo; <a href=\"m_skap.html\"
class=\"linkdot\">Tilbake til skjemaet</a></blockquote>");
  include("foot.inc");
     $Envoi = 0;
}
else {
     $MailBody .= "Telefon : $telefon\n";
}
if ($epost == ""){
  include("head.inc");
     echo("Du fylte ikke ut <span class=\"formfelt\">e-postaddressen</span>
din.<br> <blockquote>&raquo; <a href=\"m_skap.html\"
class=\"linkdot\">Tilbake til skjemaet</a></blockquote>");
  include("foot.inc");
     $Envoi = 0;
}
else {
     $MailBody .= "E-post : $epost\n";

}
if ($kommentarer == ""){
  include("head.inc");
     echo("Du fylte ikke ut <span class=\"formfelt\">kommentarer</span>.<br>
<blockquote>&raquo; <a href=\"m_skap.html\" class=\"linkdot\">Tilbake til
skjemaet</a></blockquote>");
  include("foot.inc");
     $Envoi = 0;
}
else {
     $MailBody .= "Kommentarer : $kommentarer\n";

}



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

Reply via email to