21
Dec
09

ajax jquery : php multiple delete item with check box

this tutorial will show you how to delete more than one data with ajax methode using jquery..

first create file, just named it index.php  in this file we create a list of category with check box and a link to delete the category.

you can download the sample  here

Continue reading ‘ajax jquery : php multiple delete item with check box’

11
Dec
09

Add New Row on Table with jquery

with jquery we can simply  add new row in top or in bottom using append and prepend method.

html

<a href="#">Add row In the bottom</a> | <a href="#">Add row In the Top</a>
<table border="1">
<tbody>
<tr>
<td>Text 1</td><td>text 2</td>
</tr>
</tbody>
</table>
 Continue reading 'Add New Row on Table with jquery'
21
Nov
09

Ajax Create, update and delete data with jquery and php

now we will make a simple add, edit ,delete data with jquery, php and mysql

first we create a table called ‘tbl_barang’

CREATE TABLE `tbl_barang` (
 `kode_barang` varchar(10) collate latin1_general_ci NOT NULL,
 `nama_barang` varchar(100) collate latin1_general_ci NOT NULL,
 `harga` double(16,2) NOT NULL,
 PRIMARY KEY  (`kode_barang`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

after that we create a file called ‘koneksi.php’ and put ths code into the file

<?
 mysql_connect("localhost","root","") or die("maaf, tidak berhasil konek ke database");
 mysql_select_db("myblog") or die("database tidak ada");
?>

then let’s create a file to view a list of inserted data give the file name “listbarang.php” and put this code into the file.

<?
 include("koneksi.php");
 $str="select * from tbl_barang";
 $res=mysql_query($str) or die("query gagal dijalankan");
 ?>
<table width="100%" border="1" cellpadding="5" cellspacing="0">
<thead>
<tr bgcolor="#CCCCCC">
<th>Kode barang</th><th>Nama barang</th><th>Harga</th><th width="50">Edit</th><th width="50">delete</th>
</tr>
</thead>
<tbody>
<? while($data=mysql_fetch_assoc($res)){?>
<tr>
<td><? echo $data['kode_barang'];?></td><td><? echo $data['nama_barang'];?></td><td><? echo $data['harga'];?></td><td><a href="formbarang.php?action=update&kodebarang=<? echo $data['kode_barang'];?>">edit</a></td><td><a href="proses.php?action=delete&kodebarang=<? echo $data['kode_barang'];?>">delete</a></td>
</tr>
<? }?>
</tbody>
</table>

Continue reading ‘Ajax Create, update and delete data with jquery and php’

06
Nov
09

php and google map

this is a simple tutorial how we get address from database and then view the address location using google map.

first create a company company

CREATE  TABLE  `address` (
`id` INT NOT  NULL  AUTO_INCREMENT  PRIMARY  KEY ,
 `company_name` VARCHAR( 100  )  NOT  NULL ,
 `address` VARCHAR( 255  )  NOT  NULL ,
 `city` VARCHAR( 100  )  NOT  NULL
) ENGINE  =  MYISAM ;

let’s insert some data;

 Continue reading 'php and google map'
02
Nov
09

Jquery Built In functions : animations

today i will introduce you with jquery animations built in functions.

Slide Up ( slideUp() )

slide up function will make a selector sliding up. you can add parameter to this function and  callback function

$(".slide").slideUp("slow")
$(".slide").slideUp("fast")
$(".slide").slideUp(3000)  // 3000 ms
$(".slide").slideUp(3000,function(){ callback();}) // using callback function

Continue reading ‘Jquery Built In functions : animations’

27
Oct
09

What you need to learn php..

if you are some one that want to learn website programing php is one of the best choice. because its easy and ofcourse it is open source which it’s mean free for you to use 😀 ..

first thing of all you need to have is willing to learn and keep your spirit, DON’T GIVE UP..

after that you need a set of computer. if you don’t have then  borrow it 😀

maybe you will also need a softdrink or some snack :D.

ok if you ready now let’s get started.

Continue reading ‘What you need to learn php..’

26
Oct
09

common method used in website using jquery

These are  common methods that usually used in my websites using jquery

Get value of an id or class

$("#someid").val(); // to get value of an id
$(".someclass").val; // to get value of a class

Set value of an id or class

$("#someid").val("test"); // gving value test for an id
$(".someclass").val("class value"); // giving value for  class

Load page inside a div

$("#somediv").load("page.html"); // load page.html into a div with id somediv

Insert HTML text into div

$("#somediv").html("<strong>this text will appear bold</strong>");

Using Animation

$(".someclass").fadeOut(3000); // someclass will fade out in 3 seconds
$(".someclass").fadeIn(3000); // someclass will fade in in 3 seconds
$(".someclass").slideDown(3000);
$(".someclass").slideUp(3000);

Get value of tags attibute

$("a.someclass").attr("href"); // get value of href attribute
22
Oct
09

jquery for beginner (2)

setelah sebelumnya kita belajar menampilkan alert jika sebuah link di klik. sekarang kita akan mencoba membuat aplikasi yang lebih kompleks.

Menampilkan halaman web tanpa meload seluruh halaman (ajax method).

pertama kita buat file dengan nama index.php dengan kode html sebagai berikut Continue reading ‘jquery for beginner (2)’

22
Oct
09

jquery for beginner (1)

jquery merupakan library javascript yang memudahkan kita dalam membuat aplikasi ajax.

library jquery  terbaru dapat anda download do http://www.jquery.com/

berikut adalah contoh2 kode javascript menggunakan jquery.

Continue reading ‘jquery for beginner (1)’

22
Oct
09

Who’s Blog Is This?

Nama saya Robi Ilham lahir di Jakarta pada 9 Agustus 1983.  saat menuslis tulisan ini saya bekerja sebagai programmer PHP pada perusahaan PT. TRISTIT INDONESIA.

saya menulis Blog ini untuk membagi pengalaman saya selama menjadi programmer PHP. jadi bagi rekan-rekan yang ingin belajar atau baru ingin belajar menjadi programmer PHP. silahkan memberi komentar ataupun usulan tentang topik yang ingin di bahas di dalam blog ini.

jadi MARI KITA BELAJAR BERSAMA..




Calendar

May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Blog Stats

  • 38,558 hits

Category