Jump to content

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


ridiculous

Recommended Posts

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>
[color=blue]<td align=center> <a href='get_job_details.php'?postid='postid'>
<img src='flesh/detailsbutton.jpg' alt='Details'</a></td>[/color]
<td align=center> ".$row['location']." </td>";

    echo "</tr>";M

</code>
Link to comment
Share on other sites

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.