Home Blog

Hadith about Seeking Knowledge Complete with Sanad, Matan and Rawi

0

Knowledge or العم in Arabic is defined as or light. In the Qur’an, the word science is mentioned 80 times, the number is already in the meaning of makrifat as well as nakiroh. While the word ‘allama ya’lamu a’lim is mentioned more than 100 times the mention of the word knowledge over and over again is a reference or encouragement for Muslims to want to seek knowledge, because with knowledge the degree of humans is higher than other creatures of Allah SWT. There are quite a number of hadiths about seeking knowledge, the following is a hadith about studying complete with sanad, matan and narrators.

Hadith of Seeking Knowledge from the Cradle to the Grave

In terms of the obligation to study, Rasulullah SAW frequently encouraged his friends to study even in China, and every human being, from the cradle to the grave, is obligated to seek knowledge.

Hadith about Seeking Knowledge Complete with Sanad, Matan and Rawi 1
Hadith about Seeking Knowledge Complete with Sanad, Matan and Rawi 3

اطلب العم من المهد الى اللحد
” tuntutlah ilmu dari buaian hingga ke liang lahat”


Kata طلب diimbuhi dengan ا maka menjadi fi’il amar yang menunjukan kata perintah, maka artinya adalah tuntutlah.

Verses of the Qur’an about Seeking Knowledge

Muslims who wish to study one of Allah SWT’s sentences in QS, Al mujadilah verse 11, are also motivated by Allah SWT.

Hadith about Seeking Knowledge Complete with Sanad, Matan and Rawi 2
Hadith about Seeking Knowledge Complete with Sanad, Matan and Rawi 4

يرفع الله الذين ءامنو منكم والذين اوتوا العلم درجت ، والله بما تعملون خبير

Al Mujadilah Verse 11

“Allah will exalt those who believe among you, and those who were given knowledge by several degrees. And Allah is aware of what you do.”

Every Muslim has an obligation to seek knowledge, because knowledge is a source of light for a country. The land will be gloomy if the people are not knowledgeable. Similarly, if a family is not founded on knowledge, the future is bleak.

The future that aims to amar ma’ruf nahi munkar is also the best of humans with knowledge, because Allah raises the degree of every human being both in this world and in the hereafter, but don’t forget that knowledge without adab is like a tree that does not bear fruit, or in other words, knowledge without adab is a futility that can lead to man’s destruction. “Knowledge without manners is like a tree that bears no fruit,” according to a maqlah.

Maka jelaslah disini bahwa menuntut ilmu bagi setiap manusia adalah fardhu yang artinya wajib untuk kemaslahatan manusia itu sendiri juga hubungannya dengan sesama manusia ataupun hubungannya dengan Tuhannya semua tak luput harus didasari dengan ilmu.
Pun kelak jika ia bercita-cita menjadi manusia yang beruntung diakhirat maka harus didasari ilmu sedini mungkin.

Hadith about Seeking Knowledge Complete with Sanad, Matan and Rawi

There are numerous hadiths on the subject of studying. A hadith about seeking knowledge, replete with sanad, matan, and rawi, is presented below. Arabic words and their Indonesian translations are also included:

Hadith about Seeking Knowledge and Ease of Path to Heaven

عن كثير بن قيس قال : كنت جالسا عند أبي الدّرداء في مسجد دمشق , فأتاه رجل , فقال : يا أبا الدّرداء , أتيتك من المدينة – مدينة رسول الله صلّى الله عليه وسلّم – لحديث بلغني أنّك تـحدّث به عن النّبـيّ . قال : فما جاء بك تـجارة ؟ . قال : لا . قال : ولا جاء بك غيره ؟ . قال : لا . قال : فإنّي سمعت رسول الله صلّى الله عليه وسلّم يقول : ” من سلك طريقا يلتمس فيه علما سهّل الله له طريقا إلى الجنّة , وأنّ الـملائكة لتضع أجنحتها رضا لطالب العلم , وإنّ طالب العلم يستغفر له من في السّماء والأرض حتّى الحيتان في الـماء , وإنّ فضل العالم على العابد كفضل القمر على سائر الكواكب , إنّ العلماء هو ورثة الأنبياء , إنّ الأنبياء لم يورّثوا ولا درهما , إنّما ورّثوا العلم , فمن أخذه , أخذ بـحظّ وافر

From Katsir bin Qais Radhiyallahu’anhu, he said: “When I was sitting next to Abu Darda ‘at the Damascus Mosque. Suddenly a man came to him, then the man said: “O Abu Darda ‘, I have come to you from the city of Medina – the city of Medina Rasulullah – for the purpose of a hadith that reaches me that you have narrated it from the Rasulullah Shallallahu’alaihi wa sallam. Abu Darda ‘said: “Did you come (all) to trade?” He replied: “No.” Abu Darda ‘said again: “Did you come (all) for purposes other than that?” He (the man) replied: “No.” Abu Darda ‘said: “I heard Rasulullah sallallaahu ‘alaihi wa sallam say: “Whoever walks in pursuit of knowledge, Allah will make it easy for him the path to Paradise. Verily the angels lay down their wings. Because of the pleasure of the seeker of knowledge. Verily, those who seek knowledge will be asked for forgiveness by the creatures in the heavens and on the earth to the fish that are in the water. Indeed, the superiority of a scholar (ulama) over a worshiper is like the virtue of the moon over all the stars. Verily, the Ulama are the inheritors of the Nabi. And verily the Nabi did not bequeath dinars or dirhams. But they only pass on knowledge. Whoever takes it, then he has taken a large share.”

[Hasan Sahih: Narrated by Imam Ibn Majah rahimahullah in his Sunan hadith no. 223, Imam Abu Daud rahimahullah in his Sunan, hadith no. 3641. Imam Ibn Hibban rahimahullah in his Sahih hadith no. 88. Imam At-Tirmidhi rahimahullah in his Sunan hadith no. 2682, Imam Ad-Darimi rahimahullah in his Sunan Imam Ahmad rahimahullah in his Musnad, authenticated by Shaykh Al-Albani rahimahullah, and authenticated by Shaykh Shu’aib, Shaykh Fawwaz, Shaykh Khalid, Shaykh Hamzah]

Hadith about people learning and teaching knowledge sincerely like people who strive in the way of Allah

عن أبي هريرة قال : سمعت رسول الله صلّى الله عليه وسلّم يقول : ” من جاء مسجدي هذا ,لم يأته إلاّ لخير يتعلّمه أو يعلّمه , فهو بـمنـزلة الـمجاهد في سبيل الله , ومن جاء لغير ذلك , فهو بـمنـزلة الرّجل ينظر إلى متاع غيره ”

From Abu Hurairah Radhiyallahu’anhu, he said: “I heard Rasulullah sallallaahu ‘alaihi wa sallam say: “Whoever comes to my mosque is nothing but for the good that he wants to learn or what he wants to teach. So his position is equal to that of a jihadist in the cause of Allah. And whoever comes with an intention other than that, then his position is the same as someone who can only look at other people’s property.”

[Hasan Sahih: Narrated by Imam Ibn Majah in his sunan hadith no. 227. And this is his lafadz. Narrated by Imam Ibn Hibban in his Sahih Hadith No. 86. Narrated by Imam Ahmad in his Musnad, Hadith No. 8603. Authorized by Shaykh Al-Albani and Hasanah by Shaykh Shuaib al-Arnauth].

Recipe for Chicken Opor, a Practical Menu for Iftar and Sahur

0

After a day of fasting, Iftar is the most awaited meal. Imagining Opor ayam with still scorching hot, tasty smoke, appreciation for having fulfilled the religious law’s responsibility to fast. However, the fasting menu should be fair in order to avoid obscuring the core of fasting, which is “holding back.” You will not be able to avoid all temptations while fasting, but you will be able to break your fast by overeating.

Iftar and sahur menus should ideally be varied. However, there will come a moment when you must be frugal, and eating the same thing will not be an issue. Chicken opor is one of the dishes that is still great to consume after breaking the fast and eating sahur. It’s very simple to build, and the materials aren’t too pricey. The leftover chicken opor for iftar can be reheated for the next day’s supper.

Ingredients of chicken opor:

  • 1 chicken, cut into 10 portions (select free-range chicken for a more exquisite taste).
  • 1 lime
  • 1 lemongrass stalk, bruised 1
  • 1 sheet of kaffir lime leaves
  • 1 bay leaf
  • 1 old coconut produced 750 mL thin coconut milk and 250 mL thick coconut milk

