hi i m a beginner. m student of mcs n making a project. its about a brush manufacturing company. i have GUI of my software. and also database of it. but don't have any idea what to do next? can any1 guide me please. i m using wamp server.

Dani AI

Generated

— you already have the two pieces you need: a web front end in WAMP's www folder and a MySQL schema. The missing piece is a small set of PHP server-side scripts that accept form input (or AJAX), talk to the database, and return results or redirect the user. 's "start with a test page" advice and 's suggestion of a separate config file are both good starting points; extend them by using a modern, secure DB layer (PDO or MySQLi) instead of the old mysql_* functions.

A simple workflow to follow:

  • Inventory the GUI: list each form/button and the data it needs to save or read from the database.
  • Create a single includes folder (keep DB credentials out of the public root if possible) and a reusable DB connection module.
  • Implement basic CRUD endpoints (create, read, update, delete) that your GUI calls. Use prepared statements everywhere.
  • Test each endpoint from the browser or with a tool (Postman/cURL) and debug with PHP error logging turned on during development.
  • When working, lock down user privileges in MySQL (do not use root), and remove debug output before deploying.

Example (PDO pattern — store config outside webroot and include it):

<?php
// db.php (require this inside scripts)
$config = include __DIR__ . '/../config.php';
$pdo = new PDO(
    $config['dsn'],
    $config['user'],
    $config['pass'],
    [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]
);

// prepared query example
$stmt = $pdo->prepare('SELECT * FROM brushes WHERE id = :id');
$stmt->execute(['id' => $_POST['id'] ?? 0]);
$row = $stmt->fetch(PDO::FETCH_ASSOC);

Troubleshooting & safety notes: ensure WAMP Apache and MySQL services are running, enable the PDO MySQL driver, check Apache/PHP error logs if a script fails, and validate/escape all input/output (use password_hash for passwords). For practical best practices and security guidance see PHP: The Right Way and OWASP's SQL Injection Prevention Cheat Sheet.

Recommended Answers

All 7 Replies

Member Avatar for Member #120589

Just a reminder from the Member Rules:

Do post in full-sentence English
Do use clear and relevant titles for new threads
Do not write in all uppercase or use "leet", "txt" or "chatroom" speak

What's this mean??

m student of mcs n making a project.

What do you need?
You have the front end, the database. I assume you need to join these up via pHp, but you give no information at all.

but don't have any idea what to do next? can any1 guide me please.

How about php.net ?

i dont know how to start joining them. i dont know how to start it

Member Avatar for Member #120589

You need:

1) A code editor (IDE) like Notepad or Notepad++, or Bluefish or Aptana or....
2) A web server, like Apache or even IIS (Apache's better)
3) pHp installed
4) MySQL or similar installed
5) phpMyAdmin installed

2-5 can be sorted out with something like XAMPP

Make a php page called my.php and place it under 'htdocs' folder of your installation. Run it in the browser from 'http://localhost/my.php'.

Not guaranteed to work - depends on your settings and installation.

Try this to start:

<?php

echo "hello world";

?>

As the only text in the file.

If you can get that to work, start reading the php.net manual, buy a couple of books and peruse some online tutorials (e.g. Tizag).

i have wampp installed. n i have placed all my GUI in www folder n made database in mysql. now how to connect them?

You can access WAMPP by going to http://localhost in your web browser. This will give you all the basic information on your WAMPP install.

A basic PHP MySQL connection looks like this:

<?php
//*** config.php ***//
mysql_connect('localhost','username','password');
mysql_select_db('database_name');
?>

A basic MySQL query is:

<?php
include('config.php');

$sql = "SELECT * FROM table_name";
$result = mysql_query($sql);
?>

Generally speaking, you have a LOT of reading and learning to do. Spend more time doing that then making forum posts, the only way to figure this stuff out is to try it yourself.

I have looked through your other posts, they all have the same theme. Your a student, doing an MSc, who posts their assignments online, or parts of them. Then gets members to answer them for you. If your doing an MSc surely you must have learnt in your BSc or number of years of experience in order to qualify to attend an MSc that RTM (Read The Manual).

Just google PHP and go to the PHP website. Sorry for the other members who have attempted to help him, But read through his other posts, some of them are unbelievable.

i am doig Msc. but i choose this field in my masters before that i did my bachelors in double maths. n now m doing my MCS from an online university. and that is the reason i am having problems. but i choose this project to take knowlege for myself. and these are not my assignments. i do them myself. there is no one to teach me so thats why get help from you people. thanks every one for help.

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.