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

Popular posts from this blog

razor - Is this a bug in WebMatrix PageData? -

c# - How to set Z index when using WPF DrawingContext? -

c# - Cloning WPF controls and object hierarchies -