PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I need to embed a href associated with the ['cardID'] output. So if this table has 4 records displayed, I'd like for the user to click on the desired 'cardID', and use the selected cardid for a query to display all the data associated with that cardID on another page.
Last edited by Benjamin on Tue Jul 26, 2011 1:00 pm, edited 1 time in total.
Reason:Added [syntax=php|sql|css|javascript] and/or [text] tags.
My two remaining questions are, two fields being displayed, cardID and bill_last_name. When I place the cursor over the cardID display, it does not change. When I place the cursor over the bill_last_name, the hyperlink works their. Why does it only work on the one field? Second, on test \"test.php?cardID={$row['cardID']}\", I understand after parsing that statement will look like test.php?cardID=00002. Within test.php, how do I use cardID=0002?
Last edited by Benjamin on Tue Jul 26, 2011 1:01 pm, edited 1 time in total.
Reason:Added [syntax=php|sql|css|javascript] and/or [text] tags.
Basically, to turn something into a hyperlink it needs to be wrapped up inside an anchor element, just like you tried to do in the second column. Also note that you appear to be missing the end tag </a> in the second column (around $row['bill_last_name'], that is).
<!-- Opening tag --> <!-- Text in between --> <!-- Closing tag -->
<a href="http://website.com"> Please click on this link! </a>
There are some good tutorials to help you learn HTML here. To answer your second question you will need to inspect the $_GET array from within test.php, more on that here.