anchor - passing href attributes to another php page -
.a little guys..
i have index.php page contains tags when clicked opens picture.php. .my picture.php page retrieves images database depending on idno.
.what want add "idno" attribute on anchor tag when user clicks tag index.php sends idno picture.php picture.php knows image fetch database. pls!
so anchor tag, this?
<?php $url = "pictures.php?idno=" . idno; echo "<a href=\"" . $url . "\">click me</a>"; ?>
now in pictures.php
file, can read id this:
$idno = $_get['idno'];
the thing watch out make sure sanitize input, before pass off database query aren't vulnerable sql injection attack.
Comments
Post a Comment