|
-
January 9th, 2009, 05:12 PM
#1
How do I output information from a PHP page to an HTML page?
I have a .php web page with these lines:
Code:
//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?
-
January 9th, 2009, 06:06 PM
#2
Re: How do I output information from a PHP page to an HTML page?
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
January 9th, 2009, 06:10 PM
#3
Re: How do I output information from a PHP page to an HTML page?
Add the following to an .htaccess file.
Code:
AddType application/x-httpd-php .html
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|