Backend for songs.zachdecook.com
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
<a href=".">Go back</a>
<?php
$db = new SQLite3( "db/favs.db");
$name = str_replace("'", "", $_GET['name'] );
$res = $db->query("SELECT * FROM favorites where name='$name';");
if ( $res )
{
echo "<ul>";
while ( $ar = $res->fetchArray() )
{
$song = str_replace( "'", "", $ar['song'] );
$song = strip_tags( $song );
echo "<li><a href='./?song=$song'>$song</a>";
}
echo "</ul>";
}
|