Sabtu, 07 September 2013

PHP Indonesia - Facebook: Mau tanya. Gimana cara membuat koneksi database, s...

PHP Indonesia - Facebook
PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
Refresh your vocabulary.

Learn a new word everyday by subscribing to Word of the Day. A great tool if you're studying for the GRE, GMAT or LSAT, or simply want to enhance your lexicon.
From our sponsors
Mau tanya. Gimana cara membuat koneksi database, s...
Sep 8th 2013, 01:56, by Ipin Caem

Ipin Caem 1:56am Sep 8
Mau tanya.
Gimana cara membuat koneksi database, sedangkan databasenya sendiri berada di server lain.

Terima kasih

Agasi Gilang Persada 1:58am Sep 8
ya tinggal diganti aja alamat databasenya. Klo biasanya localhost,tinggal diganti aja alamat server databasenya,misal 192.168.1.1 atau db.server.com

Ipin Caem 2:01am Sep 8
cuma gitu aja? Trus nama user, database, dan pasword jg seperti biasa? Cuma ganti hostnya aja?

David Hermansyah 2:02am Sep 8
Buat file connection.php<?php
// Create connection
$con=mysqli_connect("localhost","root","","manajemen");

// Check connection
if (mysqli_connect_errno($con))
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
?> localhost ganti nama komputer server atau alamat server

Nur Hidayat 2:05am Sep 8
username dan password juga disesuaikan dengan username dan password di server remote

David Hermansyah 2:06am Sep 8
cara manggilnya di file lain : <?php
include('connection.php');

$result = mysqli_query($con,"SELECT * FROM employee");
echo "<br><table border=1>
<tr>
<th>NO</th>
<th>NAMA</th>
</tr>
";
$i=0;
while($row = mysqli_fetch_array($result))
{
$i++;
echo $row['name_employee'];
echo "<tr><td>$i</td>";
echo"<td>".$name."</td></tr>";

}
echo "</table>";

mysqli_close($con);
?>

Akhmad Ghozien 2:09am Sep 8
kalo mysql servernya gak suport remote mysql gimana?

Ipin Caem 2:11am Sep 8
klo 1 server dah bsa gan, ini beda server. Ane pkai idhostinger.com untk dtabase.x

Agasi Gilang Persada 2:13am Sep 8
Klo database server di hosting rata2 ga bisa diakses dari luar,alias diremote. Tapi coba aja tanya ke idhostinger,siapatahu mysql nya bisa diremote

Nur Hidayat 2:13am Sep 8
khusus untuk shared hosting biasanya mereka tidak membuka port 3306 mysql keluar, sehingga kita tidak bisa koneksi langsung ke mysql di server hosting. lebih jekasnya silakan kontak hosting bersangkutan apakah kita diperbolehkan melakukan koneksi remote

Akhmad Ghozien 2:17am Sep 8
kalo idhostinger katanya bisa akses remote mysql kalo pake paket premium

Ipin Caem 2:45am Sep 8
ow brarti harus suport remote mysql? Pantesan gk conect"

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Tidak ada komentar:

Posting Komentar