Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home1/mutation/public_html/projects/validate.js/downloadCounter.php on line 9

how to use addRules() and Apply()

<scritp type="text/javascript" src="validate.js"></script>

<script type="text/javascript">
var myForm = new Validate();
myForm.addRules({id:'firstname',option:'required',error:'Le champ nom est obligatoire.'});
myForm.addRules({id:'email',option:'email',error:'Le champ email doit contenir une adresse mail valide.'});
if you use : myForm.Apply() errors will be returned to alert window
and if you use myForm.Apply('error_div') errors will be returned into DIV with id='error_div'
if your form is correct it will be submited to the specified url (<form...action="sendtopage"...>...</form>)
<form id="form1" method="post" action="sendtopage" onsubmit="return myForm.Apply()">
first Name : <input name="firstname" type="text" id="firstname" /><br />
your E-mail : <input name="email" type="text" id="email" />
<input type="submit" name="Submit" value="Submit"/>
<scritp type="text/javascript" src="validate.js"></script>

<script type="text/javascript">

//call the javascript library "validate.js"

var f = new Validate();



Must contain http:// , https:// , ftp:// Or ftps://
chars caseSensitive
min : Max : 0 -> 10 (range)
positive or negative