Cara Update Database dengan PHP

Membuat form untuk update dtabase <h4>Update</h4><form name=”update” id=”update” action=”t.php” method=”post”>         <fieldset><input name=”isi” type=”text” value=”<?php echo $a;?>”/><textarea style=”width:100%”  name=”def” type=”text”><?php echo $b.”<p>”.$definisi.”</p>”;?></textarea><input type=”submit” value=”Update” name=”update”/></fieldset></form> Membuat koneksi database PHP-Mysql <?phpsession_start();$hostname_kon = “Localhost”; // server$database_kon = “siswa”; // nama database$username_kon = “root”; //nama user database$password_kon = “”; // password database$kon = mysql_pconnect($hostname_kon, $username_kon, $password_kon)  or die(“Could not connect: ” … Read more

Membuat Sitemap dari Database dengan PHP

Cara membuat sitemap atau kumpulan link dinamis dari database menggunakan PHP dan Mysql adalah sebagai berikut. <?php   $databaseServer = “localhost”; $databaseUsername = “username”; $databasePassword = “password”; $databaseName = “database”; $databaseTable = “tablename”; header(“Content-Type: text/xml”);   function xmlentities($text)   { $search = array(‘&’,'<‘,’>’,'”‘,”’); $replace = array(‘&amp;’,’&lt;’,’&gt;’,’&quot;’,’&apos;’);     return str_replace($search,$replace,$text);     }   print chr(60).”?xml version=’1.0′ … Read more

PHP | Membuat Signup Page

1.         File signup.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Geodik | Team Registration</title> </head> <style> input{     border: 2px solid #55ACEE;     border-radius: 7px;                 transition: all 0.25s ease-in-out;     -webkit-transition: all 0.25s ease-in-out;     -moz-transition: all 0.25s ease-in-out;transition: all 0.25s ease-in-out;     -webkit-transition: all … Read more

PHP | Membuat Login Page

1. file koneksi.php <?php # FileName="Connection_php_mysql.htm" # Type="MYSQL" # HTTP="true" $hostname_koneksi = "localhost"; $database_koneksi = "wave"; $username_koneksi = "root"; $password_koneksi = ""; $koneksi = mysql_pconnect($hostname_koneksi, $username_koneksi, $password_koneksi) or trigger_error(mysql_error(),E_USER_ERROR); ?> 2. file login.php <?php require_once(‘koneksi.php’); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") {   $theValue = get_magic_quotes_gpc() ? … Read more