stuck php GET

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!

Moderator: General Moderators

Post Reply
vita_ace
Forum Newbie
Posts: 9
Joined: Mon Oct 13, 2008 4:46 am

stuck php GET

Post by vita_ace »

$cnt .= '<td>'.$m_id.'</td><td>'.$u_name.'</td><td>'.$p_name.'</td><td>'.$hall_name.'</td>
<td>'.$date.'</td><td>'.$att.'</td><td><a href="module/report_detail.php?id=<?php echo $row[2] ?>"> Details </a></td></tr>';

im stuck....i want to pass the id value to another page...but i cant, anybody have some idea what else can be change at the red font?..pleaseee :idea:
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: stuck php GET

Post by jaoudestudios »

Whats wrong with your GET?
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: stuck php GET

Post by papa »

Show us how you get the get var. :)
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: stuck php GET

Post by requinix »

Syntax highlighting is really helpful.

Code: Select all

$cnt .= '<td>'.$m_id.'</td><td>'.$u_name.'</td><td>'.$p_name.'</td><td>'.$hall_name.'</td>
<td>'.$date.'</td><td>'.$att.'</td><td><a href="module/report_detail.php?id=<?php echo $row[2] ?>"> Details </a></td></tr>';
Anybody see it? It's in red.
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: stuck php GET

Post by aceconcepts »

Code: Select all

 
<?php echo $row[2] ?>
 
should be

Code: Select all

 
<?php echo $row[2]; ?>
 
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: stuck php GET

Post by onion2k »

Nice try Ace, but if you look at the start of the line you'll see it's actually a concatenated string ... the $row[2] variable shouldn't be wrapped in PHP tags at all because it's already in a PHP block.
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: stuck php GET

Post by aceconcepts »

D'oh - I'm far too hasty.

Good call :D
Post Reply