[PHP] Re: .INC files

2005-06-01 Thread Martin Zvarik
Sorry I didnt know the post delay is that LONG...


 On 5/31/05, Jason Barnett [EMAIL PROTECTED] wrote: 
 
 Martin Zvarik wrote:
  Hi,
  I saw files like file.inc.php and file.inc
 
  What is the *.inc suffix good for ?
 
  Thank you for replies.
 
  Martin
 
 STOP SPAMMING THE LIST!
 
 .inc is just a shorthand for include files and it's just a different way
 of organizing code



[PHP] Re: .INC files

2005-05-31 Thread Jason Barnett

Martin Zvarik wrote:

 Hi,
I saw files like file.inc.php and file.inc

What is the *.inc suffix good for ?

Thank you for replies.

Martin


STOP SPAMMING THE LIST!

.inc is just a shorthand for include files and it's just a different way 
of organizing code


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



[PHP] Re: .inc files doubles up

2002-10-29 Thread Tine

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
blockquoteraquo; 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 blockquoteraquo; 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 blockquoteraquo; 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
blockquoteraquo; 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




Re: [PHP] Re: .inc files doubles up

2002-10-29 Thread Martin Hudec
Hello Tine,

it looks okay to me butlooks 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

T if ($sted == ){
T   include(head.inc);
T  echo(Du fylte ikke ut span class=\formfelt\sted/span.br
T blockquoteraquo; 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 blockquoteraquo; 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 blockquoteraquo; 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 blockquoteraquo; 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,
 Martinmailto:corwin;corwin.sk


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




Re: [PHP] Re: .inc files doubles up

2002-10-29 Thread Tine

Martin Hudec [EMAIL PROTECTED] wrote in message
news:18910327021.20021029184135;corwin.sk...
 Hello Tine,

 it looks okay to me butlooks 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

Martin, thanks! I think I understood that...off to try it out, and will post
here if it works out (or doesn't..heh)



 T if ($sted == ){
 T   include(head.inc);
 T  echo(Du fylte ikke ut span class=\formfelt\sted/span.br
 T blockquoteraquo; 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 blockquoteraquo; 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 blockquoteraquo; 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 blockquoteraquo; 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,
  Martinmailto:corwin;corwin.sk




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




Re: [PHP] Re: .inc files doubles up

2002-10-29 Thread Tine

Martin Hudec [EMAIL PROTECTED] wrote in message
news:18910327021.20021029184135;corwin.sk...
 Hello Tine,

 it looks okay to me butlooks 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
blockquoteraquo; 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
blockquoteraquo; 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 blockquoteraquo; 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
blockquoteraquo; 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
blockquoteraquo; 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 blockquoteraquo; 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 blockquoteraquo; 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 blockquoteraquo; 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 blockquoteraquo; 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,
  Martinmailto:corwin;corwin.sk




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




Re: [PHP] Re: .inc files doubles up

2002-10-29 Thread John Nichel
Do a little debugging.  The error is easy to spot..



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);
} --- GET RID OF THIS!

   if (empty($navn)){
  echo(Du fylte ikke ut span class=\formfelt\navn/span.br
blockquoteraquo; 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
blockquoteraquo; 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 blockquoteraquo; 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
blockquoteraquo; 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
blockquoteraquo; 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 blockquoteraquo; 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 blockquoteraquo; 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 blockquoteraquo; 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 blockquoteraquo; 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,
Martinmailto:corwin;corwin.sk










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




[PHP] Re: .inc files

2001-11-04 Thread Jan Grafström

Hi Rudi!
Check out this example from Hotscripts.
http://www.hotscripts.com/cgi-bin/dload.cgi?ID=12367

Regards
Jan Grafstrom
Rudi Ahlers [EMAIL PROTECTED] skrev i meddelandet
008401c16534$dcb77580$0c00a8c0@camelot">news:008401c16534$dcb77580$0c00a8c0@camelot...
 Hi

 I was wondering, is there a different way using .inc files? I have a lot
of
 .inc files, which are displayed as normal text when you call it in the
 browser. I would like to still have a file with the username / password /
 database / etc in, but make it say config.inc.php. How would I get the app
 to read a file like that, where say $admin=rudi;
 But also, how would I be able to change the values from another file? ie.
 write to it, and delete lines in it?
 I'm still learnin PHP, and it's great and a lot of fun.
 Regards

 Rudi Ahlers





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]