hi everyone,
how do i pass a value to the url in place of “#” in this code
$output .= '<a href="#">
<div class="S_image"> '."<img src='data:image/png;base64," . base64_encode($row['image']) . "' />".'</div>
<div class="S_name">'.$row['fname'].'
'.$row['lname'].'
</div>
</a>';
}
i want to pass a value to the url some thing like this
<a href=“index.php?name=‘.$row[‘fname’].’&.$row[‘lname’].'”></a>
how do i do this ?
Rubble
2
Untested but I would try this:
<a href="index.php?name=<?php echo $row['fname'].'&'.$row['lname']; ?>"></a>
solved
$output .= '<a href="index.php?page ='.$row['fname'].'">
<div class="S_image"> '."<img src='data:image/png;base64," . base64_encode($row['image']) . "' />".'</div>
<div class="S_name">'.$row['fname'].'
'.$row['lname'].'
</div>
</a>';
}
why is this not displaying the page value
<div id ="content">
<?php
if(isset($_GET['page'])){
$page = $_GET['page'];
echo $page;
}else{
echo " ";
}
?>
</div>
any ideas?
Rubble
6
It looks like it should work - I have just noticed you have a space between the page and the = it should be “page=” not “page =”