Guest_imported
New member
- Jan 1, 1970
- 0
my project is all about a login system. Whenever i click login, it will display their particulars. But i have this problem, whenever i click submit button, they will only show the first row username of the database. And the userid is correct but the username is wrong. So how to make it possible that it will show the correct userid and username correctly and display it nicely.
The coding is provided below:
<%
Dim h, name
Dim SQL,Rs2
Dim Rs, Con, ConnString
Dim Con1
Set Rs=Server.CreateObject ("ADODB.CONNECTION"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
ConnString="driver={sql server};server=o6f2e1;database=user;DSN=localserver;PWD=;UID=sa;"
Rs.Open ConnString
SQL = "select * from info "
Set Con=Rs.Execute (SQL)
SQL= "select * from Course"
Set Con1=Rs.execute (SQL)
h = hour(now)
Do until Con.fields("NameID"
If h < 12 then
Response.Write ("<p>"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
response.write("Good Morning!<p>" & Con.Fields("NameID"
)
Response.Write ("</p><p>"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Response.Write ("Your Modules is " & Con1.fields("Modules"
)
Response.Write ("</p><p>"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
elseif h <18 then
Response.Write ("<p>"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
response.write("Good Afternoon!<p>" & Con.Fields("NameID"
)
Response.Write ("</p><p>"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
else
Response.Write ("<p>"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
response.write("Good Night! <p>" & Con.Fields("NameID"
)
Response.Write ("</p><p>"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Loop
End if
%>
The coding is provided below:
<%
Dim h, name
Dim SQL,Rs2
Dim Rs, Con, ConnString
Dim Con1
Set Rs=Server.CreateObject ("ADODB.CONNECTION"
ConnString="driver={sql server};server=o6f2e1;database=user;DSN=localserver;PWD=;UID=sa;"
Rs.Open ConnString
SQL = "select * from info "
Set Con=Rs.Execute (SQL)
SQL= "select * from Course"
Set Con1=Rs.execute (SQL)
h = hour(now)
Do until Con.fields("NameID"
If h < 12 then
Response.Write ("<p>"
response.write("Good Morning!<p>" & Con.Fields("NameID"
Response.Write ("</p><p>"
Response.Write ("Your Modules is " & Con1.fields("Modules"
Response.Write ("</p><p>"
elseif h <18 then
Response.Write ("<p>"
response.write("Good Afternoon!<p>" & Con.Fields("NameID"
Response.Write ("</p><p>"
else
Response.Write ("<p>"
response.write("Good Night! <p>" & Con.Fields("NameID"
Response.Write ("</p><p>"
Loop
End if
%>