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?
LVL 1
Jazzy 1012Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Peos JohnPHPCommented:
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.
0
Jazzy 1012Author Commented:
I want to show metrics from my database
0
Ray PaseurCommented:
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.
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Jazzy 1012Author Commented:
Yes but can you show me an example, Im not sure how to build a metrics with php
0
Slick812Commented:
greetings Jasmine Ikhreishi , , You ask for something in a very general way -
    "how to build a metrics with php "

But there can be many, many different meanings for   "build a metrics" and what you think you need or want to be displayed on a web page. Also there may be different things to consider in PHP for using a database TABLE with columns to hold information that might be used on any storage and filtered retrieval of rows of your metric informations.

Can you tell us more about what kind of web page display you need or have in mind, AND how much and what kind of numerical output you may want to be on a page. Please tell us more about what the database is storing in the table, and what your goal is for the PHP page output to look like.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ray PaseurCommented:
"Metrics" is a pretty broad term.  We will need to narrow the definition down a bit!

If you have a value in your database that you want to show on the browser viewport, you can find any number of good PHP / MySQL learning resources in this article.  After you  understand the basics, it's just "clone, hack, repeat" until you get the HTML and CSS right, then hook up your PHP and database query to put the data into your HTML document.  It's not hard, but it's an iterative process with a lot of moving parts -- in other words, it's a project with a work product, not a question with an answer that we can post in a forum.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.