Update index.php

This commit is contained in:
Klug 2016-07-05 13:39:21 +00:00
parent beec63a50f
commit c4da4f6362

View File

@ -4,14 +4,16 @@
<?php
$con = mysqli_connect("localhost", "etherpad", "MyEtherpad17!", "etherpad") or die("FAIL");
$con = new mysqli("localhost", "etherpad", "MyEtherpad17!", "etherpad");
if ($con->connect_errno){
die("FAIL");
}
$query = 'select distinct substring(store.key,5,locate(":",store.key,5)-5) from store where store.key like "pad:%"';
$result = $con->query($query);
while($row = mysqli_fetch_array($result)){
while($row = $result->fetch_row()){
echo "<a target='_blank' href='http://pad.wiai.de/p/".$row[0]."'>".$row[0]."</a><br/>";