Ok, please remember that this is "free advice", not "customer support". Also I think your frustrations are from a common dilemna with learning PHP, HTML, etc. You start learning it out of necessity for a project with a looming deadline. As a result, you're in a hurry to get it working and don't have time to learn it.
I am in the same boat. I have a project due, but I have basically dropped everything for a week just to start learning PHP. I started from scratch and learned the functions one by one before I tried to download existing scripts and figure them out.
Ok, I talked about sessions and intermediary PHP pages, etc. etc. Well I just looked at your scripts and you don't have to worry about either of those. You're not trying to "pass the information twice". So let's ignore the sessions, etc. for now.
First step is check out File Uploads chapter in the PHP manual.
http://www.php.net/manual/en/features.file-upload.php
You'll see that your <form> must have a special encoding type if you are submitting a file.
<form enctype="multipart/form-data" action="URL" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="1000">
Send this file: <input name="userfile" type="file">
<input type="submit" value="Send File">
</form>
Unfortunately, I don't know enough about mail to help you with the rest of your script, but it looks like the information is being passed correctly.
Now, you were asking about conditional blocks. It's really easy. Ok, you have your form (I looked at your ZIP file) with a million fields that can be entered, including several files.
Imagine two entirely separate blocks of HTML and PHP code in there. In other words, "receipt" is folded into your form.
Here's how you do it:
// html headers to start the page, but stop before displaying the form
<?php
if(!isset($_POST['submit'])) {
?>
// there is no form being submitted, so display your form here
<?php
} else {
?>
// there WAS a form submitted, so it's time to process it and display a "Thanks for filling out the form." message.
}
You asked how to use the elvis.php?city=nashville&music=blues and how to get the values of "city" and "music"...
You know how every item you include in a <form> such as
<input type="hidden" name="MyEmail" value="models@rcw-online.com">
<input type="hidden" name="title" value="Application Model Submission">
are passed through to your receiving script (receipt.php) as:
$POST["MyEmail"]
$POST["title"]
well remember that $_POST is shorthand for $HTTP_POST_VARS. The keyword here is POST. Everything is passed through a certain way.
However, you'll notice that search engines often do their stuff through a longer URL like www.google.com/search.php?keywords=elvis+graceland&resultsperpage=10&sortby=date
Well you can harvest the values of "keywords", "resultsperpage", and "sortby" with GET like this:
$GET['keywords']
$GET['resultsperpage']
$_GET['sortby']
You need to check whether these values even exist by doing:
if(!empty($_GET['keywords'])) {
// Do stuff with the keywords
}
if(!empty($_GET['resultsperpage'])) {
// Set our loop to only do this # per page
}
etc.