Ground spices of chicken opor

  • 6 cloves of red onion
  • 3 cloves of garlic
  • 3 roasted hazelnuts
  • 1 teaspoon coriander powder
  • ½ teaspoon cumin powder
  • ½ teaspoon pepper powder
  • ½ tablespoon grated/chopped ginger
  • 1 tablespoon grated/chopped galangal
  • Add salt and sugar to taste
  • Oil for saute
  • Fried onions for sprinkling

How to make Chicken Opor:

1. Under running water, wash the chicken that has been chopped into pieces.

2. Smear the lime over the chicken, add a pinch of pepper powder, and knead. Allow 15 minutes for the process to complete.

2. Puree the spices. Heat the oil for saute.

3. Combine the ground spices, bruised lemongrass, bay leaf, and kaffir lime leaves in a large mixing bowl. Spices should be sautéed until aromatic.

3. Add the chicken to the stir fry and cook until it is thoroughly combined with the spices. Stir in a little water. Then pour in the liquid coconut milk and simmer, stirring occasionally, until it boils.

4. Add the thick coconut milk. Reduce the heat in the room. Then cook the chicken over low heat, stirring regularly so the coconut milk doesn’t break. Mix in the sugar and salt. Correction the taste.

5. Continue to cook until the chicken appears to be tender.

6. Serve immediately. Crispy fried onions should be sprinkled on top.

When eating sahur, the same cuisine can become monotonous. Serve the opor chicken in a separate way as a precaution. Cook the remaining seasoned chicken in a skillet and serve with tomato sauce or chili paste. Guaranteed sahur dish feels more delicious and full of sensation.

Tips for Dealing with a Possessive Partner

0

Harmonious relationship is a dream for everyone. But sometimes the feeling of fear of losing makes someone unconsciously provide limited space for their partner. The prohibitions given actually make one feel uncomfortable. Small fights will usually arise when the couple feels constrained. Let’s look at the tips below to deal with a possessive partner.

Speak well

Communication is the basis for solving any problem. We must listen to the explanations of each party to avoid misunderstandings. We first ask our partner why he is being possessive. After that maybe we can introspect ourselves, whether what we are doing is right or not. Because if we don’t have a good talk with them, we won’t know what they want and instead cause a fight.

Be Assertive

Possessive partners sometimes ask questions and requests that sometimes invade our privacy. As a couple when we feel uncomfortable because our partner is too intrusive on privacy matters that shouldn’t be their business, we can politely refuse. Sentences and actions of rejection as much as possible are done without hurting and offending our partner.

Be Firm

When we have a possessive partner, we should be firm. Status as a boyfriend does not mean fully entitled to regulate our space. Sometimes we obey their wishes, and sometimes what they forbid we don’t have to do. Therefore, giving clear boundaries to your partner is one solution that you can do. With a firm attitude and clear boundaries, it can minimize any fights caused by misunderstandings or discomfort.

Consultation with a Psychologist

Complicated relationships often make us more easily carried away by emotions. Sometimes we are confused about who to talk to. Because when we tell the people closest to them they tend to give subjective suggestions that can lead to new problems. One of the tips you can do is consult a psychologist. You can tell what you’re going through and ask for advice on how to deal with a possessive boyfriend. Psychologists will be happy to hear your stories and guide you on what to do to deal with your problems.

Be Realistic

Someone with a possessive nature tends to be difficult to advise. The fear of losing makes them do various things to their partners. For those of you who have a possessive partner, maybe you can be realistic about your partner. It’s not easy to ask him to change in the near future. It takes a process to change the deeply rooted nature. Maybe we need to avoid behavior that makes our partner jealous. If his possessive attitude is too excessive, don’t hesitate to remind him nicely.

End Relationship

Every relationship always ends in two stories; happy or sad. If you really feel that your partner is too possessive and uncomfortable, ending your relationship immediately is the last tip. Unhealthy relationships can have an impact on your daily life, days become restless because of mutual suspicion. The emotions generated can also sometimes interfere with your performance in carrying out obligations such as studying or working.

