pingeyeg
asked on
Python's equivalent to PHP's $_GET request
I'm in the process of transitioning from Python over to PHP and have a question. What is the Python equivalent to PHP's $_GET request?
Thanks
Thanks
ASKER
Yep, read that one before. I should've explained more. I'm using jQuery to post a value to a Python file and from there, I'd like Python to take care of this request. That page deals more with a form submission rather than a jQuery change event. My code is as follows:
HTML
<div class="inputs">
Section:
<select name="section" id="section">
<option selected>--select section--</option>
</select>
</div>
jQuery
$(document).ready(function () {
$("#site").change(function () {
$.get("./scripts/functions .py", {"site": $("#site")}, function(resp) {
alert(resp);
});
});
});
HTML
<div class="inputs">
Section:
<select name="section" id="section">
<option selected>--select section--</option>
</select>
</div>
jQuery
$(document).ready(function
$("#site").change(function
$.get("./scripts/functions
alert(resp);
});
});
});
pingeyeg,
Could you please give some more details of what server setup you are exactly using.
Do you run python as a CGI or Fastcgi script?
Do you use python behind apache via mod_wsgi? (or via the older mod_python)
Or do you use a framework like django?
The answer depends on this choice.
Could you please give some more details of what server setup you are exactly using.
Do you run python as a CGI or Fastcgi script?
Do you use python behind apache via mod_wsgi? (or via the older mod_python)
Or do you use a framework like django?
The answer depends on this choice.
Just noticed, that the url that PranjalShah's posted gives examples for all of the above.
If you need clarification it would still be useful if you told us what your setup is.
I guess, that you use cgi or fastcgi, but can't be sure without your confirmation.
If you need clarification it would still be useful if you told us what your setup is.
I guess, that you use cgi or fastcgi, but can't be sure without your confirmation.
ASKER
I'm using cgi with no framework. From what I've learned, I really don't need a framework for what I'm doing since it would be too overkill.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
http://stackoverflow.com/questions/464040/how-are-post-and-get-variables-handled-in-python