[quote author=ksteuber link=topic=112686.msg457489#msg457489 date=1161796290] First of all. Large parts of this code flat out don't make sense to me. Lemme see if I can fix this up a little... [code] // $subject = "Facilities Request $type"; This line should be after $type is defined // ** Actually, it never had a problem with it, but I see your logic //Change this to html to make things easier later //This too //I don't see any good reason to use a different variable here // ** Surprisingly, all that error nonsense worked perfectly. I didn't see a reason for a second variable either, but it never recognized it as false. It refused to enter the final else statement and always took error as true. As soon as I made it a second variable and had it written that way, it recognized it. haha. There's probably something messed up elsewhere, but this works :D //Change this line to conform to change in variables above... //I'm not sure that mail() returns anything at all, and if it does, you don't use it anyways. // ** What do you mean mail() doesn't do anything? I thought it was the function that sent the form response to my email? //Don't print $errormsg here. Print it IN the html // ** That would clean it up a bit, but now I'm afraid it'll change how it displays it and I won't be able to fix it, haha //You already know what $error and $error2 are gonna equal, why globalize them here? And why change $error to false? // ** I was changing error to false incase it decided to remember it as true when it went through the next time. I think it was like that mostly because I was trying to find the bug with it not going through the else statement. Ideally, it should reset to false or stay true in the if statement anyways - so I see your point. //OK, I'm pretty sure you can't do this, because I think you only want the page to show this stuff if is executes error_out, and if you type it outside of the </?php, it'll show this one way or the other. This is // ** Actually, the function only appears in the if, elseif, so it'll only display the form again when you error. The first form display is another php file that posts to this one. lol. It's mostly because the error checking was a complete afterthought :D [/code] I haven't tried this yet, there may still be bugs, but was this what you were trying to do? [/quote] Thanks a bunch for the tips on the poor code, but somehow, someway, it all worked as it was perfectly well. ??? haha. [quote author=gmwebs link=topic=112686.msg457478#msg457478 date=1161795343] [code] <textarea name="request" rows="10" cols="43"><?php echo $_POST['request'] ?></textarea> [/code] [/quote] Wow, that was surprisingly easy! Damn. lol. Thanks! [quote author=HuggieBear link=topic=112686.msg457530#msg457530 date=1161799835] Try replacing just this bit of code: [code] <select name="type"> <option> Please Select Type of Request <option> - Maintenance <option> - Telecommunications <option> - Work Order <option> - Other </select> [/code] With this: [code] <select name="type"> <?php $dropdown = array("Please Select Type of Request", "Maintenance", "Telecommunications", "Work Order", "Other"); foreach ($dropdown as $option){ if ($option == $_POST['type']){ echo "<option value=\"$option\" selected=\"selected\"> - $option</option>\n"; } else { echo "<option value=\"$option\"> - $option</option>\n"; } } ?> </select> [/code] You should be able to just swap it straight out. Regards Huggie [/quote] Thank you so much! That code works great - I just wish I knew how it worked completely. If you have the time, could you explain it a little (mostly the if statement)? :) Thanks again to everyone! This was a really quick and knowledgable response!