how i can access my database on my local environment .my database is hosted by a web hosting company .thahk you.
You might have access to your database via a web app like PHPMyAdmin. If you don’t have access to PHPMyAdmin (or a similar app/interface) or you don’t know where to find it, try contacting your web hosting company.
if i want to access the database on my local computer,how should i do? i put this code in my local server(xampp). but it can’t access my database. when i put it onto my host. it can work.
<?php
$con = mysql_connect(“localhost”, “user”, “123”);
if (!$con)
{
die('Could not connect: ’ . mysql_error());
}
$db_selected = mysql_select_db(“data”);
…
The value “localhost” for the hostname won’t work, you’ll need to contact your webhost to get the value you’ll need.
you’re right. it’s ok.thank you.