php - Variable Link in Mobile Site using PDO -
i'm building mobile version of site. in desktop version have variable links example.com/mybq-access-txt.php?id=200. how can implement in mobile site?
this have tried:
$db = new pdo('mysql:host=localhost;dbname=db;charset=utf8', 'user', 'pass'); foreach($db->query('select id,username,tag,message,timestamp,date mybq_post_txt_main `date` between date_sub(now() , interval 30 day) , now() order rand() limit 1') $row) { echo "<a href='#mybq-access-txt?id=$row[id]'>new text</a>"; }
it not load page (just stays there).
mybq-access-txt mobile equivalent of mybq-access-txt.php
you in url expect? looks have error in syntax.
echo "<a href='#mybq-access-txt?id=$row[id]'>new text</a>";
try:
echo "<a href='#mybq-access-txt?id={$row['id']}'>new text</a>";
Comments
Post a Comment