Hi,
I have two html pages and I'm trying to use one of the variables in the first html page in the second html page..how can I do this?
thanks in advance
how can I use a variable in an html doc in another html document?
Started by Diana86, Feb 02 2009 06:28 AM
5 replies to this topic
#1
Posted 02 February 2009 - 06:28 AM
|
|
|
#2
Posted 02 February 2009 - 06:40 AM
i didnt realize html could store variables are you sure your not using something like PHP or javascript?
Posted via CodeCall Mobile
Posted via CodeCall Mobile
#3
Posted 02 February 2009 - 06:49 AM
ohh I appologize .. yea I have two pages.. the first html/javascript and 2nd is php .. how can I pass a variable that has been used in the html/javascript doc to the php document??
#4
Posted 02 February 2009 - 07:34 AM
Use JavaScript to submit data (either via GET or POST) to the PHP page, and then you can access it like this:
Replace $_POST with $_GET if you are going to store the data in the URL, rather than send it internally.
$data = $_POST["variablename"];
Replace $_POST with $_GET if you are going to store the data in the URL, rather than send it internally.
#5
Posted 02 February 2009 - 10:56 AM
To forwarding data that the user inserted just make the textbox or whatever into a form and make a submit button...


Sign In
Create Account


Back to top









