Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <!--
- To change this license header, choose License Headers in Project Properties.
- To change this template file, choose Tools | Templates
- and open the template in the editor.
- -->
- <html>
- <head>
- <meta charset="UTF-8">
- <title></title>
- </head>
- <body>
- <?php
- $host="localhost"; // Host name
- $username="root"; // Mysql username
- $password=""; // Mysql password
- $db_name="test2"; // Database name
- $tbl_name="test_mysql"; // Table name
- // Connect to server and select databse.
- $link = mysqli_connect("$host", "$username", "$password")or die("cannot connect");
- mysqli_select_db($link, "$db_name")or die("cannot select DB");
- //mysql_connect( "$host", "$username", "$password")or die("cannot connect");
- //mysql_select_db("$db_name")or die("cannot select DB");
- // put your code here
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement