Pass variables from the script to php

Hi,

How do i pass the variables color, city and food to the mypage.php? I am able to get ‘name’ and ‘age’. I want to be able to pass all the variables mentioned in the script.

<script type = "text/javascript" src="mypage.php?name=test&age=23">
var color = "red";
var city = "london";
var food = "seafood";
</script>

Thanks!!!

It depends in which order you are trying to do what.
I suppose the first question would be, why not:

mypage.php?name=test&age=23&color=red&city=london&food=seafood

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.