Jump to content


Photo

adding javascript value to session


  • Please log in to reply
3 replies to this topic

#1 khan kaka

khan kaka
  • Members
  • PipPipPip
  • Advanced Member
  • 40 posts
  • Locationaustralia

Posted 02 August 2004 - 12:21 PM

hi every one

can any one tell me how i can add the value of javascript to session variable.

here is my code. the calender output from javascript is in foreign language.
soo i need to add the value to php session.

******************************
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript" src="date.js" type="text/javascript"></script>
</head>
<body><table width="63%" border="1">
<tr>
<td bgcolor="#CC3300"><script language="">
document.write(dayf+" "+roozf+" "+mahf+" " + sal);

</script>

<?php
$vari= "value";
$_SESSION['FirstName'] = $vari;
?>
**********************************************************
how can i assign the value of ( $vari )with output from <script language="">
document.write(dayf+" "+roozf+" "+mahf+" " + sal);
</script>
************************************************************
</td>
</tr>
</table>
<p><a href="secound.php">next </a></p>
<p>&nbsp;</p>
</body>
</html>
***********************************************

thanks in advance

khan kaka

#2 Danno13

Danno13
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 03 August 2004 - 10:13 AM

You could mabye try this.

<?php 

echo "<script>";
$vari = echo "document.write(dayf+" "+roozf+" "+mahf+" " + sal);";
echo "</SCRIPT>;

$_SESSION['FirstName'] = $vari;

?>


#3 khan kaka

khan kaka
  • Members
  • PipPipPip
  • Advanced Member
  • 40 posts
  • Locationaustralia

Posted 03 August 2004 - 01:18 PM

it gaves me an error message soo its not working. :( :( :(
khan kaka

#4 khan kaka

khan kaka
  • Members
  • PipPipPip
  • Advanced Member
  • 40 posts
  • Locationaustralia

Posted 03 August 2004 - 01:21 PM

You could mabye try this.

<?php 

echo "<script>";
$vari = echo "document.write(dayf+" "+roozf+" "+mahf+" " + sal);";
echo "</SCRIPT>;

$_SESSION['FirstName'] = $vari;

?>

its not working <_< ;) :( :blink: :unsure: :huh:
khan kaka




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users