Here is a simple code that will connect us from our MYSQL Database.
First and foremost. We need to create the database name first.
I will not explain the creation of database using MYSQL here since It will
consume more time explaining.
One we have the database ready.
We need a simple PHP script to make a connection:
Assuming we have our local webserver running.
Heres the simple code:
Save this as. Connect.php
$db_host = "localhost";
$db_user = "root";
$db_pass = "xxx"; --- xxx represents your password given to your database.
$db_name = "xxx"; ---- xxx represents the name of your database created.
mysql_connect($db_host,$db_user,$db_pass,$db_name);
That's it. The Code is fairly simple enough to understand.
Once you are connected to the database. You may now be able to create
PHP scripts to ADD, DELETE, VIEW , EDIT datas.
Thanks a lot
Thursday, June 16, 2011
Friday, July 30, 2010
Creating a simple code using PHP to capture barcode scanner entry
The code
Barcode scanner is just like a keyboard. So, we use javascript to set focus on the input field to force the value to load within the input field.
Try this one below with your favorite barcode scanner and see it in action. The script used here is written above.
Barcode scanner is just like a keyboard. So, we use javascript to set focus on the input field to force the value to load within the input field.
Try this one below with your favorite barcode scanner and see it in action. The script used here is written above.
Thursday, July 29, 2010
Introduction to PHP Programming Language
What is PHP?
* PHP stands for PHP: Hypertext Preprocessor
* PHP is a server-side scripting language, like ASP
* PHP scripts are executed on the server
* PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid,PostgreSQL,Generic ODBC, etc.)
* PHP is an open source software
* PHP is free to download and use
* PHP stands for PHP: Hypertext Preprocessor
* PHP is a server-side scripting language, like ASP
* PHP scripts are executed on the server
* PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid,PostgreSQL,Generic ODBC, etc.)
* PHP is an open source software
* PHP is free to download and use
Subscribe to:
Posts (Atom)