0

I am trying to successfully make my login form work. this is my activation.php file. little help here pelase :).

This is my code (sorry about not creating the snippet code as I couldn't find the website to create it with):

   <?php
   $servername = "localhost";
   $dbname = "dbtechnerdzzz";

   // Create connection
   $conn = new mysqli($servername, $dbname);
   //Check connection
   if ($conn->connect_error) {
      die("Connection failed: " . $conn->connect_error);
   } 

   $sql = "SELECT * FROM accounts";
   $result = $conn->query($sql);

   if ($result->num_rows > 0) {
   // output data of each row
   while($row = $result->fetch_assoc()) {
     echo "id: " . $row["UserID"]. " - Name: " . $row["Username"]. " " . $row["Password"]. $row["Email"]. " - Name: " . $row["CreatedOn"]. " " . $row["DateOfBirth"]. "<br>";
       }
    } else {
       echo "0 results";
    }
    $conn->close();
    ?>
  • Where is line 15 ? Can you please paste and format code so that others can even look at your problem ? ;) – Tushar Gupta Jul 13 '16 at 19:05
  • i use to have the website where i could copy and paste the code as a url. as i am woking on a new pc, i can't remember what that websites called. if provided i can neaten it up. –  Jul 13 '16 at 19:09
  • line 15 is : if ($result->num_rows > 0) { –  Jul 13 '16 at 20:17

0 Answers0