Jump to content

Archived

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

khan kaka

adding javascript value to session

Recommended Posts

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> </p>

</body>

</html>

***********************************************

 

thanks in advance

 

Share this post


Link to post
Share on other sites

You could mabye try this.

 

<?php 

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

$_SESSION['FirstName'] = $vari;

?>

Share this post


Link to post
Share on other sites
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:

Share this post


Link to post
Share on other sites

×

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.