If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > PHP > Validaton form, checking number

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-26-10, 09:25
vladakg vladakg is offline
Registered User
 
Join Date: Aug 2010
Posts: 9
Exclamation Validaton form, checking number

I wanna comments on my site, and I want to eventually respond to the visitor antiboot question, ie. that brought together two numbers. I've created two variables, rand1$ and $rand2 (these are random numbers you get using the f-is), and $ rand3 is the sum of these two numbers. Now, I did that to me all the checks in the form (if the name entered, if the correct e-mail, is it left to comment), but can not make that we make sure that the number of visitor who enters identical $ rand3 number.

In this way, for example. checking whether the visitor entered the name:

if ((name.value==null)||(name.value=="")){
alert("Niste uneli ime!")
name.focus()
return false
}


In this way, and I tried to check the number entered by the user:

if ((rand.value==null)||(rand.value!=="$rand3")){
alert("Niste odgovorili tacno na pitanje!")
rand.focus()
return false
}

Otherwise, the rand, the name of the field where the user should enter the number. Does anyone know how this can I check with javascript?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On