Know your boyfriend type well so you don’t fall into a toxic relationship. If you feel that you have a possessive boyfriend. You can try some of the tips above. However, if it doesn’t work, maybe you should end the relationship for your own good.

5 Tips to Make Children Like to Read

0

Having children who love to read is everyone’s dream. Many efforts are made by parents to make their children become fond of reading.

3 Easy Steps to Install & Configure Vue JS in Laravel 8

0

Here’s how to use VueJs in Laravel 8

Install Composer package laravel/ui

We need to install laravel/ui package to use VueJs on laravel. The method is as follows:

composer require laravel/ui

Configuring scaffolding vue using laravel ui

Laravel Ui provides tools to configure everything needed to use VueJS in Laravel. The method is quite easy, just run the following command:

php artisan ui vue

Compile File

After the vue scaffolding is configured by Laravel Ui, the next step is to install and compile all the dependencies. You can do this simply by running the following command:

npm install && npm run dev

Add this to the blade template to use VueJS on the blade template

<link rel="stylesheet" href="{{ mix('css/app.css') }}"/>
<script defer src="{{ mix('js/app.js') }}"></script>

How to reply to Amanillah Fii

0

Fii Amanillah, a prayer we are used to say to those who are traveling has a magical meaning, (hopefully) you are always in the protection of God. A prayer that has deep meaning, as God takes care of you on this journey, returns to the family in a safe way without less.

How to reply to Amanillah Fii 3

Fii Amanillah, a short prayer, which pronounce it does not take more than a minute. Short prayers that have a variety of meanings. May your health, your religion, your deeds, all that you need on this journey is always in the protection of God.

Fii Amanillah, (May) thou always be in the protection of God. Protected from bad things while driving, protected from dark nights, protected from the intentions of evil people.

Yes… What is not protected by Allah?

Replying to Amanillah greeting

How to reply fii Amanillah? Just say ma’assalamah. Ma’assalamah no less short, save prayers that are not inferior. Ma’assalamah means peace be with you.

Ma’assalamah, may salvation always be with you. Religious peace, peace born in the face, peace of whatever is in your life. Ma’assalamah, may salvation always be with you, peace from everything that not good for you.

Replying to Fii amanillah greeting
Replying to Fii amanillah greeting

Ma’assalamah, may salvation always be with you. Ma’assalamah, may peace always accompany your heart, do not turn to a man other than your husband. Not tempted to the dissonant shopping and remember to prepare me to come home cheerfully. Bhahahaha. A… sorry, i am not serrious.

Its so beautiful if we respond to prayers every time we will travel. Try to use this image to reply with a husband/wife every time he travels. Making the family feel warm, make us always remember that wherever we are there are people who love us, who always wait faithfully.

FII Amanillah. May you always be in his protection. Protected from all scattered temptations. Ma’assalamah, may salvation always be with you, until we can gather again in obedience to him. Heuuu, this is so sweet. I think if I made a sticker, it’ll more sweet. Bhahaha. Anyone want to? Please download this picture and send this to your husband/wife.

 

7 must-know SEO myths

What is the heck of your mind if you hear the word SEO? Length of the article? Number of keywords? Age domain? Or don’t-don’t even fake Mastah that leaves you fitting anymore when you ar fall in love with him ever promised an increase in blog visit but in fact it is even nyungsep?

Yesterday, I participated in Google for Publisher (GFP) event at Santika Hotel Semarang. Broadly, the material presented at the event is four namely 1). How search engines work, 2). Blog optimization including content quality, blog speed, and, security, and comfort, 3). Implementation of structured data, and 4). AdSense revenue optimization.

At one of the GFP events, there is such a kind of guess-about myth or SEO related fact that has evolved widely in the world of bloggers. What are the myths and facts? Check it out well below.

Minimum and maximum number of words in the article

Many bloggers believe that the word count on an influential article on the blog rankings in the search engines. It’s just a myth. The fact that the word count doesn’t affect the blog ranking in search engines. If you want proof, just look for a site that presents around the glossary, the meaning of the word, wiki and such. Some of them only contain some definitions of words meaning a few sentences but still good rating.

Keyword Density

The second myth that also develops in the blogger community is keyword density or repetition of the same keywords that are spread from the beginning of paragraphs to the end. The fact is that it does not affect search engines to prioritize articles that have a keyword density higher than the lower ones.

If you have not believed, just try typing in a specific keyword in the search engine and see if the blog that has the article does not care about keyword density can go to page one?

Age Domain

The next myth is the age of the domain. Many believe that the older the age of a domain (aged omain) then the better the ranking in the eyes of the search engines. The fact is not. Old-age domains that have a bad digital footprint such as often used for spamming, spreading malware or adware, or any other illegal activity are even the worse the image in the eyes of the search engines. Aged domains that are not used for blogging (passive) will also not have rankings in search engines.

COM TLDS & NET Better ranking

There are also myths that believe that certain TLDS like. com or .net could potentially rank better than other TLDs such as. xyz,. cc,. tk, and so on. In fact many domains are not well-known TLDS but get good rankings in search engines because they have quality content.

The shorter the Domain name the better the ranking

Many are racing for short domain names in the hopes of gaining more attention from prospective-in- law search engines. In fact long or short domains have no effect on the ranking of blogs by search engines. The length or short of a domain’s name is more toward ease of branding and not towards a live blog ranking.

Domains containing targeted keywords got better ranking

The next myth is that many believe that the domain whose name contains the targeted keyword guarantees a good ranking in the search engine. In fact the domain name contains or does not contain the same influential keywords blog ranking in the search engines. I prove it myself through this nusagates.com domain. Many nusagates articles that page one defeats a domain containing a tertartget keyword.

Fast Server guarantees Blog speed

Many thought that server speed was influential at the speed of the blog. But that’s not true. As fast as any server if the blogging way is not irregular yes it will slow down the blog. For example the number of photos uploaded in one article is quite a lot and not compressed first. Say each uploaded photo has a size of 1 MB. If there are 10 photos uploaded then the total is 10 MB. Not to mention if the blog theme is pretty heavy because it uses a custom font, background image, ornaments are weird. So the factors that make the blog slow will overlap each other beat server speed itself.

What is the fact that you still do not believe? Still believe the myth is true? Still want to blog in the old way and waste of time? It’s okay. We all have a choice. If you want further discussion can directly slide to forum.nusagates.com.

Can you install AMP on Blogspot & is It Needed?

0

AMP became one of the discussions matter on the Google for Publisher (GFP) event held yesterday, July 17 2019, at the Santika Semarang Hotel. Jeanny briefly describes the history of AMP’s formation until the current AMP’s development. I am, yesterday, there was only one technical question around AMP that is about installing AdSense ads in AMP.

After the GFP, Widut ASKED If AMP can be installed on Blogspot? I answered fast no need then I explained the reason. However, he presumably was less satisfied with my answer because it still believes in SEO myths that have long been believed. Therefore, through this article, I want to repeat it deeper about AMP and Blogspot.

Can AMP be installed on Blogspot?

The answer of course can be because blogspot allows users to edit the template according to their wishes. It’s just that AMP’s implementation on Blogspot is much more complicated than the AMP implementation on WordPress that is self hosted. Why can this be? Because the code that can be edited on Blogspot is limited on the client side only so that the conversion automation of an element can not run perfectly.

A simple example to change the image in each article created using the <img> tag to <amp-img> should be done manually on Blogspot. In general. The results are more or less like the following:

<AMP-img src = “. png” alt = “” title = “” Height = “” Layout = “” width = “”> </amp-img>

If one article has multiple images then it should be replaced one by one using the AMP tag. It could be that we do not focus on the content because it is the only AMP validation Ngurusi.

Advantages of using AMP on Blogspot

I think there’s almost no excess at all using AMP on Blogspot for now. In addition to adding blogger work converts some code manually each time creating new articles, the good impact for SEO also does not exist.

The latest Google algorithm implements Mobile-first indexing it refers to the design of a responsive blog or website instead of AMP. If the blog template has been unsightly when visited through mobile Yes already get value from Google. While AMP is more aimed at blog speed. Though! WITHOUT AMP, the average blogspot is already very fast except blogs that have a lot of ornaments or unnecessary animations, images are not compressed first before uploading, using custom fonts, logo size is too large, many broken links or Just an outbound link. The factor that slows the blog is actually a lot, it’s just that the most I find is what I’ve mentioned it.

Disadvantages of installing AMP on Blogspot

I don’t know for other bloggers feeling lost or just uncomfortable. But if I myself feel loss. Some of the disadvantages that I personally think are:

  • Could not use comment default blogger
  • Could not use template editor
  • All images uploaded in the article must be changed to img->amp. If changing the manual is certainly detrimental in terms of time
  • Can not use widgets in the sidebar
  • All video, audio, and IFrame that want to be displayed in the article should be edited manually. Including when you want to display (embed) status from Facebook.
  • Subscribe to a blogger default Email form cannot be used

Based on John Okosun’s experience, the owner of bloggingprince.com, implementing AMP on Blogspot will kill the blog slowly because AMP for Blogger is not SEO Friendly. Image tags that are converted to AMP- img will not be indexed by Google thereby reducing the spread of blog queries.

My advice, for blogspot users should not bother thinking about AMP. Think it’s useless. Blogspot’S speed is already managed by Google, blog owners live hone writing speed only. As fast as any blog you have if the article production is not smooth still it will not get good rankings in search engines.

How To Use Ajax In JQuery

0

Ajax or Asynchronous JavaScript and XML is a client side technology that can be used to make sending and receiving data from a server behind the scenes (on background process) so that web pages do not need to be reloaded or reloaded as a whole to update content that available.

Ajax Introduction at JQuery

We could use $.ajax(); atau jQuery.ajax();  for make an ajax call at JQuery. The request can be POST or GET method.  Example:

$.ajax({
  url: "proses.php?ajax1",
  method: "post",
  data: { name: "Budairi", website: "nusagates.com" },
  success: (respon) => {
      alert(respon);
  }
});

Note:

  • url: filled with destination url
  • method:  post or get
  • data: filled with parametres and its value. The data sent can be in this format nama=Budairi&website=nusagates.com
  • success: Ajax call success and we can get response as we expected from server

Examples of Ajax Usage

We make an ajax call after a button is clicked. The response from . Response from the server is print data from post request,

  • Cerate a button using HTML
    <div class="col-md-6 col-md-offset-3">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <h3 class="panel-title">Contoh 1</h3>
            </div>
            <div class="panel-body">
                <p>Silahkan klik tombol di bawah untuk mengeksekusi ajax.</p>
            </div>
            <div class="panel-footer"><button class="btn btn-primary" id="tombol1">Tombol 1</button>
            </div>
        </div>
    </div>
    

    Save the code in a file called ajax.html

  • Create lines of code for handling click event
    $("#tombol1").click((e) => {
        $.ajax({
            url: "proses.php?ajax1",
            method: "post",
            data: { name: "Budairi", website: "nusagates.com" },
            success: (respon) => {
                alert(respon);
            }
        });
    });
  • Create a file for handling post request sent by ajax called proses.php.
    if (isset($_GET['ajax1'])) {
        print_r($_POST);
    }

    Test the button. Fire a click event on it.

Mengirim Data Dari Form Melalui Ajax

Sebelum kita membahas mengenai cara mengirim data form melalui ajax, kita perlu mengetahui cara mengambil data dari form menggunakan jquery. Pengambilan data form berupa text bisa dilakukan menggunakan fungsi serialize(); sedangkan pengambilan data berupa file bisa menggunakan fungsi FormData();

Dengan kata lain, jika di dalam form tidak ada input type file maka kita bisa menggunakan serialize(); sedangkan jika di dalam form ada input type file bisa menggunakan FormData(); . Kita bisa menggunakan salah satu saja.

Contoh:

Misalnya kita memiliki form dengan id login <form id=’login’>…</form> maka kita bisa mengambil data berupa teks dengan cara var data = $(“#login”).serialize(); .

Jika di dalam form tersebut ada input type file semisal <input type=’file’ name=’gambar’/> maka untuk mendapatkan data file tersebut bisa menggunakan var data = new FormData($(“#login”)[0]); . Metode ini digunakan untuk mengganti serialize();

Sebagai bahan latihanbuatlah sebuah form menggunakan html seperti di bawah ini:

<div class="col-md-6 col-md-offset-3">
    <div class="panel panel-info">
        <div class="panel-heading">
            <h3 class="panel-title">Contoh 2</h3>
        </div>
        <div class="panel-body">
            <p>Silahkan isi form lalu klik tombol di bawah untuk mengirim data form melalui ajax
            </p>
            <form id="form-coba">
                <div class="form-group">
                    <label for="nama">Nama</label>
                    <input type="text" name="nama" id="nama" class="form-control" />
                </div>
            </form>
        </div>
        <div class="panel-footer">
            <button class="btn btn-info" id="tombol2">Tombol 2</button>
        </div>
    </div>
</div>

Kemudian buat hanlder untuk dieksekusi ketika Tombol 2 diklik menggunakan JQuery seperti di bawah ini:

$("#tombol2").click((e) => {
    var data_form = $("#form-coba").serialize();
    $.ajax({
        url: "proses.php?ajax2",
        method: "post",
        data: data_form,
        success: (respon) => {
            alert(respon);
        }
    });
});

Pada contoh di atas, form yang dibuat memiliki id form-coba dandatanyahanya berupa teks maka pengambilan datanya menggunakan var data_form = $(“#form-coba”).serialize();

Tambahkan baris kode php di bawah inike dalam file proses.php yang telah dibuat sebelumnye:

if (isset($_GET['ajax2'])) {
    $nama = isset($_POST['nama']) ? $_POST['nama'] : '';
    if (empty($nama)) {
        echo "Anda belum mengisi nama";
    } else {
        echo "Nama Anda: ". $nama;
    }
}

Kode Lengkap

Kode lengkap untuk membuat tampilan uji coba ajax (ajax.html) adalah sebagai berikut:

<!DOCTYPE html>
<html>

<head>
    <title>Tutorial Ajax</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
    <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
    <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>

<body>
    <div class="container">
        <div class="d-flex justify-content-center">
            <div class="row text-center justify-content-center">
                <div style="margin-top: 80px" class="col-md-12 mb-6">
                    <h2>Tutorial Ajax</h2>
                </div>
                <div class="col-md-6 col-md-offset-3">
                    <div class="panel panel-primary">
                        <div class="panel-heading">
                            <h3 class="panel-title">Contoh 1</h3>
                        </div>
                        <div class="panel-body">
                            <p>Silahkan klik tombol di bawah untuk mengeksekusi ajax.</p>
                        </div>
                        <div class="panel-footer"><button class="btn btn-primary" id="tombol1">Tombol 1</button>
                        </div>
                    </div>
                </div>
                <div class="col-md-6 col-md-offset-3">
                    <div class="panel panel-info">
                        <div class="panel-heading">
                            <h3 class="panel-title">Contoh 2</h3>
                        </div>
                        <div class="panel-body">
                            <p>Silahkan isi form lalu klik tombol di bawah untuk mengirim data form melalui ajax
                            </p>
                            <form id="form-coba">
                                <div class="form-group">
                                    <label for="nama">Nama</label>
                                    <input type="text" name="nama" id="nama" class="form-control" />
                                </div>
                            </form>
                        </div>
                        <div class="panel-footer">
                            <button class="btn btn-info" id="tombol2">Tombol 2</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script>
        $(() => {
            $("#tombol1").click((e) => {
                $.ajax({
                    url: "proses.php?ajax1",
                    method: "post",
                    data: { nama: "Budairi", website: "nusagates.com" },
                    success: (respon) => {
                        alert(respon);
                    }
                });
            });
            $("#tombol2").click((e) => {
                var data_form = $("#form-coba").serialize();
                $.ajax({
                    url: "proses.php?ajax2",
                    method: "post",
                    data: data_form,
                    success: (respon) => {
                        alert(respon);
                    }
                });
            });
        });
    </script>
</body>

</html>

Kode lengkap proses.php adalah sebagai berikut:

<?php
if (isset($_GET['ajax1'])) {
    print_r($_POST);
}
if (isset($_GET['ajax2'])) {
    $nama = isset($_POST['nama']) ? $_POST['nama'] : '';
    if (empty($nama)) {
        echo "Anda belum mengisi nama";
    } else {
        echo "Nama Anda: ". $nama;
    }
}

Demo Menggunakan Ajax Di Jquery

Demo yang dibuat pada tutorial ini bisa diakses melalui link berikut.