Jump to content


Photo

[RESOLVED, thx!]Passing variable from table, through button, into function...


  • Please log in to reply
3 replies to this topic

#1 ridiculous

ridiculous
  • Members
  • PipPipPip
  • Advanced Member
  • 175 posts

Posted 11 October 2006 - 05:56 PM

Generally:
I have a table of several columns and I want to take a unique piece of data from each row and pass it into another php function for processing. I am trying to keep this data hidden to the viewer.

Specifically:
My objective is to insert a button into each row of my table below, and pass a variable I call $postid to the file get_job_details.php for processing.

I have a feeling the area I have highlighted is wrong in some way, because I am not able to pass the variable to my display function.

<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'?postid='postid'>
<img src='flesh/detailsbutton.jpg' alt='Details'</a></td>

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

    echo "</tr>";M

</code>

#2 ridiculous

ridiculous
  • Members
  • PipPipPip
  • Advanced Member
  • 175 posts

Posted 11 October 2006 - 06:16 PM

please help!

#3 ridiculous

ridiculous
  • Members
  • PipPipPip
  • Advanced Member
  • 175 posts

Posted 11 October 2006 - 06:55 PM

bump

#4 mainewoods

mainewoods
  • Members
  • PipPipPip
  • Advanced Member
  • 685 posts
  • LocationMaine

Posted 11 October 2006 - 08:30 PM

<td align=center>   <a href='get_job_details.php'?postid='postid'>
         <img src='flesh/detailsbutton.jpg' alt='Details'[/url]</td>
problems:
--img tag not terminated with &gt;
--no link terminating tag /a
--postid should be php variable(needs dollar sign)
<a href='get_job_details.php'?postid='$postid'>
the $postid variable would have to be set above by you





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users