Jump to content

[SOLVED] <a href="temp.php"?temp=.value. "></a> Does not read the value in newpage


surajkandukuri

Recommended Posts

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.