Jump to content


Photo

[Resolved/HUGGIEBEAR=GOD]...pass multiple parameters from a query through...


  • Please log in to reply
2 replies to this topic

#1 ridiculous

ridiculous
  • Members
  • PipPipPip
  • Advanced Member
  • 175 posts

Posted 12 October 2006 - 11:37 AM

Hey guys. My script retrieves and displays the following table without incident. However, within that table I am trying to insert a button that carries row specific
variables to another page for processing. I believe there is a problem with the syntax in the line(s) highlighted.









-------------------------------------------------------------------------------
<code>

echo "
<td align=left> ".$row['date']."     </td>
<td align=center><b>".$row['title']." </b> </td>

<td align=center>  <a href='get_job_details.php'?$date=".$row['date']."
&$title=".$row['title']."&$location=".$row['location'].">
            <img src='flesh/detailsbutton.jpg' alt='Details'</a></td>


<td align=center> ".$row['location']." </td>";

</code>
--------------------------------------------------------------------------

As you can see, I'm trying to pass the outputs of each row as parameters through a button/href that hyperlinks to "get_job_details.php".

Any help on this would be killer.

#2 HuggieBear

HuggieBear
  • Members
  • PipPipPip
  • Advanced Member
  • 1,899 posts
  • LocationEngland, UK

Posted 12 October 2006 - 11:52 AM

It'd be easier to use heredoc syntax for this one:

<?php
echo <<<HTML
 <td align=left>{$row['date']}</td>
 <td align=center>{$row['title']}</td>
 <td align=center>
  <a href="get_job_details.php?date={$row['date']}&title={$row['title']}&location={$row['location']}">
   <img src="flesh/detailsbutton.jpg" alt="Details"
  </a>
 </td>
 <td align=center>{$row['location']}</td>
HTML;
?>

Regards
Huggie
Advice to MySQL users: Get phpMyAdmin and test your queries work there first, take half the hassle out of diagnosis, also check the reserved words list.

Links: PHP Docs :: RegEx's :: MySQL :: DevGuru :: w3schools

#3 ridiculous

ridiculous
  • Members
  • PipPipPip
  • Advanced Member
  • 175 posts

Posted 12 October 2006 - 12:10 PM

Thanks Huggie!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users