hello again world

[php] <?php
if(!empty($request1)):
while($search_result = $request1->fetch(PDO::FETCH_ASSOC)){
var_dump($search_result);
$s = $search_result[‘id’];
///$GLOBALS["$search_result"];
?>

<h1>baaaaaa</h1>
<p><?= $search_result['cookie'];?></p>
<h3><a href="read.php?id=<?echo $search_result->id;?>"> <?= $search_result['says'];?></a></h3>

<?php }

endif;

?>[/php]

hello everytone been so helpful in my project
Here I have a while loop i got it working,
So i get results on search.
and I read online how to format the results be link to next page
and im struggling right now to pass the “id” number to next page,
so i was thinking to use $_GET, on the next page.
And sending the id in the browser but instead of the array var “id”
it returns “id;?>:” on the next page what am i doing wrong?
Anione knows?
It suppose to be an integer not id;?>.

I assume you don’t have short tags enabled (you shouldn’t).

so this wont work
[php]<?echo $search_result->id;?>[/php]

It must include PHP
[php]<?php echo $search_result->id; ?>[/php]

or use the shorthand echo (which works even without short tags)
[php]<?= $search_result->id ?>[/php]

Kindly use right syntax like <?php .... ?> because sometime <? this wont work and you get error

Sponsor our Newsletter | Privacy Policy | Terms of Service