Script PHP untuk Koneksi, Tambah & Tampil

Berikut ini merupakan contoh script PHP untuk melakukan koneksi dari PHP ke MySQL, untuk menambah data dan menampilkan data dari database. Script ini merupakan contoh yang disampaikan pada perkuliahan Pemrograman Web 2 (PW2) di Univ. Budi Luhur Kampus Roxy.

Adapun script terdiri dari :

  1. koneksi.php, contoh script PHP untuk melakukan koneksi ke server MySQL serta memilih (membuka) salah satu database. Ubahlah script sesuai dengan kondisi komputer Anda.
  2. register.php, contoh script PHP untuk menambahkan data / record ke MySQL melalui sebuah form. Pada contoh tersebut akan ditambahkan data user.
  3. user.php, contoh script PHP untuk menampilkan data / record dari database MySQL. Script ditampilkan dalam bentuk tabel.

Download script dan databasenya di sini.

Semoga bermanfaat!

30 thoughts on “Script PHP untuk Koneksi, Tambah & Tampil

  1. cara ngatasinnya
    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\site\rog\user.php on line 20

  2. Pingback: Pingback
  3. Pingback: php « tekjok
  4. Do you have a spam problem on this site; I also am a blogger, and I
    was wanting to know your situation; we have created some nice methods annd wee are looking to swap methods with others, why
    not shoot me ann e-mail if interested.

  5. I am not sur where you’re getting your information, but good topic.
    I needs to spend some time learning much more or understanding more.
    Thankks for magnificent information I wass looking forr this information for my mission.

  6. Thanks ffor yoir personal mqrvelous posting! I truly
    enjoyed reading it, you migt be a great author.

    I will be sure to bookmark your blog and wilpl come back down the road.

    I want too encourage you too ultimately continue
    your great work, have a nice morning!

  7. Unquestionably believe that which you said. Your favorite
    justification appeared to be on the internet the simplest thing to be aware of.
    I say to you, I certainly get annoyed while people consider
    worries that they plainly do not know about.
    You managed to hit the nail upon the top as well as defined out the whole thing without having side effect , people
    can take a signal. Will likely be back to get more.

  8. Its like you read my mind! You seem to know so much about this, like you wrote the book in it or something.
    I think that you can do with some pics to drive the message home a little bit, but other than that,
    this is wonderful blog. An excellent read. I will certainly be back.

  9. You could definitely see your skills within the work you write.

    The arena hopes for more passionate writers like you who are not afraid to
    mention how they believe. Always follow your heart.

  10. That is very attention-grabbing, You are an excessively professional blogger.
    I have joined your feed and look ahead to seeking extra of
    your wonderful post. Also, I have shared your site in my social networks

Leave a Reply

Your email address will not be published. Required fields are marked *