OkFx.Net, get rebates from your trade

Learn to create database aplication with php

In this time I will explain that we can database application program with php. In this case we talk about php programming for build script that use database and how to use it at our project.

For example, at this time we want to create simple application for our employee, about their personal information and healthcare integration

First, we need create mysql database. At this mysql database, we can create TABLES and it fields, and make Data Integration between TABLE PEGAWAI and TABLE KESEHATAN.

For create table PEGAWAI, we can use this command :
<?php
CREATE TABLE `pegawai` ( `IDpegawai` int(10) NOT NULL auto_increment, `nama` varchar(50) NOT NULL default ”,
`alamat` varchar(32) NOT NULL default ”,
`no_telpon` varchar(32) NOT NULL default ”,
PRIMARY KEY (`IDpegawai`) ) ENGINE=MyISAM ;
?>

And for create table KESEHATAN, we can use this command :
<?php
CREATE TABLE `kesehatan` ( `IDpegawai` int(10) NOT NULL default ”, `kesehatan` varchar(50) NOT NULL default ”,
`tgl_periksa` varchar(32) NOT NULL default ” ) ENGINE=MyISAM ;
?>

For application integration, we can sort which our employees that has good health and employees that have some illness that need some treatment.

After we create table “Pegawai” and Table “kesehatan”, we need to input data into that table.
For input data, we need create form that will input data to table

For form fill table “pegawai”, we can use this command :

<?php

<form action=”inputpegawai.php” method=”post”>
Name : <input type=”text” name=”nama” />
Address : <input type=”text” name=”alamat” />
</form>

?>

And for file “inputpegawai.php” we place this code :

<?php

mysql_query( ”
insert into pegawai set
nama = ‘$_POST[nama]‘,
alamat = ‘$_POST[alamat]‘
“) or die( mysql_error() );

?>

And for table Kesehatan we can also create like how to create form input for table pegawai.



Your Ad Here

5 Responses to “Learn to create database aplication with php”

  1. Julianna Silvestre Says:

    Hi it’s me Fiona, I am also visiting this website regularly, this website is really nice and the users are really sharing nice thoughts.

  2. estradiol Says:

    As Kymberly’s doctor have said, “Give Paleo a chance.” Or, If all else fails, try Paleo Diet. Thanks for sharing her story, I love to hear about successful stories of any kind and I really feel happy for those people like Kym. Is there a link where I could check updates about her Paleo lifestyle?

  3. menopause estrogen Says:

    Sounds like a terrible experience for such a young girl. I hope all is well and you have bought her enough ice cream, etc. to help her put the experience out of her mind.

  4. Denita Albair Says:

    Nice commentary. last thirty times I uncovered this online internet internet site and desired to permit you be conscious that i’ve been gratified, heading by way of your site’s posts. I should undoubtedly be signing just as as a whole lot since the RSS feed and may wait around for yet another post. Cheers, Glen

  5. Fatur Says:

    Just upgraded to 2.5 and there still seems to be no optoin for a proxy. But your solution (which I couldn’t find anywhere on wordpress.org) worked perfectly.Thanks.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



eXTReMe Tracker

Jasa Web design, Pembuatan Website Streaming Radio