Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Web Based Login & Reading Data from a SQL database via ASP (DBPro)

Author
Message
dpharaoh
20
Years of Service
User Offline
Joined: 2nd Nov 2005
Location: SouthEast MA
Posted: 22nd Nov 2005 21:52 Edited at: 22nd Nov 2005 21:54
Based on Polyflydemo(Online Media) and a Memblock Strings Codesnippet, I have created something useful!! This is to pass a username and password to an ASP page, which checks them on a SQL database. The ASP returns a result code to DBPro, which tucks it into a memblock. This is a simple use here, but the combination can be used to keep all kinds of frequently changing data online, making your application even more dynamic Or.. make web-based editors for your games.

Here is the ASP code for gamedata.asp
<%
opendb

username= request.querystring("username")
password = request.querystring("password")
sql = "select * from bpusers where username='" & username & "' and password='" & password & "'"
set rs =conn.execute(sql)
if not rs.eof then
response.write "success"
else
response.write "fail"
end if

rs.close
set rs=nothing

closedb

%>
Three Score
21
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 23rd Nov 2005 01:26
very nice work!

ok, I just hit him with a shovel. Is he still conscious? Yea, I think so. Then hit him again!
If at first your dont succeed, then skydiving is not for you
FXTC
21
Years of Service
User Offline
Joined: 3rd Jul 2004
Location: CzechRepublic
Posted: 23rd Nov 2005 12:57
looks good man

AMD 2,4 512MB RAM,2x200GB hdd,GforceFX5700GT128MB
dpharaoh
20
Years of Service
User Offline
Joined: 2nd Nov 2005
Location: SouthEast MA
Posted: 23rd Nov 2005 14:17
Thanks, I plan on using this for user-based content downloads, dynamic conversations, menus, ingame content, and dynamic map information. It's not realtime, but could be extremely useful in several applications, turn-based games, pregame loading, etc. It is compatible with any web scripting (php, asp, cfm, etc) and of course any data source.

It also eliminated the need for a SQL/database plugin, as long as your content is internet based.
darkdomy
23
Years of Service
User Offline
Joined: 6th Apr 2003
Location: Italy
Posted: 2nd Dec 2005 00:56
Good Samples

Very utility

a question, and possible to read and to write in database the type mysql? it would be utiliti that it would serve... potrbbe to serve in order to dawn login and password of customers., type those that giocono on-linens

Attend News

Anxiously awaiting BlueGUI v2

it informs to me when and ended BlueGUI v2
Evil stick
21
Years of Service
User Offline
Joined: 27th Mar 2005
Location:
Posted: 2nd Dec 2005 13:09
This could be good for something to tell the database that this copy of the software is installed. VERY COOL!


FORUM n00b THREAT LEVEL: ORANGE
Some thread revival/spam-Some bad grammar used, stupid questions or answers-No direct flaming
dpharaoh
20
Years of Service
User Offline
Joined: 2nd Nov 2005
Location: SouthEast MA
Posted: 2nd Dec 2005 17:23
Yes, darkdomy. Because you are relying on the middle layer of ASP/PHP, you can use any database system that they can communicate with.

It is unlimited.

Evilstick... yep! That's one of many good uses:
1) Online accounts system
2) Dynamic content system
3) Dynamic file updates
4) Online high Scores
5) Slow chat system

Login to post a reply

Server time is: 2026-06-10 08:01:00
Your offset time is: 2026-06-10 08:01:00