CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2008
    Posts
    6

    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?

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: How do I output information from a PHP page to an HTML page?

    [ moved ]
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3
    Join Date
    May 2002
    Posts
    10,943

    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
  •  





Click Here to Expand Forum to Full Width

Featured