Web lists-archives.com

[PHP] How far out of practice am I? Look inside to find out!

Hey Everyone,

Been awhile and I"m realizing how out of practice I am! working on creating
a form, and depending on one of the options, I need to display a file that
I have stored. The file structure looks like:
index.php <--- Thats the form

Right now it's straight PHP and HTML, no database, no java, trying to keep
it simple first! :)

I have $_POST['selPosition'] which will hold the variable of the
department. Here is the basic code:

I'm using HEREDOC syntax FYI


        if(empty($_POST['txtName'])) {

                $nameErr = $errMessage;


              $name = htmlentities($_POST['txtName'], ENT_QUOTES);


        if (empty($_POST['selPosition'])) {

                $positionErr = $errMessage;


              $position = htmlentities($_POST["selPosition"], ENT_QUOTES);



echo <<<END


        <span class="error">{$positionErr}</span>


        <p class="showhide">Where will they be working?

                <select name='selWhereWorking'>

                        <option value=''>Please Choose</option>

                        <option value='OfficeFL'>In office in Gainesville

                        <option value='OfficeTX'>In office in Dallas

                        <option value='FromHome'>From their house</option>


        <p class="showhide">When will they start?<input type="text"
name="txtStart" value="{$startDa$

        Will they be in the corporate office for training the day they

        <Select class="showhide" name="selTraining">

        <option value="">Please select</option>

        <option value="Yes">Yes!</option>

        <option value="No">No</option></select>


        <p class="showhide">Shipping Address: <input type="text"
name="txtShippingAdd" value="{$ship$

        City: <input type="text" name="txtShippingCity"
value="{$shippingCity}"> <BR />

        State: <input type="text" name="txtShippingState" size="2"

        Zip: <input type="text" name="txtShippingZip" size="5"
value="{$shippingZip}"><BR />

        Current Phone Number: <input type="text" name="txtCurrentPhone"


        <p>Standard Equipment:</p>


echo "/includes/".$position.".inc";

So the file exists in /includes/LES.inc and it populates it properly. I've
tried echo, I've tried include"/includes/".$position.".inc"; and I can't
figure out what I'm missing...

Any ideas?

Thanks Everyone!