URL item to PHP

P

Petyr David

I would like to pass a URL parameter into a 1 line PHP script embedded
in my HTML

something like:

https://servername.bigco.com:9443/dev/searchit.html?search_dir=/var/data/monthly

Ideally the value of search_dir (/var/data/monthly) would be passed
to the php script

Something like this:

?>php

passthru("/var/www/cgi-bin/getdirnames.pl $search_dir");

Right now getdirnames.pl has a hard coded directory name. It does a
find, comes back with directory names and then formats the returned
strings as HTML checkbox tags. The passthru prints the perl script's
output to the HTML

I'd like to make the whole process dynamic

TX - hope that was clear
 
L

-Lost

Petyr David said:
I would like to pass a URL parameter into a 1 line PHP script embedded
in my HTML

The location object can help you in this regard (location.hash, location.search).
I'd like to make the whole process dynamic

XMLHttpRequest (aka Ajax, well actually, Ajax is based on the XMLHttpRequest object).

http://www.jibbering.com/faq/#FAQ4_44
TX - hope that was clear

Well, it was definitely clearer than why you are using PHP to call a Perl script from
JavaScript. But hey, I have done weirder shite.

-Lost
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top