First off, have you looked at using sessions? It's a convenient way to pass variables among pages.
But what you want to do is this. If your HTML is being written statically to the page (i.e. you're not inside <?php and ?> tags, then you echo it like so:
<INPUT TYPE="hidden" name="ProjectName" value="<?php echo $_POST['foldername']; ?>">
Now, when you submit the form, you will have a POST variable named "ProjectName" with the value of the foldername in it.
If you are inside php tags and you're echoing your HTML to the page, then it should work as you have it written. All you have to do is make sure your quotes are correctly escaped, like so:
<?php
echo "<INPUT TYPE=\"hidden\" name=\"ProjectName\" value=\"$_POST['foldername']\">"
?>
Could also use sprintf if you're inside your php tags:
<?php
sprintf("INPUT TYPE=\"hidden\" name=\"ProjectName\" value=\"%s\">", $_POST['foldername']);
?>
As you can see, there are a number of ways to do this. But if you have a variable or set of variables that you need to have access to, look into using sessions. It's a lot easier than keeping track of whether or not you sent something with POST all the time. Stick it in there once and your done. Hope that helps!
When all else fails, dump your POST array to the screen right away to see what you've got in there.
print_r($_POST);
If you don't see something in there that shouldn't be, then you know there's an issue with the form on the previous page. This has helped me several times.
James