+ 1
How to connect a MsSQL database from amazon RDS to a web page?
I have a database on SQL server on a free instance on Amazon RDS, I want to control it through a webpage, I know HTML, but how can I use PHP or which language to actually be able to control the database through my webpage or should I use a different language than HTML and in both cases, where can I find the needed codes or what should I do?
1 Resposta
+ 1
In order to connect database to your php code you have to first make a config.php file as
<?php
$conn = mysqli_connect("localhost", "username", "password", "database_name");
// Username and Password belong to the WAMP
if($conn)
{
echo "Database connected";
}
else
{
echo "Database not connected. mysqli_error($conn)";
}
?>