2 questions:

Results 1 to 3 of 3

Thread: 2 questions:

  1. #1
    c.edlund@mail.utexas.edu Guest

    Default 2 questions:

    ok i have 2 questions: easy one first. how can i make a page display only the last row entered into a database table?<BR><BR>2nd question: k this is a follow up from the other day: I am trying to create an err. mssg for when a person does not enter anything into the email address field. here is the code i have for that: <BR> on the processing page: <BR><BR>if Email="" then<BR>errMsg= "no Email address found"<BR>response.redirect("UPDATE.asp?msg=" & Server.URLEncode(errMsg)) <BR><BR>else <BR> Response.redirect "thanks.html"<BR>end if<BR><BR>the other day someone told me to put in the "Server,URLEncode" part..i&#039m not sure what it&#039s supposed to do but it didn&#039t change anything. on the actual form page i have at the very top:<BR> &#060;% errMsg = Request.Querystring("errMsg") %&#062;<BR><BR>and then at the place i want the err. message put i have:<BR>&#060;% Response.Write (errMsg) %&#062; <BR><BR><BR>If i test this by not putting in my email address...it will indeed stay on that page and in the address i can see "../UPDATE.asp?msg=no+Email+address+found" <BR>so it&#039s processing it but i can&#039t acutally see the text for the error message. does anyone know why????<BR><BR>--Chrissy

  2. #2
    PratQ Guest

    Default RE: 2 questions:

    Answer to question number 2: You are passing Update.asp the variable MSG, but in Update.asp you are requesting the variable called ERRMSG. Change the MSG variables to ERRMSG or the ERRMSG variables to just MSG.<BR><BR>Answer to number 1 would depend on whether you are date/timestamping the entries (with a timestamp field) into the database table. Otherwise there is no definiate way to determine what the last record was. A "select *" without any order by, *MAY* return the records in entered order, but may not.

  3. #3
    Join Date
    Dec 1969

    Default RE: 2 questions:

    ques 1 do a movelast then process<BR><BR>ques 2 in update.asp do at the top<BR>&#060;% <BR>themsg = Trim(Request.QueryString("msg"))<BR><BR>&#039 just to test to see if worked do this afterwards<BR>response.write" the msg was " & themsg<BR>%&#062;<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts