Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

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

New Here ,
May 06, 2006 May 06, 2006

Copy link to clipboard

Copied

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:

TOPICS
Server side applications

Views

256
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 07, 2006 May 07, 2006

Copy link to clipboard

Copied

LATEST
<?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.


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines