hello all,
i'm very new to php.
i have a php page(user.php) wherin i have a form with quite a few variables.
Basically the user is asked to fill in the form and once he fills it, i take him to a thank you page and he can download a file by clicking at the specified url. Below are the variables which use textbox:
Name: textbox
<input type="text" name="name_var">
Organization: textbox
<input type="text" name="organization_var">
Address: textbox
<input type="text" name="address_var">
City: textbox
<input type="text" name="city_var">
State: textbox
<input type="text" name="state_var">
Zipcode: textbox
<input type="text" name="zipcode_var">
Phone: textbox
<input type="text" name="phone_var">
Email address: textbox
<input type="text" name="email_var">
I also have 2 drop-down menus with some values. For example, under the district category, i have many values
<select size="1" name="district_var">
<option>districtname1</option>
<option>districtname2</option>
<option>districtname3</option>
</select>
how can i validate the form and check that he has entered some valid input in each of the above variables in the form? Please help me out. I'll be grateful to you if you cud provide me code for the above.
another thing..
after the form has been filled properly, i take them to another page(download.php) which has the url for downloading a ppt file. Now the thing is: On the page the url is very clearly specified i.e it is standard something like:
http://www.something.com/sth.ppt
I don't want the user to know the exact location of the ppt file. A user who hasn't filled the form may still be able to access the powerpoint file. I want to hide the exact location of the file. How do i do this? Thanks a lot. I appreciate your help.