+ 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...

5th Sep 2017, 9:27 AM
Vansh
Vansh - avatar
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.
5th Sep 2017, 12:39 PM
Felipe Andrade [72ota1]
Felipe Andrade [72ota1] - avatar
+ 1
Html cannot directly link to SQL. You need server script like PHP to do it.
5th Sep 2017, 9:45 AM
Calviղ
Calviղ - avatar
+ 1
HTML is not a programming language. For SQL you need a programming language.
5th Sep 2017, 10:05 AM
Saidmamad Gulomshoev
Saidmamad Gulomshoev - avatar
- 2
no link between HTML and SQL query Choose PHP or, ASPX or ROR and so on
5th Sep 2017, 9:51 AM
MBZH31
MBZH31 - avatar