Jump to content

Genosuki

New Members
  • Posts

    2
  • Joined

  • Last visited

Genosuki's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, I am having variable like: $requestid = $con->real_escape_string($_GET['id']); and i open my page like http://www.mywebsite.com/file.php?id=ID i would like to have page like http://www.mywebsite.com/ID Can you guys give me some tip/snippet? Thanks!
  2. Hello, so i made table with Tags row which is Text(126).. and idea is to put text like "PHP, MySQL, Forum, Blog" etc etc... I have problem searching tags my search code: $requestedtag = $con->real_escape_string($_GET['tag']); $sql = "SELECT * FROM images WHERE tags = '$requestedtag' ORDER BY ID DESC LIMIT 12"; $result = $con->query($sql); if ($result->num_rows > 0) { while($row = $result->fetch_assoc()) { $image_id = $row["ID"]; $image_title = $row["Title"]; $image_url = $row["ImgURL"]; $image_tags = $row["Tags"]; echo '<div class="col-3"><div class="thumb"><a href="/image.php?id='.$image_id.'" title="'.$image_title.'"><img src="'.$image_url.'"></img></a></div></div>'; } } But it doesnt return anything. I think the problem is that row["Tags"]; is divided by "," from tags and i should split it somehow but i dont really know what to do...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.