Skip to main content
Participant
May 6, 2006
Question

How to re-direct to another location and pass a variable

  • May 6, 2006
  • 1 reply
  • 277 views
I have made a simple search for my site, but depending on the article_id returned depends on where the link to the article will point.

I have used an if else statement to do this, but I need the link to pass one of the search variables.

If idcat_art does equal 1 then how do I make it put in this code:

<p><a href="recruitarticles_read.php?id_art=<?php echo $row_rs_search_results['id_art']; ?>" class="green">...read more </a></p>

instead of the 'echo "It's in Search and Selection";' it currently does

Thanks for any help,

Full code below:

This topic has been closed for replies.

1 reply

Inspiring
May 7, 2006
<?php if ($row_rs_search_results['idcat_art'] == 1 ) {
echo "<p><a href='recruitarticles_read.php?id_art=" .
$row_rs_search_results . "' class='green'>...read more </a></p>";
else {
echo "In another category.";
}?>

--
Gareth
http://www.phploginsuite.co.uk/
PHP Login Suite V2 - 34 Server Behaviors to build a complete Login system.