Page 1 of 1

stuck php GET

Posted: Tue Oct 21, 2008 1:47 am
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:

Re: stuck php GET

Posted: Tue Oct 21, 2008 2:09 am
by jaoudestudios
Whats wrong with your GET?

Re: stuck php GET

Posted: Tue Oct 21, 2008 2:13 am
by papa
Show us how you get the get var. :)

Re: stuck php GET

Posted: Tue Oct 21, 2008 4:22 am
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.

Re: stuck php GET

Posted: Tue Oct 21, 2008 4:25 am
by aceconcepts

Code: Select all

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

Code: Select all

 
<?php echo $row[2]; ?>
 

Re: stuck php GET

Posted: Tue Oct 21, 2008 4:37 am
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.

Re: stuck php GET

Posted: Tue Oct 21, 2008 4:45 am
by aceconcepts
D'oh - I'm far too hasty.

Good call :D