Contact | Sitemap | Announcement | Privacy Policy | Disclaimer |
$value) { if (strpos($param, 'color_') === 0) { google_append_color($google_ad_url, $param); } else if (strpos($param, 'url') === 0) { $google_scheme = ($GLOBALS['google']['https'] == 'on') ? 'https://' : 'http://'; google_append_url($google_ad_url, $param, $google_scheme . $GLOBALS['google'][$param]); } else { google_append_globals($google_ad_url, $param); } } return $google_ad_url; } $google_ad_handle = @fopen(google_get_ad_url(), 'r'); if ($google_ad_handle) { while (!feof($google_ad_handle)) { echo fread($google_ad_handle, 8192); } fclose($google_ad_handle); } ?>

Translate

Friday, November 9, 2012

Cara membuat script delet di php



Script Hapus (delete) dalam pembuatan suatu program php, khusus nya bagi  programer sangatlah penting .
contoh script nya sebagai berikut :
<?php
mysql_connect("namahost","dbuser","dbpass");
mysql_select_db("dbname");

$op = $_GET['op'];
if ($op == "delete")
{
   $nim = $_GET['id'];

   $query = "DELETE FROM table WHERE id = '$id'";
   $hasil = mysql_query($query);
}

?>

<a href=\"".$_SERVER['PHP_SELF']."?op=delete&id=".$data['id']."\" onclick=\"return konfirmasi('".$data['nim']."')\">Hapus</a>

semoga bermanfa'at 






No comments: