Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="tree">
- <ul>
- <li>
- <div><input type="checkbox">181210-1-105547-1<br/> <button> Test Btn </button></div>
- <ul>
- <?php
- $host = 'localhost';
- $name = 'mlm';
- $user = 'root';
- $pass = '';
- $dsn = 'mysql:host=' .$host .';dbname=' .$name;
- $options = array(
- PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
- PDO::ATTR_PERSISTENT => true
- );
- $conn = new PDO($dsn, $user, $pass, $options);
- function displayChildren($parent) {
- global $conn;
- $stmt = $conn->prepare('SELECT * FROM accounts WHERE sponsorUpline = ?');
- $stmt->bindValue(1, $parent);
- $stmt->execute();
- while($row = $stmt->fetch(PDO::FETCH_OBJ)) {
- echo '<li></div><input type="checkbox">' .$row->serialNumber .'</div></li>';
- displayChildren($row->serialNumber);
- }
- }
- displayChildren('181210-1-105547-1');
- ?>
- </ul>
- </li>
- </ul>
- </div>
Add Comment
Please, Sign In to add comment