Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $servername = "localhost";
- $username = "'xxxxx";
- $password = "xxxxx";
- $dbname = "xxxxx";
- // Create connection
- $conn = new mysqli($servername, $username, $password); **//line 8**
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- } else {
- echo "no connection";
- }
- $sql = "SELECT * FROM pages";
- $result = $conn->query($sql);
- $data = array();
- $arr = array();
- if ($result->num_rows > 0) {
- // output data of each row
- while($row = $result->fetch_assoc()) {
- }
- } else {
- echo "No Token";
- }
- print_r(json_encode($data));
- $conn->close();
- ?>
- 1.CREATE USER 'user'@'localhost' IDENTIFIED BY '123456789';
- 2.
- 3.GRANT ALL PRIVILEGES ON project.* TO 'user'@'localhost' WITH GRANT OPTION;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement