Hi,

Had a similar problem when building upload progress bar. Initially i used cookies but that had a few minor hiccups. What you can do is to encode your variables into the query string. This is accessible as part of the env. variables. Since you are familiar with C++ you will get the hang of PHP very quickly.

oh and btw the correct way to set a cookie is with session_register(), $_SESSION is used for retrieval.

all the best



John Bryan wrote:

I need to use something like a session variable to make a variable available to an existing form-invoked C++ program which takes as input a file being uploaded. Is this even do-able ?? If so, what am I missing here ???

The C++ prog used to use the REMOTE_USER env var set by the web server but we are no longer doing authentication via the webserver itself, so this one does not get set, and I need to set something myself. The C++ prog would had been grabbing this by getenv("REMOTE_USER").

I was trying some php to set a session var 'UPATH' but the UPATH variable doesn't seem to be visible to MyCppProg.exe :

--snip--

<?php
$_SESSION['UPATH'] = 'foobar';
?>

<form enctype="multipart/form-data" action="MyCppProg.exe" method="post">
 File to Upload: <input name="file" type="file"> <input type="submit" value="Send">
</form>

--snip--

I am new to php, have been digging around on the web, and not making a lot of headway quickly enough, so I'm asking.

Thanks,
JB





--
http://www.raditha.com/php/progress.php
A progress bar for PHP file uploads.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to