Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $servername = "localhost";
- $username = "ronnydar_admin";
- $password = "Somnifer123";
- $dbname = "ronnydar_hr";
- // Create connection
- $conn = new mysqli($servername, $username, $password, $dbname);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- $sql = "SELECT * FROM pics ORDER BY RAND() LIMIT 1";
- $result = $conn->query($sql);
- if ($result->num_rows > 0) {
- // output data of each row
- while($row = $result->fetch_assoc()) {
- $id = $row["id"];
- $dir = $row["dir"];
- $likes = $row["likes"]
- } else { //LINE 23
- echo "0 results";
- }
- $conn->close();
- ?>
- ================
- Error Log
- ================
- [22-Jan-2017 17:15:18 America/New_York] PHP Parse error: syntax error, unexpected '}' in /home/ronnydar/public_html/hrate/index.php on line 23
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement