Jump to content

[SOLVED] PHP Session-- how to save in it


watthehell

Recommended Posts

Please help on this..

 

<?php echo'<td class='.$class_bg.'>
		<table width="25" border="0" cellspacing="1" cellpadding="0" align="center">
		<tr>
                                                          <td> </td>
                                                          <td align="right" valign="top" class="'.$date_class.'"><a href="#" onMouseOver="doTooltip(event, msgTips)" onmouseout="hideTip();" class="'.$date_class.'">'.$i.'</a></td>
                                                          <td  style="width:3px">'.$_SESSION['mydate']=$i.'</td>
                                                        </tr>
                                                        <tr>
                                                          <td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                              <tr>
                                                                <td colspan="2" style="height:8px"></td>
                                                              </tr>
                                                              
                                                          </table></td>
                                                        </tr>
                                                    </table>
	  
	  </td>';?>

 

what i want is in this line

<td  style="width:3px">'.$_SESSION['mydate']=$i.'</td>

 

it displays the value of $i , i need it to store in session not to display it. It is showing the value of $i twice

 

$i is inside for loop and displays numbers from 1--30

 

help will be most welcome...

Link to comment
https://forums.phpfreaks.com/topic/68330-solved-php-session-how-to-save-in-it/
Share on other sites

<?php echo "<td class=".$class_bg.">

<table width=\"25\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" align=\"center\">

<tr>

              <td> </td>

              <td align=\"right\" valign=\"top\" class=".$date_class."><a href=\"#\" onMouseOver=\"doTooltip(event, msgTips)\" onmouseout=\"hideTip();\" class=".$date_class.">".$i."</a></td>

              <td  style=\"width:3px\">";

$_SESSION['mydate']= $i;

echo " </td>

    </tr>

    <tr>

  <td colspan=\"3\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">

  <tr>

<td colspan=\"2\" style=\"height:8px\"></td>

  </tr>

 

  </table></td>

</tr>

</table>

  </td>";?>

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.