Hi,
New to all this but enjoying it!
I have an upload form for images where the Action is set to a perl cgi script which then
uploads the images and then redirects with this line
$redirect= "http://www.mysite.com/db_genpicaddrecords02.php";
to a second form page that is used to send the filename of the image to the database.
I want to access the form variable "$picture" to get the image filename into the form
on the second page but seem to loose it because of the perl upload script in between.
If I set the form action of page one to the second PHP page and not the upload script I can access
the variable (see code below) but not upload.
Is there any way to get the form variables from what is in effect the "third page"?
Hope I make sence.
Thanks
David.
<?php
$default = "defaultimage.gif";
$filename = basename ($picture); // $filename is set to "filename.jpg"
if ($filename != "")
$default = "";
?>
<form name="form1" method="post" action="">
<input type="text" name="textfield" value="<?php echo $filename; ?><?php echo $default; ?>" >
<br>
</form>
<?php echo basename ($HTTP_POST_VARS['picture']); ?> // this gets the variable also.