<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Learn and Share PHP Code</title>
	<atom:link href="http://sharemyphp.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://sharemyphp.wordpress.com</link>
	<description>learn together php,ajax,jquery and open source..</description>
	<lastBuildDate>Thu, 13 Oct 2011 10:49:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='sharemyphp.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Learn and Share PHP Code</title>
		<link>http://sharemyphp.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://sharemyphp.wordpress.com/osd.xml" title="Learn and Share PHP Code" />
	<atom:link rel='hub' href='http://sharemyphp.wordpress.com/?pushpress=hub'/>
		<item>
		<title>ajax jquery : php multiple delete item with check box</title>
		<link>http://sharemyphp.wordpress.com/2009/12/21/ajax-jquery-php-multiple-delete-item-with-check-box/</link>
		<comments>http://sharemyphp.wordpress.com/2009/12/21/ajax-jquery-php-multiple-delete-item-with-check-box/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 11:14:08 +0000</pubDate>
		<dc:creator>robi ilham</dc:creator>
				<category><![CDATA[Jquery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[checkbox]]></category>
		<category><![CDATA[multiple delete]]></category>

		<guid isPermaLink="false">http://sharemyphp.wordpress.com/?p=60</guid>
		<description><![CDATA[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 index.php &#60;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sharemyphp.wordpress.com&amp;blog=7999327&amp;post=60&amp;subd=sharemyphp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>this tutorial will show you how to delete more than one data with ajax methode using jquery..</p>
<p>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.</p>
<p><a href="http://www.ziddu.com/download/7832498/multipledelete.zip.html" target="_blank">you can download the sample  here</a></p>
<p><span id="more-60"></span></p>
<p><strong>index.php</strong></p>
<pre>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;Multipele Delete&lt;/title&gt;
&lt;script type="text/javascript" src="scripts/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
$(function(){
 $("a.delete").click(function(){
 page=$(this).attr("href");
 ids=new Array()
 a=0;
 $("input.chk:checked").each(function(){
 ids[a]=$(this).val();
 a++;
 })
 if(confirm("Are you sure want to delete?")){
 $.ajax({
 url:page,
 data:"id="+ids,
 type:"GET",
 success:function(res)
 {
 if(res==1)
 {
 $("input.chk:checked").each(function(){
 $(this).parent().parent().remove();
 })
 }
 }
 })
 }
 return false;
 })
})
&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;table&gt;
&lt;caption&gt;&lt;a href="delete.php"&gt;delete&lt;/a&gt;&lt;/caption&gt;
&lt;tr&gt;
&lt;td&gt;&lt;input type="checkbox" value="1" name="chk[]" /&gt;&lt;/td&gt;&lt;td&gt;category a&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;input type="checkbox" value="2" name="chk[]" /&gt;&lt;/td&gt;&lt;td&gt;category b&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;input type="checkbox" value="3" name="chk[]" /&gt;&lt;/td&gt;&lt;td&gt;category c&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;input type="checkbox" value="4" name="chk[]" /&gt;&lt;/td&gt;&lt;td&gt;category d&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;input type="checkbox" value="5" name="chk[]" /&gt;&lt;/td&gt;&lt;td&gt;category e&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>the above code contain jquery code to populate the checked value of check box.</p>
<pre>ids=new Array()
 a=0;
 $("input.chk:checked").each(function(){
 ids[a]=$(this).val();
 a++;
 })
</pre>
<p>after that we sent that value via ajax to php file that run a delete query;</p>
<p><strong>delete.php</strong></p>
<pre><strong>// in this file we will run  aquery code. to delete the category by getting the unique id.
//$id=$_GET['id'].
echo 1;
</strong></pre>
<p><a href="http://www.ziddu.com/download/7832498/multipledelete.zip.html" target="_blank">you can download the sample  here</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sharemyphp.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sharemyphp.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sharemyphp.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sharemyphp.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sharemyphp.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sharemyphp.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sharemyphp.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sharemyphp.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sharemyphp.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sharemyphp.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sharemyphp.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sharemyphp.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sharemyphp.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sharemyphp.wordpress.com/60/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sharemyphp.wordpress.com&amp;blog=7999327&amp;post=60&amp;subd=sharemyphp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sharemyphp.wordpress.com/2009/12/21/ajax-jquery-php-multiple-delete-item-with-check-box/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ca6a1bc9376fc06a0e091e12d49b8aa7?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">robi83</media:title>
		</media:content>
	</item>
		<item>
		<title>Add New Row on Table with jquery</title>
		<link>http://sharemyphp.wordpress.com/2009/12/11/add-new-row-on-table-with-jquery/</link>
		<comments>http://sharemyphp.wordpress.com/2009/12/11/add-new-row-on-table-with-jquery/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 09:47:05 +0000</pubDate>
		<dc:creator>robi ilham</dc:creator>
				<category><![CDATA[Jquery]]></category>
		<category><![CDATA[add row]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[append]]></category>
		<category><![CDATA[prepend]]></category>

		<guid isPermaLink="false">http://sharemyphp.wordpress.com/?p=56</guid>
		<description><![CDATA[with jquery we can simply  add new row in top or in bottom using append and prepend method. html &#60;a href="#"&#62;Add row In the bottom&#60;/a&#62; &#124; &#60;a href="#"&#62;Add row In the Top&#60;/a&#62; &#60;table border="1"&#62; &#60;tbody&#62; &#60;tr&#62; &#60;td&#62;Text 1&#60;/td&#62;&#60;td&#62;text 2&#60;/td&#62; &#60;/tr&#62; &#60;/tbody&#62; &#60;/table&#62; then add this jquery function to html code &#60;script type="text/javascript"&#62; $(document).ready(function(){ $("a.addrowb").click(function(){ $("table [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sharemyphp.wordpress.com&amp;blog=7999327&amp;post=56&amp;subd=sharemyphp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>with jquery we can simply  add new row in top or in bottom using append and prepend method.</p>
<p><strong>html</strong></p>
<pre>&lt;a href="#"&gt;Add row In the bottom&lt;/a&gt; | &lt;a href="#"&gt;Add row In the Top&lt;/a&gt;
&lt;table border="1"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Text 1&lt;/td&gt;&lt;td&gt;text 2&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
<span id="more-56"></span>
</pre>
<p>then add this jquery function to html code</p>
<pre>&lt;script type="text/javascript"&gt;
$(document).ready(function(){
 $("a.addrowb").click(function(){
 $("table tbody").append("&lt;tr&gt;&lt;td&gt;new row on bottom&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;");
 return false;
 })
 $("a.addrowt").click(function(){
 $("table tbody").prepend("&lt;tr&gt;&lt;td&gt;new row on top&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;");
 return false;
 })
})
&lt;/script&gt;
</pre>
<p>try it out, and you will see the row will append when you click the link.</p>
<p><strong>full code</strong></p>
<pre>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;script type="text/javascript" src="scripts/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
$(document).ready(function(){
 $("a.addrowb").click(function(){
 $("table tbody").append("&lt;tr&gt;&lt;td&gt;new row on bottom&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;");
 return false;
 })
 $("a.addrowt").click(function(){
 $("table tbody").prepend("&lt;tr&gt;&lt;td&gt;new row on top&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;");
 return false;
 })
})
&lt;/script&gt;
&lt;title&gt;Untitled Document&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;a href="#"&gt;Add row In the bottom&lt;/a&gt; | &lt;a href="#"&gt;Add row In the Top&lt;/a&gt;
&lt;table border="1"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Text 1&lt;/td&gt;&lt;td&gt;text 2&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>Download the sample <a href="http://www.ziddu.com/download/7693673/append_prepend.zip.html" target="_blank">here</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sharemyphp.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sharemyphp.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sharemyphp.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sharemyphp.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sharemyphp.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sharemyphp.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sharemyphp.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sharemyphp.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sharemyphp.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sharemyphp.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sharemyphp.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sharemyphp.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sharemyphp.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sharemyphp.wordpress.com/56/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sharemyphp.wordpress.com&amp;blog=7999327&amp;post=56&amp;subd=sharemyphp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sharemyphp.wordpress.com/2009/12/11/add-new-row-on-table-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ca6a1bc9376fc06a0e091e12d49b8aa7?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">robi83</media:title>
		</media:content>
	</item>
		<item>
		<title>Ajax Create, update  and delete data with jquery and php</title>
		<link>http://sharemyphp.wordpress.com/2009/11/21/create-update-and-delete-data-with-jquery-and-php/</link>
		<comments>http://sharemyphp.wordpress.com/2009/11/21/create-update-and-delete-data-with-jquery-and-php/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 18:55:04 +0000</pubDate>
		<dc:creator>robi ilham</dc:creator>
				<category><![CDATA[Jquery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[add]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[crud]]></category>
		<category><![CDATA[delete]]></category>
		<category><![CDATA[edit]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://sharemyphp.wordpress.com/?p=49</guid>
		<description><![CDATA[now we will make a simple add, edit ,delete data with jquery, php and mysql first we create a table called &#8216;tbl_barang&#8217; 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 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sharemyphp.wordpress.com&amp;blog=7999327&amp;post=49&amp;subd=sharemyphp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>now we will make a simple add, edit ,delete data with jquery, php and mysql</p>
<p>first we create a table called &#8216;tbl_barang&#8217;</p>
<pre>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;</pre>
<p>after that we create a file called &#8216;koneksi.php&#8217; and put ths code into the file</p>
<pre>&lt;?
 mysql_connect("localhost","root","") or die("maaf, tidak berhasil konek ke database");
 mysql_select_db("myblog") or die("database tidak ada");
?&gt;</pre>
<p>then let&#8217;s create a file to view a list of inserted data give the file name &#8220;listbarang.php&#8221; and put this code into the file.</p>
<pre>&lt;?
 include("koneksi.php");
 $str="select * from tbl_barang";
 $res=mysql_query($str) or die("query gagal dijalankan");
 ?&gt;
&lt;table width="100%" border="1" cellpadding="5" cellspacing="0"&gt;
&lt;thead&gt;
&lt;tr bgcolor="#CCCCCC"&gt;
&lt;th&gt;Kode barang&lt;/th&gt;&lt;th&gt;Nama barang&lt;/th&gt;&lt;th&gt;Harga&lt;/th&gt;&lt;th width="50"&gt;Edit&lt;/th&gt;&lt;th width="50"&gt;delete&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;? while($data=mysql_fetch_assoc($res)){?&gt;
&lt;tr&gt;
&lt;td&gt;&lt;? echo $data['kode_barang'];?&gt;&lt;/td&gt;&lt;td&gt;&lt;? echo $data['nama_barang'];?&gt;&lt;/td&gt;&lt;td&gt;&lt;? echo $data['harga'];?&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="formbarang.php?action=update&amp;kodebarang=&lt;? echo $data['kode_barang'];?&gt;"&gt;edit&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="proses.php?action=delete&amp;kodebarang=&lt;? echo $data['kode_barang'];?&gt;"&gt;delete&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;? }?&gt;
&lt;/tbody&gt;
&lt;/table&gt;</pre>
<p><span id="more-49"></span>now let&#8217;s add some jquery code for edit and delete into the file. the code will do ajax for delete and edit. add this code into listbarang.php.</p>
<pre>&lt;script type="text/javascript"&gt;
$(function(){
 $("a.edit").click(function(){
 page=$(this).attr("href");
 $("#Formcontent").html("loading...").load(page);
 return false;
 })
 $("a.delete").click(function(){
 el=$(this);
 if(confirm("yakin ingin di hapus?"))
 {
 $.ajax({
 url:$(this).attr("href"),
 type:"GET",
 success:function(hasil)
 {
 if(hasil==1)
 {
 el.parent().parent().fadeOut('slow');
 }
 else
 {
 alert(hasil);
 }
 }
 })
 }
 return false;
 })
})
&lt;/script&gt;</pre>
<p>now create new file and named formbarang.php. this file is used to add new item.</p>
<pre>&lt;?
 $action="new";
 $status="Simpan";
 if(isset($_GET['action']) and $_GET['action']=="update" and !empty($_GET['kodebarang']))
 {
 include("koneksi.php");
 $str="select * from tbl_barang where kode_barang=".intval($_GET['kodebarang']);
 $res=mysql_query($str) or die("query gagal dijalankan");
 $data=mysql_fetch_assoc($res);
 $kode=$data['kode_barang'];
 $nama=$data['nama_barang'];
 $harga=$data['harga'];
 $action="update";
 $simpan=$action;
 $readonly="readonly=readonly";
 }
?&gt;
&lt;form method="post" name="formBarang" action="proses.php" id="formBarang"&gt;
&lt;table width="400"&gt;
&lt;tr&gt;
&lt;td&gt;Kode Barang&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="kodebarang" size="10" &lt;? echo $readonly;?&gt; value="&lt;? echo $kode;?&gt;" /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nama Barang&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="namabarang" size="50" value="&lt;? echo $nama;?&gt;" /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Harga&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="harga" size="10" value="&lt;? echo $harga;?&gt;" /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan="2"&gt;&lt;input type="submit" value="&lt;? echo $status;?&gt;"&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;input type="hidden" name="action" value="&lt;? echo $action;?&gt;" /&gt;

&lt;/form&gt;</pre>
<p>to make it work as ajax.  add this jquery code in the file.</p>
<pre>&lt;script type="text/javascript"&gt;
$(function(){
 $("#formBarang").submit(function(){
 $.ajax({
 url:$(this).attr("action"),
 type:$(this).attr("method"),
 data:$(this).serialize(),
 success:function(data){
 if(data==1)
 {
 $("#content").load("listbarang.php");
 }
 else
 {
 alert(data);
 }
 }
 });
 return false;
 });
})
&lt;/script&gt;</pre>
<p>now create a new file to handle the add, edit and delete named proses.php and write this code into the file</p>
<pre>&lt;?
 include("koneksi.php");
 $action=$_POST['action'];
 $kode=$_POST['kodebarang'];
 $nama=$_POST['namabarang'];
 $harga=$_POST['harga'];

 if($action=="new")
 {
 $check=mysql_query("select * from tbl_barang where kode_barang='$kode'");
 if(mysql_num_rows($check)==0)
 {

 mysql_query("insert into tbl_barang(kode_barang,nama_barang,harga) values('$kode','$nama','$harga')") or die("data gagal di insert");
 echo 1;
 }
 else
 {
 echo "kode barang sudah ada";
 }
 exit;
 }
 elseif($action=="update")
 {
 mysql_query("update tbl_barang set nama_barang='$nama',harga='$harga' where kode_barang='$kode'") or die ("data gagal di update");
 echo 1 ;
 exit;
 }
 elseif($_GET['action']=="delete")
 {
 $kode=intval($_GET['kodebarang']);
 mysql_query("delete from tbl_barang where kode_barang='$kode'")or die("data tidak berhasil di hapus");
 echo 1;
 exit;
 }

?&gt;</pre>
<p>finaly create an index.php file to wrap all the code.</p>
<pre>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;Sample Add Edit Delete ajax With Jquery&lt;/title&gt;
&lt;script type="text/javascript" src="scripts/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
$(function(){
 $("a.add").click(function(){
 page=$(this).attr("href")
 $("#Formcontent").html("loading...").load(page);
 return false
 })
})
&lt;/script&gt;
&lt;style type="text/css"&gt;
body,html
{
 font-family:Arial, Helvetica, sans-serif;
 font-size:10px;
}
&lt;/style&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;div id="Formcontent"&gt;&lt;/div&gt;
&lt;a href="formbarang.php?action=add"&gt;masukkan barang baru&lt;/a&gt;
&lt;br /&gt;&lt;br /&gt;

&lt;div id="content"&gt;&lt;? include("listbarang.php");?&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>you can download <a href="http://www.ziddu.com/download/16801356/crud.rar.html" target="_blank">the file  here</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sharemyphp.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sharemyphp.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sharemyphp.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sharemyphp.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sharemyphp.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sharemyphp.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sharemyphp.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sharemyphp.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sharemyphp.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sharemyphp.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sharemyphp.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sharemyphp.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sharemyphp.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sharemyphp.wordpress.com/49/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sharemyphp.wordpress.com&amp;blog=7999327&amp;post=49&amp;subd=sharemyphp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sharemyphp.wordpress.com/2009/11/21/create-update-and-delete-data-with-jquery-and-php/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ca6a1bc9376fc06a0e091e12d49b8aa7?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">robi83</media:title>
		</media:content>
	</item>
		<item>
		<title>php and google map</title>
		<link>http://sharemyphp.wordpress.com/2009/11/06/php-and-google-map/</link>
		<comments>http://sharemyphp.wordpress.com/2009/11/06/php-and-google-map/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 06:06:45 +0000</pubDate>
		<dc:creator>robi ilham</dc:creator>
				<category><![CDATA[google map]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[map]]></category>

		<guid isPermaLink="false">http://sharemyphp.wordpress.com/?p=44</guid>
		<description><![CDATA[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 ) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sharemyphp.wordpress.com&amp;blog=7999327&amp;post=44&amp;subd=sharemyphp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>this is a simple tutorial how we get address from database and then view the address location using google map.</p>
<p>first create a company company</p>
<pre>CREATE  TABLE  `address` (</pre>
<div>
<pre>`id` INT NOT  NULL  AUTO_INCREMENT  PRIMARY  KEY ,
 `company_name` VARCHAR( 100  )  NOT  NULL ,
 `address` VARCHAR( 255  )  NOT  NULL ,
 `city` VARCHAR( 100  )  NOT  NULL</pre>
</div>
<pre>) ENGINE  =  MYISAM ;</pre>
<p>let&#8217;s insert some data;</p>
<pre><span id="more-44"></span>INSERT  INTO  `address` (  `id` ,  `nama_perusahaan` ,  `alamat` ,  `kota`  )
VALUES (</pre>
<div>
<pre>NULL ,  'akatsuki corp',  'sudirman',  'jakarta'</pre>
</div>
<pre>), (</pre>
<div>
<pre>NULL ,  'konoha corp',  'kuningan',  'jakarta'</pre>
</div>
<pre>);</pre>
<p>and this is the code for view the company location on the map.</p>
<p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;<br />
&lt;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221;&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=utf-8&#8243; /&gt;</p>
<pre>&lt;?
 mysql_connect("localhost","root","");
 mysql_select_db("myblog");
 $q="select * from address";
 $res=mysql_query($q);
 $data=array();
 while($datarow=mysql_fetch_assoc($res))
 {
 $data[]=$datarow['company_name']."|".$datarow['address']."|".$datarow['city'];
 }
 $numdata=count($data);
?&gt;
 &lt;script src="http://maps.google.com/maps?file=api&amp;amp;v=2&amp;amp;key=yourkey&amp;sensor=false"
 type="text/javascript"&gt;&lt;/script&gt;
 &lt;script type="text/javascript"&gt;

 function initialize() {
 if (GBrowserIsCompatible()) {
 var map = new GMap2(document.getElementById("map_canvas"));
 var geocoder = new GClientGeocoder();

 map.addControl(new GSmallMapControl());
 map.addControl(new GMapTypeControl());
 map.setCenter(new GLatLng(37.4419, -122.1419), 13);</pre>
<pre> &lt;?
 for ($i=0;$i&lt;$numdata;$i++)
 {
 //get each company data
 $companydata=explode("|",$data[$i]);
 $name=$companydata[0];
 $address=$companydata[1];
 $city=$companydata[2];</pre>
<pre> ?&gt;
 var address="&lt;? echo $address;?&gt;"+"+"+"&lt;? echo $city;?&gt;";
 geocoder.getLatLng(address,
 function(point) {
 if (!point) {
 alert(address + " not found");
 } else {
 map.setCenter(point, 12);
 var marker = new GMarker(point);
 map.addOverlay(marker);
 //marker.openInfoWindowHtml(address);
 }
 }
 );

 &lt;? } ?&gt;
 //}
 //});
 }
 }

 &lt;/script&gt;

&lt;title&gt;Untitled Document&lt;/title&gt;
&lt;/head&gt;

&lt;body onload="initialize()"&gt;
&lt;div id="map_canvas" style="width:500px; height:300px;"&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><a href="http://www.ziddu.com/download/7448650/map.zip.html" target="_blank">download map.zip file</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sharemyphp.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sharemyphp.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sharemyphp.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sharemyphp.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sharemyphp.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sharemyphp.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sharemyphp.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sharemyphp.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sharemyphp.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sharemyphp.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sharemyphp.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sharemyphp.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sharemyphp.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sharemyphp.wordpress.com/44/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sharemyphp.wordpress.com&amp;blog=7999327&amp;post=44&amp;subd=sharemyphp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sharemyphp.wordpress.com/2009/11/06/php-and-google-map/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ca6a1bc9376fc06a0e091e12d49b8aa7?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">robi83</media:title>
		</media:content>
	</item>
		<item>
		<title>Jquery Built In functions : animations</title>
		<link>http://sharemyphp.wordpress.com/2009/11/02/jquery-built-in-functions-animations/</link>
		<comments>http://sharemyphp.wordpress.com/2009/11/02/jquery-built-in-functions-animations/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 08:03:54 +0000</pubDate>
		<dc:creator>robi ilham</dc:creator>
				<category><![CDATA[Jquery]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[fade]]></category>
		<category><![CDATA[fade in]]></category>
		<category><![CDATA[fade out]]></category>
		<category><![CDATA[slide]]></category>
		<category><![CDATA[toogle]]></category>

		<guid isPermaLink="false">http://sharemyphp.wordpress.com/?p=37</guid>
		<description><![CDATA[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 Slide Down( slideDown()) Reverse function of Slide UP [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sharemyphp.wordpress.com&amp;blog=7999327&amp;post=37&amp;subd=sharemyphp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>today i will introduce you with jquery animations built in functions.</p>
<p><strong>Slide Up ( slideUp() )</strong></p>
<p>slide up function will make a selector sliding up. you can add parameter to this function and  callback function</p>
<pre>$(".slide").slideUp("slow")
$(".slide").slideUp("fast")
$(".slide").slideUp(3000)  // 3000 ms
$(".slide").slideUp(3000,function(){ callback();}) // using callback function
</pre>
<p><strong><strong><span id="more-37"></span>Slide Down( slideDown()) </strong></strong></p>
<p>Reverse function of Slide UP</p>
<pre>$(".slide").slideDown("slow")
$(".slide").slideDown("fast")
$(".slide").slideDown(3000)  // 3000 ms
$(".slide").slideDown(3000,function(){ callback();}) // using callback function
</pre>
<p><strong>Toogle Slide</strong></p>
<p>toogle betwen slide up and slide down</p>
<pre>$(".slide").slideToggle(3000)
</pre>
<p><strong>Fade out</strong></p>
<p>make a seletor fading out. take same parameter as slide</p>
<pre>$(".fade").fadeOut(3000);
</pre>
<p><strong>Fade In</strong></p>
<p>make a seletor fading In. take same parameter as slide</p>
<pre>$(".fade").fadeIn(3000);
</pre>
<p>Download file <a title="sample file" href="http://www.ziddu.com/download/7448470/anim.zip.html" target="_blank">here </a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sharemyphp.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sharemyphp.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sharemyphp.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sharemyphp.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sharemyphp.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sharemyphp.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sharemyphp.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sharemyphp.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sharemyphp.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sharemyphp.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sharemyphp.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sharemyphp.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sharemyphp.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sharemyphp.wordpress.com/37/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sharemyphp.wordpress.com&amp;blog=7999327&amp;post=37&amp;subd=sharemyphp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sharemyphp.wordpress.com/2009/11/02/jquery-built-in-functions-animations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ca6a1bc9376fc06a0e091e12d49b8aa7?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">robi83</media:title>
		</media:content>
	</item>
		<item>
		<title>What you need to learn php..</title>
		<link>http://sharemyphp.wordpress.com/2009/10/27/what-you-need-to-learn-php/</link>
		<comments>http://sharemyphp.wordpress.com/2009/10/27/what-you-need-to-learn-php/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 06:38:21 +0000</pubDate>
		<dc:creator>robi ilham</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[beginner]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[xampp]]></category>

		<guid isPermaLink="false">http://sharemyphp.wordpress.com/?p=29</guid>
		<description><![CDATA[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&#8217;s mean free for you to use .. first thing of all you need to have is willing to learn and keep your spirit, DON&#8217;T GIVE UP.. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sharemyphp.wordpress.com&amp;blog=7999327&amp;post=29&amp;subd=sharemyphp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>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&#8217;s mean free for you to use <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  ..</p>
<p>first thing of all you need to have is willing to learn and keep your spirit, DON&#8217;T GIVE UP..</p>
<p>after that you need a set of computer. if you don&#8217;t have then  borrow it <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>maybe you will also need a softdrink or some snack <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> .</p>
<p>ok if you ready now let&#8217;s get started.</p>
<p><span id="more-29"></span></p>
<p><strong>creating a local server</strong></p>
<p>To run php code we need php apache server  and mysql for database. you can install apache and mysql one by one, or you can install WAMP,XAMPP which already included php and mysql.</p>
<p>for download and how to install xampp on you can read on<a href="http://www.apachefriends.org/en/xampp.html" target="_self"> http://www.apachefriends.org/en/xampp.html</a></p>
<p>if you done with the installations then test your local server by typing http://localhost in your web browser.</p>
<p>if you server is running you will see welcome page from xampp</p>
<p><img class="aligncenter size-full wp-image-31" title="xamp" src="http://sharemyphp.files.wordpress.com/2009/10/xamp.png?w=400&#038;h=300" alt="xamp" width="400" height="300" /></p>
<p>now let&#8217;s try to create our first php code.</p>
<p>create new folder in your server folder ( xamp/htdocs/) and give it name sample.</p>
<p>now open your text editor, you can use notepad or notepad++ or other php editor. create a with your text editor and type the code below.</p>
<pre>&lt;?
 echo "hello world";
?&gt;
</pre>
<p>save your file as hello.php in sample folder. and run it with your browser type http://localhost/sampple.hello.php.</p>
<p><img class="aligncenter size-full wp-image-32" title="hello" src="http://sharemyphp.files.wordpress.com/2009/10/hello.png?w=299&#038;h=116" alt="hello" width="299" height="116" /></p>
<p>that&#8217;s it you create your first php code.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sharemyphp.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sharemyphp.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sharemyphp.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sharemyphp.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sharemyphp.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sharemyphp.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sharemyphp.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sharemyphp.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sharemyphp.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sharemyphp.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sharemyphp.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sharemyphp.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sharemyphp.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sharemyphp.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sharemyphp.wordpress.com&amp;blog=7999327&amp;post=29&amp;subd=sharemyphp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sharemyphp.wordpress.com/2009/10/27/what-you-need-to-learn-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ca6a1bc9376fc06a0e091e12d49b8aa7?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">robi83</media:title>
		</media:content>

		<media:content url="http://sharemyphp.files.wordpress.com/2009/10/xamp.png" medium="image">
			<media:title type="html">xamp</media:title>
		</media:content>

		<media:content url="http://sharemyphp.files.wordpress.com/2009/10/hello.png" medium="image">
			<media:title type="html">hello</media:title>
		</media:content>
	</item>
		<item>
		<title>common method used in website using jquery</title>
		<link>http://sharemyphp.wordpress.com/2009/10/26/common-method-used-in-website-using-jquery/</link>
		<comments>http://sharemyphp.wordpress.com/2009/10/26/common-method-used-in-website-using-jquery/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 04:56:25 +0000</pubDate>
		<dc:creator>robi ilham</dc:creator>
				<category><![CDATA[Jquery]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[get value]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[set value]]></category>

		<guid isPermaLink="false">http://sharemyphp.wordpress.com/?p=25</guid>
		<description><![CDATA[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 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sharemyphp.wordpress.com&amp;blog=7999327&amp;post=25&amp;subd=sharemyphp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>These are  common methods that usually used in my websites using jquer<strong>y</strong></p>
<p><strong>Get value of an id or class</strong></p>
<pre>$("#someid").val(); // to get value of an id
$(".someclass").val; // to get value of a class<strong>
</strong></pre>
<p><strong>Set value of an id or class</strong></p>
<pre>$("#someid").val("test"); // gving value test for an id
$(".someclass").val("class value"); // giving value for  class
</pre>
<p><strong>Load page inside a div</strong></p>
<pre>$("#somediv").load("page.html"); // load page.html into a div with id somediv
</pre>
<p><strong>Insert HTML text into div</strong></p>
<pre>$("#somediv").html("&lt;strong&gt;this text will appear bold&lt;/strong&gt;");
</pre>
<p><strong>Using Animation</strong></p>
<pre><strong>$(".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);
</strong></pre>
<p><strong>Get value of tags attibute</strong></p>
<pre>$("a.someclass").attr("href"); // get value of href attribute</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sharemyphp.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sharemyphp.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sharemyphp.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sharemyphp.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sharemyphp.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sharemyphp.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sharemyphp.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sharemyphp.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sharemyphp.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sharemyphp.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sharemyphp.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sharemyphp.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sharemyphp.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sharemyphp.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sharemyphp.wordpress.com&amp;blog=7999327&amp;post=25&amp;subd=sharemyphp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sharemyphp.wordpress.com/2009/10/26/common-method-used-in-website-using-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ca6a1bc9376fc06a0e091e12d49b8aa7?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">robi83</media:title>
		</media:content>
	</item>
		<item>
		<title>jquery for beginner (2)</title>
		<link>http://sharemyphp.wordpress.com/2009/10/22/jquery-for-beginner-2/</link>
		<comments>http://sharemyphp.wordpress.com/2009/10/22/jquery-for-beginner-2/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 08:49:19 +0000</pubDate>
		<dc:creator>robi ilham</dc:creator>
				<category><![CDATA[Jquery]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[load]]></category>

		<guid isPermaLink="false">http://sharemyphp.wordpress.com/?p=20</guid>
		<description><![CDATA[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 &#60;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&#62; &#60;html xmlns="http://www.w3.org/1999/xhtml"&#62; &#60;head&#62; &#60;meta http-equiv="Content-Type" content="text/html; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sharemyphp.wordpress.com&amp;blog=7999327&amp;post=20&amp;subd=sharemyphp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>setelah sebelumnya kita belajar menampilkan alert jika sebuah link di klik. sekarang kita akan mencoba membuat aplikasi yang lebih kompleks.</p>
<p><strong>Menampilkan halaman web tanpa meload seluruh halaman (ajax method).</strong></p>
<p>pertama kita buat file dengan nama index.php dengan kode html sebagai berikut<span id="more-20"></span></p>
<pre>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;jquery sample&lt;/title&gt;
&lt;script type="text/javascript" src="../scripits/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" &gt;
$(document).ready(function(){
 $("a.loadpage").click(function(){
 page=$(this).attr("href");
 $("#pageContent").load(page);
 return false;
 })
})
&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;a href="1.html"&gt;page 1&lt;/a&gt; | &lt;a href="2.html"&gt;page 2&lt;/a&gt;
&lt;p id="pageContent"&gt;

&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>lalu buat file dengan nama 1.html dan 2 html yang berisi</p>
<p>1.html :</p>
<pre>&lt;h3&gt;Halaman 1&lt;/h3&gt;
&lt;p&gt;
isi dari halaman 1
&lt;/p&gt;</pre>
<p>2.html</p>
<pre>&lt;h3&gt;Halaman 2&lt;/h3&gt;
 &lt;p&gt;
 isi dari halaman 2
 &lt;/p&gt;</pre>
<p>coba jalankan file index.php dan klik link  dan perhatikan yang terjadi. 1.html dan 2.html akan di load tanpa merefresh seluruh halaman webpage anda.</p>
<p><strong>Penjelasan kode jquery</strong></p>
<pre>&lt;script type="text/javascript" src="../scripits/jquery.js"&gt;&lt;/script&gt;
</pre>
<p>koding di atas digunakan untuk meload jquery library anda. ubah src value menjadi tempat dimana anda menyimpan jquery libraary anda.</p>
<pre>$("a.loadpage")
</pre>
<p>memilih selector link (a) dengan class loadpage(.loadpage)</p>
<pre>$("a.loadpage").click(function(){
</pre>
<p>melakukan even cilck pada slector kemudian menjalankan fungsi.</p>
<pre>page=$(this).attr("href");
</pre>
<p>mengambil nilai atribut href dari selector dan memasukkan nya ke dalam variable page (page=). dalam hal ini apabila yang di klik link page 1 maka nilai hrefnya adalah 1.html</p>
<pre>$("#pageContent").load(page);
</pre>
<p>memilih selector dengan id pagecontent (#pageContent). kemudiaan memuat hasil dari href ke dalam selector tersebut.</p>
<p>that&#8217;s it.. qita sudah melakukan ajax sederhana dengan jquery.</p>
<p>next kita akan menggabungkan php dengan jquery</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sharemyphp.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sharemyphp.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sharemyphp.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sharemyphp.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sharemyphp.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sharemyphp.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sharemyphp.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sharemyphp.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sharemyphp.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sharemyphp.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sharemyphp.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sharemyphp.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sharemyphp.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sharemyphp.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sharemyphp.wordpress.com&amp;blog=7999327&amp;post=20&amp;subd=sharemyphp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sharemyphp.wordpress.com/2009/10/22/jquery-for-beginner-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ca6a1bc9376fc06a0e091e12d49b8aa7?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">robi83</media:title>
		</media:content>
	</item>
		<item>
		<title>jquery for beginner (1)</title>
		<link>http://sharemyphp.wordpress.com/2009/10/22/jquery-for-beginner-1/</link>
		<comments>http://sharemyphp.wordpress.com/2009/10/22/jquery-for-beginner-1/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 06:39:20 +0000</pubDate>
		<dc:creator>robi ilham</dc:creator>
				<category><![CDATA[Jquery]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://sharemyphp.wordpress.com/?p=11</guid>
		<description><![CDATA[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. pertama buat file dengan nama contoh1. html lalu ketik koding di bawah ini &#60;html&#62; &#60;head&#62; &#60;script type="text/javascript" src="jquery.js"&#62;&#60;/script&#62; &#60;script type="text/javascript"&#62; &#60;/script&#62; &#60;/head&#62; &#60;body&#62; &#60;a href="http://jquery.com/"&#62;jQuery&#60;/a&#62; &#60;/body&#62; &#60;/html&#62; ubah attribut [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sharemyphp.wordpress.com&amp;blog=7999327&amp;post=11&amp;subd=sharemyphp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>jquery merupakan library javascript yang memudahkan kita dalam membuat aplikasi ajax.</p>
<p>library jquery  terbaru dapat anda download do<a href="http://www.jquery.com" target="_blank"> http://www.jquery.com/</a></p>
<p>berikut adalah contoh2 kode javascript menggunakan jquery.</p>
<p><span id="more-11"></span></p>
<p>pertama buat file dengan nama contoh1. html lalu ketik koding di bawah ini</p>
<pre>&lt;html&gt;
  &lt;head&gt;
    &lt;script type="text/javascript" src="jquery.js"&gt;&lt;/script&gt;

    &lt;script type="text/javascript"&gt;

    &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;a href="http://jquery.com/"&gt;jQuery&lt;/a&gt;
  &lt;/body&gt;
&lt;/html&gt;
</pre>
<p>ubah attribut src pada script tag sesuai dengan lokasi jquery library anda. pada contoh di atas file jquery.js berada pada 1 folder dengan file yang anda buat.</p>
<p><strong>Menampilkan alert pada ssat link di klik</strong></p>
<p>untuk menampilkan alert pada saat link di klik, coba anda tambahkan koding di bawah ini</p>
<pre>&lt;script type="text/javascript"&gt;
<pre>     $(document).ready(function(){
       $("a").click(function(event){
         alert("alert tampil, link tidak berpindah ke http://jquery.com");
         event.preventDefault();
       });
     });
</pre>
<p>&lt;/script&gt;</pre>
<p>$(document).ready menandakan bahwa script di atas akan di jalankan setelah seluruh halaman page berhasil di load oleh browser.</p>
<p>sehingga file contoh1.html anda akan menjadi</p>
<pre> &lt;!DOCTYPE html&gt;
 &lt;html lang="en"&gt;
 &lt;head&gt;
   &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
   &lt;script src="<a title="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" href="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js">jquery.js</a>" type="text/javascript"&gt;&lt;/script&gt;
   &lt;script type="text/javascript"&gt;
     $(document).ready(function(){
       $("a").click(function(event){
         alert("As you can see, the link no longer took you to jquery.com");
         event.preventDefault();
       });
     });

   &lt;/script&gt;
 &lt;/head&gt;
 &lt;body&gt;
   &lt;a href="<a title="http://jquery.com/" href="http://jquery.com/">http://jquery.com/</a>"&gt;jQuery&lt;/a&gt;
 &lt;/body&gt;
 &lt;/html&gt;
</pre>
<p>coba anda jalankan filte tersebut pada browser anda dan klik link Jquery dan perhatikan yang terjadi.</p>
<p><a href="http://wp.me/pxyZp-k" target="_self">continue..</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sharemyphp.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sharemyphp.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sharemyphp.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sharemyphp.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sharemyphp.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sharemyphp.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sharemyphp.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sharemyphp.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sharemyphp.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sharemyphp.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sharemyphp.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sharemyphp.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sharemyphp.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sharemyphp.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sharemyphp.wordpress.com&amp;blog=7999327&amp;post=11&amp;subd=sharemyphp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sharemyphp.wordpress.com/2009/10/22/jquery-for-beginner-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ca6a1bc9376fc06a0e091e12d49b8aa7?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">robi83</media:title>
		</media:content>
	</item>
		<item>
		<title>Who&#8217;s Blog Is This?</title>
		<link>http://sharemyphp.wordpress.com/2009/10/22/whos-blog-is-this/</link>
		<comments>http://sharemyphp.wordpress.com/2009/10/22/whos-blog-is-this/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 03:30:26 +0000</pubDate>
		<dc:creator>robi ilham</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sharemyphp.wordpress.com/?p=3</guid>
		<description><![CDATA[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 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sharemyphp.wordpress.com&amp;blog=7999327&amp;post=3&amp;subd=sharemyphp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>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.</p>
<p>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.</p>
<p>jadi MARI KITA BELAJAR BERSAMA..</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sharemyphp.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sharemyphp.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sharemyphp.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sharemyphp.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sharemyphp.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sharemyphp.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sharemyphp.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sharemyphp.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sharemyphp.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sharemyphp.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sharemyphp.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sharemyphp.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sharemyphp.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sharemyphp.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sharemyphp.wordpress.com&amp;blog=7999327&amp;post=3&amp;subd=sharemyphp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sharemyphp.wordpress.com/2009/10/22/whos-blog-is-this/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ca6a1bc9376fc06a0e091e12d49b8aa7?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">robi83</media:title>
		</media:content>
	</item>
	</channel>
</rss>
