This topic is locked

include data in web page

8/17/2005 11:39:09 PM
PHPRunner General questions
author

OK, I know this is probably really basic, but I've created a database and can now administrate it (add, edit, delete).
I want to include the content of the database in a web page, as I see it on the XXXXX_print.php page.
How can I do this? I have the include folder with contents in the same directory as the web page.
If I upload the XXXXX_print.php page to the same directory, I see the data just fine. If I copy the contents of XXXXX_print.php page and paste it into another file with a PHP extension, I get several errors, which I know are header errors - I just can't figure out how to get rid of them. The errors vary, depending on what I try eliminating to correct it. There are no other php function on the web page.
Any ideas, or am I just hopeless?

admin 8/18/2005

Hi,
..._print.php file uses some session variables set in _list.php like search, sorting and pagination settings.

However you can make an independent version of ..._print.php.

Copy contents of ..._print.php to another file and replace the following line in it:
$strSQL=$_SESSION[$strTableName."_sql"];
with this snippet
//$strSQL=$_SESSION[$strTableName."_sql"];

$strSQL=$gstrSQL;
You should place this new file in the folder where original _print.php resides because it uses files in include folder.