surajkandukuri Posted October 19, 2009 Share Posted October 19, 2009 HI, This is my code <a href="temp.php?temp=.$emp_position[1].">Click </a> And when i Access temp value in temp.php page it gives me $emp_position[1] which should be the actual value Link to comment https://forums.phpfreaks.com/topic/178262-solved/ Share on other sites More sharing options...
mrMarcus Posted October 19, 2009 Share Posted October 19, 2009 your concatenation does not appear to be correct. try this: echo '<a href="temp.php?temp='.$emp_position[1].'">Click </a>'; i don't know the rest of your code, but try that. EDIT: you can now access 'temp' like so: $temp = $_GET['temp']; Link to comment https://forums.phpfreaks.com/topic/178262-solved/#findComment-939913 Share on other sites More sharing options...
surajkandukuri Posted October 19, 2009 Author Share Posted October 19, 2009 Hi mrMarcus, I still cannot get that working here is my code <tr> <td width="123"> Position #1 </td> <td width="275"> <?php echo($emp_position[1]);?> /<!--<a href="temp.php?temp=.'$emp_position[1]'.">Click here for detail report</a></td>-->/ <a href="temp.php?temp='.$emp_position[1].'">Click </a>; <td><?php echo($emp_startdates[1]);?></td> <td><?php echo($emp_enddates[1]);?></td> <td><?php echo($duration[1]);?></td> <td rowspan="6"><?php echo($totalwithrm);?></td> </tr> and in TEMP page my code is <?php echo("this is temp page"); $valuegot=$_GET['temp']; echo($valuegot); ?> IN THE OUTPUT i can see '$emp_position[1]' and it this value that is also sent in the url Link to comment https://forums.phpfreaks.com/topic/178262-solved/#findComment-939925 Share on other sites More sharing options...
jonsjava Posted October 19, 2009 Share Posted October 19, 2009 how about doing it this way: <tr> <td width="123"> Position #1 </td> <td width="275"> <?php echo $emp_position[1];?> /<!--<a href="temp.php?temp=.'$emp_position[1]'.">Click here for detail report</a></td>-->/ <a href="temp.php?temp=<?php echo $emp_position[1];?>">Click </a>; <td><?php echo $emp_startdates[1];?></td> <td><?php echo $emp_enddates[1];?></td> <td><?php echo $duration[1];?></td> <td rowspan="6"><?php echo $totalwithrm;?></td> </tr> Link to comment https://forums.phpfreaks.com/topic/178262-solved/#findComment-939930 Share on other sites More sharing options...
mrMarcus Posted October 19, 2009 Share Posted October 19, 2009 this should work .. just a very simple example .. copy this code into your code: <tr> <td width="123"> Position #1 </td> <td width="275"> <?php echo($emp_position[1]); echo '<a href="temp.php?temp='.$emp_position[1].'">Click here for detail report</a></td>'; ?> <td><?php echo($emp_startdates[1]);?></td> <td><?php echo($emp_enddates[1]);?></td> <td><?php echo($duration[1]);?></td> <td rowspan="6"><?php echo($totalwithrm);?></td> </tr> you just had your concatenation wrong .. check this tutorial out Link to comment https://forums.phpfreaks.com/topic/178262-solved/#findComment-939935 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.