Link to home
Start Free TrialLog in
Avatar of Jazzy 1012
Jazzy 1012

asked on

How do I show metrics with PHP or Javascript

I want to be able to display some metrics on my webpage, for example "How many users I have"
How am I able to do this? Is it better with php or javascript?
Avatar of Peos John
Peos John
Flag of Malaysia image

Do you want to display this metrics from the database? or Is it static information that you want to show it on the page?

PHP is a server side scripting language where the code runs on the webserver and sends the output to the browser(as HTML)
http://php.net/manual/en/intro-whatis.php

Javascript is Client side scripting language where the code runs on browser and used for performing actions on the browser.
Avatar of Jazzy 1012
Jazzy 1012

ASKER

I want to show metrics from my database
I think the PHP approach is the right one.  As PHP prepares the HTML document, it can access the information in the database and use this information to inject the metrics into appropriate HTML tags.  PHP can also control the CSS styling of these tags, so you can set the location, size, color and other information related to the display of your metrics.
Yes but can you show me an example, Im not sure how to build a metrics with php
ASKER CERTIFIED SOLUTION
Avatar of Member_2_248744
Member_2_248744
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial