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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -