Function To Check The User Input From A Form

write a simple function to check the user input from a form. I need to check that the string contains only numbers, has a maximum leght of say 15 and that the first number is zero.

View Replies


ADVERTISEMENT

Spell Check User Input

I want to add the "Did you mean" - Google feature to searches on my
website.

My website lets users search for a business using different
parameters.

If there is no match, I want to do a spell check on the entered
parameters.

I need to be able to check words with an english dictionary as well as
add words(business names) to the dictionary. Code:

View Replies View Related

Check For Blank Form Input

I'm working on a form where the user is not required to fill out every text input. How mught I check for that in an ASP script. Here's what I have:

If Request.Form("mp3title1") == ""
amnt = 0;
Else If Request.Form("mp3title2") == ""
amnt = 1;
Else If Request.Form("mp3title3") == ""
amnt = 2;
Else If Request.Form("mp3title4") == ""
amnt = 3;
Else If Request.Form("mp3title5") == ""
amnt = 4;
End If

Pretty straight forward, its checking in order if the first element is left blank, is the correct technique:

== "", or is there more to it?

View Replies View Related

Manipulating User Input From A Form

I have a HTML page with a form on it. I have an ASP page that processes what a user has entered into the form (updates a database etc).

I now need a page that fits between these two pages to pre-process�the users input. I need to do it this way because I am not allowed to change either of the two existing pages.

I know how to read what the user has input into the form and I know how to pass control onto the next page.

What I have not been able to work out is how to change the user input and have those changes passed onto the next page as if nothing has happened (that is, the original ASP page just performs its request.form(�item�) calls as it always has but instead of seeing what the user actually typed in, it should see the changed text as created by the new pre process� page)

I have tried using a regular expression replace but can only successfully make this change a variable and not the original form input. Equally I cannot find a way of swapping the original form input string with the output variable from the replace.

Does anyone have any ideas on this one?

View Replies View Related

'undefined' Form Input Value Inside JS Function

I'm developing an account lookup, mostly in ASP, that displays a list of radio buttons to select one account from those found in a recordset. Here is a snip of the account display, after the recordset is populated: Code:

View Replies View Related

Check Input To Be An Integer

I am trying to test a users input to be an integer. Is there a simple function that i can use. Here is a simplified version of my attempt.

dim numTestNumber
numTestNumber = 6
if isNumeric(numTestNumber) = false then
Response.Write "The input must be numeric"
Response.End
end if

if Cint(numTestNumber) then
Response.Write "The Number is an Integer"
else
Response.Write "The Number is not an integer"
end if

View Replies View Related

User Input

I'm using the following code and if someone enters something in the "instructions" field with characters -"', - it causes the SQL statement to change using those characters.

Dim strSQLadd
strSQLadd = "INSERT INTO orders" &_
"(form_number, orig_number, order_loannum, order_date, order_time, order_address, order_city, order_zip," &_
"order_contact, order_lockbox, order_agent, order_homephone, order_workphone, order_cellphone," &_
"order_legal, order_instructions, order_deliver, order_pay, order_altmail, order_appraiser) " &_
"VALUES (" & FormNum & "," & OrigNum & ",'" & CaseNum & "','" & OrderDate & "','" & OrderTime & "','" & pave & "','" & City & "','" &_
Zip & "','" & Owner & "','" & LockBox & "','" & Agents & "','" & BorHmP & "','" & BorWrkP & "','" &_
BorCellP & "','" & Legal & "','" & Instruct & "','" & DeliverType & "','" & Payment & "','" & AltMailType & "','" & AppName &"');"
objconn.Execute (strSQLadd)

View Replies View Related

Getting User Input Via Email

Does anyone know if its possible to create and email HTML
forms. Email recipients would then input information to
these forms in the same way that they would on a web
page. Pressing the submit button would mail the form
back, after which it would be separately submitted to an
ASP page on the web server for processing.

The main reason for this is so we don't have all the
issues associated with firewalls and security to deal
with. Our corporate mail servers will strip out viruses
so that not a problem.

View Replies View Related

Retaining User Input...

