+ 6
How to interlink SQL and html?
I want to make a login setup and want to make a database i have downloaded sql and trying to add my sql file to my html file but it is not working . how to add it please...
5 Respuestas
+ 4
Make a ---> file.php
<?php
function connect() //conecta la base de datos
{
$databasename= "urdatabasename";
$host = "localhost";
$user= "uruser";
$password = "urpassword";
$charset = "utf8";
if (!($link = mysqli_connect($host, $user, $password,$databasename)))
{
echo "Error couldnt connect!";
exit();
}
//mysqli_set_charset($charset, $link);
return $link;
}
?>
then just include the file.php and call the $link function there u have the connection. hope this work on ur project.
+ 1
Html cannot directly link to SQL. You need server script like PHP to do it.
+ 1
HTML is not a programming language. For SQL you need a programming language.
- 2
no link between HTML and SQL query
Choose PHP or, ASPX or ROR and so on