0

Hello,

I'm working on a website which requires ALL fields to be filled before a user can download stuff.

How can i code the web form as such a user has to fill in their details before the download button becomes active or usable?

Help greatly appreciated.

regards,
Pabbzmike

3
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by karthik_ppts
0

Well if you want to do this in PHP its very simple...

<form action="downloads.php" method="POST" enctype="text/data">
<input type="text" name="Field1NAME" placeholder="First Name"/>

<input type="submit" name="SubmitForm" value="Continue"/>
</form>

downloads.php

<?php
session_start();error_reporting(E_ALL);

if(isset($_POST['SubmitForm'])){
if(empty($_POST['Field1NAME'])){echo 'Please fill in your name.'; die;}

//continue with whatever code you use for the form inputs, remember to use mysql_real_escape_string($_POST['Field1NAME']); if you are using database.


}
?>

If you want this with a javascript/jQuery effect, you should post in the JavaScript forum here on daniweb, or read some at the jQuery API.

Im no PHP wizard, but lets wait and see if ardav replies to you. He always gives you the correct answers

Edited by Sorcher: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.