I have a form that I am trying to append to include a CAPTCHA validation field.

I have added the CAPTCHA code to the end of the form itself and now I am struggling to make the processor do a couple of things:

***If the CAPTCHA validates as well as all the form input data>>confirmation page and send appropriate email.

***If the form is filled out, but the CAPTCHA authentication is wrong>>go back to the same page, keep the form filled out, and give one more chance to correctly enter the CAPTCHA field.

***If the form is being spammed.......fail and die gracefully.

Here is the processor code thus far: Code:

View Replies View Related

User Input Validation

What is the best way to handle user input into a form which passes info to an .asp application. The problem I have is if somebody enters in "dave's" the asp code breaks because of the ' in the input field. What is the best way to handle this kind of input?

View Replies View Related

Calendar With User Input

ASP without Access database (my webserver does not support this). I'm looking for some ASP code that can show a calendar on a webpage. The people looking at the page should be able to type in a small message and a date and then send the info to the webpage. which then updates itself.

I have a more specific example of my needs. Often when I need to arrange a meeting with friends, then I send out a mail to ex. 10 persons. They can choose between 3 different days and I want to find the day that most people can come.

Instead of getting mails back and evaluate thise, I would like them to make their reservation on the asp-webpage. This way the others can follow the "favorite" day that is accurring when a few people has typed their favorite meetingday. Hope this was understandable.

View Replies View Related

User Input Validation In ASP

I have forms and photo upload features in my website. I'm using IIS 5.1 in Windows XP Pro. What do I need to add into my code to validate user input? I had SQL injection attack before, now I use replace function to remove any malicious words such as SELE, DELE, Ad, etc.. to prevent SQL injection attack. Are there any other attacks which it can be triggered in a text input field? What do I need to do to prevent it?

I also have a photo upload feature, it allows user upload photos to my table and the photo will be displayed in the gallery. How can I validate the user upload file is image file only? I mean user might be able to upload malicious scripts, virus to my server. How can I prevent that?

View Replies View Related

Validating User Input (Time)

I have written a function to validate user input, so that it properly returns a valid time if the user inputs 1600 or 16:00 or 4:00 pm the time is properly formatted (it may need a little more tweaking, but you get the idea) This is the function : Code:

View Replies View Related

Database Function Input

So far I've been using Sets to read information from the database (Set RS = Server.CreateObject("ADODB.RecordSet") and RS.Open queryString, Conn)

I've got a situation now where I have a function which returns just a single value. I call this function using "SELECT myFunction(parameters)". I can't use a result set to retrieve the function return value, can I? How should I do it?

View Replies View Related

Validating User Input To Avoid Attacks

I am working on a web application that uses both asp classic and asp.net
pages. We need to validate user input to avoid attacks like sql injection.
Can a component be created that both page types can use? Is that the best
approach? Would I simply use pattern matching to validate strings and/or
remove any unwanted characters?

View Replies View Related

Validate User Text Input Problem

This problem only occur when ppl using NetScape 7.2 I've tested it myself and it works in IE and it DOESN"T work in NetScape 7.2 Here is the code:

View Replies View Related

Treat User Input As Text Only (allowing The Apostrophe)

Isn't there some line of code that I can write to tell ASP to treat everything between BLAH and /BLAH as text (including the apostrophe). So that users can type a name of "O'Malley" in a form and I can retrieve it and store it in my database.

View Replies View Related

Check User

have a site with one asp page that sells a product. i have a thank you page that sells my product with a click on download.

how can i prevent a user from going to my url/tankyou.asp

and download it manually?

i want the user to download the product only in case he made it! i cannot control the sale pages as they are 3rd party credit card transactions and i do not have a database

View Replies View Related

Select Query According To User Input For A WebPage In C#.Net With SQL Server 2000

How to select query according to User Input for a WebPage in C#.Net with SQL Server 2000.I am trying to build a web page in C#.NET with SQL Server 2000 using Visual Web Developer 2005. I want to select and execute the query according to user input.

I have a form which has 2 textboxes which gets start date and end date from the user. Based on start/end date my 1st query runs. Now if user does not enter any start/end date I want to run another query which takes default dates from database(which is in varchar:ex. now()/now()-180) according to logged on user's permisstions.

How to select query ?

View Replies View Related

How To Check And See If The User Exist

how to check in ASP using SQL database for existing user. I have some idea like do a select but I need the syntax.

View Replies View Related

CHECK IF USER ALREADY LOGGED IN

below is an insert statement on an asp page that stores the date and time
that a driver logged on, what I need is to check that they are now already
logged on fields are SQL Server 2000

ID int
DRIVER_NO int
ON_DATE datetime
OFF_DATE datetime
ON_NOW nvarchar
SESSION_ID int

The ON_NOW column reads on or off depending whether the driver logged out or
not, if they havent we need to close the previous logon session and mark it
with 'off' and enter a date time into OFF_DATE column. Code:

View Replies View Related

Script To Check User Membership

I need VBscript to Check if user is a member of an Active Directory Group. I read about something called "MemberOf" to check that.

View Replies View Related

Check User Respone To OK/Cancel Box.

I have the following line of code in an asp.net app?

Response.Write("<script>ret = confirm('Print Orders?');</script>")

How can I check the value of the variable ret in asp.net? I want to be able to check the repsonse from the user before continuing with my asp.net code. Is this possible, or am I going about this the wrong way?

View Replies View Related

Check Is Current User Is Member Of A Group

I need to check to see if the Current logged in user on the system
is a member of a group called CustAdmin on CustNT Domain.

If the user is, I need to allow them to have access to the following:
Code:

<br><br>
<input type=Button value = "Click To View Credit Report"
</form>
<hr>

This is a Windows 2000 network.

View Replies View Related

How To Use Database To Check User Permission Level

i'm going to ask the way to use database to check user permission level in asp..

View Replies View Related

Split Function, Check If There Is A Space

I'm using the split function to split forename and surname, but sometimes there is no second name, is there any way of doing a check to see if there is a second part in the array?

this is the split:-
WordArray = Split(strUsername, " ")

View Replies View Related

How To Check User Account And Password In Another Domain Controller?

By using <authentication mode="Forms" > in web.config, we can create
self-designed login page, but how to check user's account and password is
vaild in another domain controller?

Does <authentication mode="Windows"> can have self-designed login page?

View Replies View Related

I Wan't Any Function To Update The Db Field When Checking A Check Box

is there any one know how to make function to update db field and to be called on checking a check books.

View Replies View Related

Check If User Is Register. How To Detect If Any Records Are Found In Database

I am having trouble trying to detect if no records are retrieved by the search. There doesn't seem to be a problem with the connection to the database or the SQL query. I think the problem is somewhere in my If statement. Code:

View Replies View Related

Form Input

How can I create a query based on the form input. I want to have a pulldown menu (list of states). The user can select the state, lets say VA and click on "go" button. I want the page to return results that has state=VA. So how do I create that statement and send to aspx ?

View Replies View Related

User Defined Function

I have to Execute a User Defined function from ASP page and also the function returns a varchar. Could someone help me out with the code for this.

View Replies View Related

Input Form Like Table

I want to have a form like a table of record. If I let user input number of record to be insert in advance, how can I make a form that having number of rows of input? For example:

Number of records : 5

Then I need a input form like a table with the column and 5 row like Excel format.

The form:

Title Row : No. | Dept ID | Emp ID | Base Salary |
Input Row1 : 1 | | | |
Input Row2 : 1 | | | |
Input Row3 : 1 | | | |
Input Row4 : 1 | | | |
Input Row5 : 1 | | | |

I'm thinking all my input will be array. Then when user submit I'll split it and insert to DB. Code:

View Replies View Related

Email Form Input

I have been ask to try a create a form on my works website to allow
teachers to fill it out the click button that emails to the boss

I thought asp is what need so i am very new to asp and with a lot of reading
from the net and books i got it to work :) but i tried to get too clever and
sent the user info to a page so the user can check for errors before
emailing but i cant figure it out and by fiddling too much i have stuff it
completely

can it even be done input info into form post that info to a new page
and then if the info ok email

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved