Jump to content

Help with include statement and stuff


Morrac

Recommended Posts

Hello,

 

I am working on a web site that includes a file called lostNFound.inc.php which I need to display a database of lost and found pets.  I have the include statement right and the link is showing up but for some reason I cannot get the right function to work.  The link code is:

 

print "<a href\"".$PHP_SELF."?command=addLostNFoundPet&display=".$display."\" class=\"BBSV2StandardLink\" border=\"0\">Add new Lost N Found Pet</a>";

 

I inherited this site and most of the code is not the way I like to program but I have been do what I can.  Anyway, the PHP_SELF points to the community.php file which doesn't have the addLostNFoundPet function in it (the lostNFound.inc.php file has that function in it) but when I point the link to the lostNFound.inc.php page I get a blank page.  Now I need the form and the database to show (which the addLostNFoundPet function does) but I need it to show on the community.php page.

 

Any idea or do I need to provide more code?

 

Morrac

Link to comment
Share on other sites

well the include statement goes like this:

 

 

if(!@include("./plugins/lostNFound.inc.php"))

{

        @include("../plugins/lostNFound.inc.php");

}

 

 

This include statement is done inside of another if statement in the community.php file.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.