-2

Need to display PHP output to HTML page via tag heres's php :

<?php

mysql_connect("mysqldb3.ehost-services.com:3306","--username--","--password--") or die("No co to Db");
mysql_select_db("lasmif_count") or die("No Db");


$update_count = mysql_query("UPDATE user_count SET counts = counts+1");
$views = mysql_query("SELECT `user_count`.`counts` AS `views` FROM `user_count` ");
echo mysql_result($views,0);
 ?>

this php file is counting the number of visits

Now i want to insert the result of this in an html text tag

it is only displaying the number, nothing else.

Jay Blanchard
  • 34,243
  • 16
  • 77
  • 119

1 Answers1

-1

This should do the trick, you can either use php's echo function from the PHP part like this: echo '<p>' . mysql_result($views,0) . '</p>'; or you could start a new html part below and do something like: <p><?php echo mysql_results($views, 0); ?></p>