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?
PHPJavaScript

Avatar of undefined
Last Comment
Ray Paseur

8/22/2022 - Mon
Peos John

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.
Jazzy 1012

ASKER
I want to show metrics from my database
Ray Paseur

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.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Jazzy 1012

ASKER
Yes but can you show me an example, Im not sure how to build a metrics with php
ASKER CERTIFIED SOLUTION
Member_2_248744

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Ray Paseur

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.