Displaying Records

Results 1 to 2 of 2

Thread: Displaying Records

  1. #1
    ML Guest

    Default Displaying Records

    I would like to display some data from a db on a asp page in this form:<BR><BR>Name<BR>City<BR>Age<BR><BR>My Problem is that when some1 hasnt entered the city i have a space between <BR><BR>Name and<BR> <BR>Age<BR><BR>so what can i do that the data will be displayed like if there isnt a city in the db.<BR><BR>Name<BR>Age<BR><BR><BR>thanks<BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    168

    Default RE: Displaying Records

    &#060;% <BR>Dim name, age, city<BR><BR>name = Request.Form("Name")<BR>city = Request.Form("City")<BR>age = Request.Form("Age")<BR><BR>IF (name&#060;&#062;"") THEN<BR>Response.Write(name & "&#060;p&#062;" & vbcrlf)<BR>END IF<BR>IF (city&#060;&#062;"") THEN<BR>Response.Write(city & "&#060;p&#062;" & vbcrlf)<BR>END IF<BR>IF (age&#060;&#062;"") THEN<BR>Response.Write(age & "&#060;p&#062;" & vbcrlf)<BR>END IF<BR>%&#062;<BR><BR>Hope this helps... Cheers!

Posting Permissions

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