Hey,

We got an assignment to host a website, our members must be kept in a mySQL database. I honestly have no idea where to start. If you could just help me with the basics steps. Ill research the details myself.

Here's what I've done so far.
1.I downloaded and installed mySQL.
2.I created a database.
3.I downloaded and installed php
4.I have java and netbeans set-up and can code in java

Where do I go from here. How can I display content in the database in a web browser?
Like I said, no need to provide code or anything just give me the big picture.

Thanks

Dani AI

Generated

Three pieces must work together: a web server (Apache/Nginx or a Java servlet container), a server-side layer that talks to MySQL (PHP or Java/JDBC), and the browser-facing HTML/CSS/JS that presents results. Requests go: browser -> server-side script -> database query -> server returns HTML. Locally this can be developed with a bundled stack (WAMP/XAMPP/MAMP) for PHP or with NetBeans + Tomcat/GlassFish for a Java webapp. For deployment, pick hosting that supports the stack chosen or use a small VPS/managed platform.

A practical, minimal workflow:

  • Model the data first. A simple users table with an integer id and columns for firstname/lastname/email is enough to start.
  • Create a dedicated DB user (not root) and grant only needed privileges for that database.
  • Build a server endpoint that accepts form POSTs, validates input, and uses parameterized queries to insert or read rows.
  • Create a page that SELECTs the user rows and renders them as HTML (a basic list or table).
  • Test everything locally, enable error logging, then deploy and switch config values (DB host, credentials) to production-safe settings.

Security and production notes: never run queries by concatenating user input. Use prepared statements / parameterized queries (PDO/mysqli in PHP, PreparedStatement or a DataSource in Java). Store passwords with a strong hash (bcrypt / password_hash), keep DB credentials out of webroot or in environment variables, and enable HTTPS. Limit the DB user privileges and avoid exposing MySQL to the public internet unless necessary.

Common gotchas and quick troubleshooting:

  • “Can’t connect”: check MySQL is running, the host/port, firewall, and MySQL bind-address.
  • “Access denied”: wrong user/host combo or missing GRANTs.
  • Blank pages in PHP: enable error reporting or check server logs.
  • Java apps: include the MySQL Connector/J jar and configure a connection pool.
    Character sets matter—use utf8mb4 for full Unicode support.

Notes tied to this thread: ’s point about server-side data controls is right in principle, and ’s push to learn PHP forms is helpful. Given ’s Java/NetBeans background, either PHP or a servlet-based approach are valid—pick the one that minimizes friction for the assignment.

Recommended Answers

All 3 Replies

Im not sure how much help I can be since I am a .NET developer so I'm not sure how to explain this in php if that is in fact what your starting off in (which is not a bad thing either).
But what values are you wanting to appear from your database on a website? You can use data bound controls like drop down lists/combo boxes to let the user select from a dynamic list of employees, products, etc. I know that in ASP.NET you can use things like gridview and data grid controls that will show data based on a SQL query or stored procedure and PHP has equivalents to these. As far as getting data in to the database in PHP from what little I know is to simply create an HTML page with a form on it, post it to a PHP file that will handle the processing on the server side and can submit the data to to the database from there.

Sites like Amazon, Facebook, Best Buy, etc use server languages like ASP.NET, PHP, and Ruby on Rails to display their data on the web. Also, you must have at least a basic understanding of HTML to even get started.

If you haven't yet, I would look at the PHP tutorial at w3schools.com

Sorry, forgot to mention. Can do html as well.
Lets say I have a simple table with Firstname and surname in it. I will then create a html page with a form. This will run from client side. After the form posted to a php script on the server side, the php script will be able to send a Firstname and Lastname to the html file?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.