FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


php or python question about some processing.





Erik23a86
I have a question about processing some html/javascript data. If I have a small javascript script with an array which contains some data, how do I get this data in a php or python (whatever you like Razz) variable, so I can, for example save it to a file? I know I can post the data to a php/python script and process it there, but isn't there a way to catch the variable and process it without having to post it?

Erik
qscomputing
I assume you are asking about a webserver / webpage setup.

You get data into your server-side program using HTTP POST and GET.

In PHP, you get a POST variable through $_POST['varname'] and a GET variable through $_GET['varname']. Have a look in the PHP manual at php.net for more information on those.

HTH.
Erik23a86
I don't mean how to get the POST variable. I mean this something like this:

<some html code>
<javascript start>
var arrayVar = new Array();
arrayVar[0] = "bla"
<javascript end>
<?php
$phpVar = arrayVar[0] //This is what I mean. How do I get a javascript
//variable in a php (or python) variable?
?>
Erik23a86
Ok. I this this might not be possible :S. But I have a new question Very Happy.
How do I POST a JavaScript array? POSTING the data in the array.

Erik
Related topics
PHP Editing Question
Programming links, info, and tutorials
PHP magic_quotes_gpc question
Please help with php-quick question
php, css question (wordpress)
php nuke question
php/sql question
Integrating VC++ and PHP
The last foolish PHP/MySQL Question of the Year....
php script to set up ftp users on linux
PHP MySQL Question
PHP Form Question
J2EE , PHP , Python and Web development. Does it have scope?
PHP Form Processing Problem
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.