Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 18th, 2004, 06:44 AM
Friend of Wrox
Points: 1,288, Level: 14
Points: 1,288, Level: 14 Points: 1,288, Level: 14 Points: 1,288, Level: 14
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2004
Location: Stockholm, Sweden
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default Different objects send in links

I a have a page is which is fulfil by user and given a login name as the login is unique so if the login is already there then there is error and must back to give another login but how I can store other information



<%



     strSQL = "SELECT * FROM Employee WHERE LoginID ='" & request("login") & "' "
    set objRS2 = objDataConn.execute(strSQL)
    if not objRS2.eof then

    [u]page = "AddEmp.asp?Login=" & request("login") & "name=" & request("name")
    Response.Redirect(Page)</u>

    else
     strSQL2 = "Insert into Employee(LoginId,Password, Name , FatherName, NIC, Tlelephone, Mobile , Email, Address, Department, Designation, Salery, IsAdmin ) values ('" & request("Login") & "','" & request("Password") & "', '" & request("name") & "', '" & request("fname") & "', '" & request("nic") & "', '" & request("Tele") & "', '" & request("Mob") & "', '" & request("email") & "', '" & request("Address") & "', '" & request("Department") & "','" & request("Designation") & "', '" & request("Salery") & "' ,'" & request("IsAdmin") & "')"
     set objRS2 = objDataConn.execute(strSQL2)
     end if




Response.Redirect("Admin.asp")

    %>
the underline are not given the feild of name.
Is there any other solution or wat
Please send me immediately
Already thanks for your coopration


Love 4 all
__________________
(*_*)

Numan
--------------------------------------------------
It is not important what you get But important is&nbsp;&nbsp;how you got it
 
Old June 18th, 2004, 07:41 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cochin, Kerala, India.
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

A change in the page structure is needed.

You have a registration page which checks the details of the visitor submitted through a page say - registration.asp. Let that page be registrationFB.asp. i.e. registration.asp collects the visitor details initially and submits to registrationFB.asp

You have a page which will be shown after successful registration. Let that page be welcome.asp

The form on registrationFB.asp should submit to the same page. The code structure in registrationFB.asp is as follows.

' Collect the posted values from registration.asp in variables

' The validation script

' Initialize a variable strErrorMessage as an empty string. (strErrorMessage="")

' check whether fields are empty.

' check whether login exists.

' after each validation check you need to concatenate the error message to the variable strErrorMessage.

' if(strErrorMessage="") then

' show the error message

' show the form. In the form show the values. You can get the values from the variables into which you stored them at the beginning of the page. Please remember that this form gets submitted to registrationFb.asp.

' else

' go to welcome.asp

' end if
 
Old June 18th, 2004, 07:57 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Are you trying to pass both the login and the name field to AddEmp.asp?

If so, you should add an & before the name, so it is passed as a valid QueryString parameter....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Legs (Graham Massey Mix) by Art Of Noise (Track 9 from the album: The Fon Mixes) What's This?




Similar Threads
Thread Thread Starter Forum Replies Last Post
Send URL request to send sms via NowSMS deco BOOK: Professional VB 2005 ISBN: 0-7645-7536-8 0 February 16th, 2008 02:45 PM
AutoSuggest and Links gt96 BOOK: Professional Ajax ISBN: 978-0-471-77778-6 1 July 4th, 2006 04:58 PM
List of Links chrome47 BOOK: Professional CSS: Cascading Style Sheets for Web Design 2 December 12th, 2005 10:37 PM
Issues with Links bmains Forum and Wrox.com Feedback 3 September 6th, 2004 03:15 PM
Broken Links kilika Forum and Wrox.com Feedback 1 September 15th, 2003 10:01 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.