Coder Social home page Coder Social logo

Tws about android HOT 1 OPEN

hmkcode avatar hmkcode commented on August 27, 2024
Tws

from android.

Comments (1)

farhan695 avatar farhan695 commented on August 27, 2024

Pertemuan 14

Koneksi Mysqli Error : " .mysqli_connect_error()); mysqli_select_db($con, $database) or die("

Koneksi Kedatabase Error :

" . mysqli_error($con)); @$operasi = $_GET['operasi']; switch ($operasi) { case "view"; $query_tampil_biodata = mysqli_query($con,"SELECT * FROM isibiodata") or die (mysqli_error($con)); $data_array = array(); while($data = mysqli_fetch_assoc($query_tampil_biodata)) { $data_array[]=$data; } echo json_encode($data_array); break; case "insert"; @$nim = $_GET['nim']; @$nama = $_GET['nama']; @$alamat = $_GET['alamat']; $query_insert_data = mysqli_query($con, "INSERT INTO isibiodata (nim, nama, alamat) VALUES('$nim','$nama','$alamat')"); if ($query_insert_data) { echo "Data Berhasil Disimpan"; } else { echo "Maaf Insert Ke Dalam Database Error" . mysqli_error($con); } break; case "get_biodata_by_id"; @$id =(int)$_GET['id']; $query_tampil_biodata = mysqli_query($con, "SELECT * FROM isibiodata WHERE id='$id'") or die (mysqli_error($con)); $data_array = array(); $data_array = mysqli_fetch_assoc($query_tampil_biodata); echo "[" .json_encode ($data_array) . "]"; break; case "update"; @$nim = $_GET['nim']; @$nama = $_GET['nama']; @$alamat = $_GET['alamat']; @$id = $_GET['id']; $query_update_biodata = mysqli_query($con, "UPDATE isibiodata SET nim = '$nim', nama='$nama', alamat='$alamat' WHERE id='$id'"); If ($query_update_biodata) { echo " Update Data Berhasil "; } else { echo mysqli_error($con); } break; case "delete": @$id = $_GET['id']; $query_delete_biodata = mysqli_query($con, "DELETE FROM isibiodata WHERE id='$id'"); if ($query_delete_biodata) { echo "Data Berhasil Dihapus"; } else { echo mysqli_error($con); } break; default; break; } ?>

from android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.