Last active
January 27, 2018 03:06
-
-
Save malikkurosaki/46f08f84665d15ac0250b304a4d3f218 to your computer and use it in GitHub Desktop.
this code is simple for mobile view
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var xmlhttp = new xmlhttpRequest(); | |
xmlhttp.onreadystatechange = function(){ | |
if (this.readyState == 4 && this.status == 200) { | |
document.getElementById("name").innerHTML = this.responseText; | |
} | |
}; | |
xmlhttp.open("GET","data/mydata.php?data=nama",true); | |
xmlhttp.send(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$host = "127.0.0.1:3306"; | |
$user = "root"; | |
$pass = ""; | |
$db = "malikdata"; | |
$coba = mysqli_connect($host,$user,$pass,$db); | |
if (!$coba) { | |
echo "database not connected"; | |
}else { | |
echo "database connected perfect"; | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$host = "127.0.0.1:3306"; | |
$user = "root"; | |
$pass = ""; | |
$db = "malikdata"; | |
$connect = mysqli_connect($host,$user,$pass,$db); | |
if (!$connect) { | |
echo "gagal koneksi ke database"; | |
} | |
$show = "SHOW COLUMNS FROM halaman"; | |
$hasil = mysqli_query($connect,$show); | |
while ($row = mysqli_fetch_array($hasil)) { | |
print_r($row); | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title> name website</title> | |
<meta name='viewport' content='width = device-width, initial-scale = 1.0'> // for mobile view | |
<link rel='stylesheet' href='styles.css'> // for css | |
</head> | |
<body> | |
//content is here | |
</body> | |
<script type='text/javascript' src='scripts.js'></script> // for javascript | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment