Click to See Complete Forum and Search --> : How do I output information from a PHP page to an HTML page?


guitarscn
January 9th, 2009, 04:12 PM
I have a .php web page with these lines:

//gather all the comments
$commentquery = mysql_query("SELECT * FROM comments WHERE tutorialid='$tutid' ORDER BY date DESC") or die(mysql_error());

//count all the comments for the total
$commentNum = mysql_num_rows($commentquery);

I want the value of $commentNum which is going to be a number, to be displayed on another page that's written in HTML (.html extension) from the .php page.

How can I transfer this number over?

PeejAvery
January 9th, 2009, 05:06 PM
[ moved ]

PeejAvery
January 9th, 2009, 05:10 PM
Add the following to an .htaccess file.

AddType application/x-httpd-php .html