Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - dynamic profiles
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

dynamic profiles

 Post Reply Post Reply
Author
jaz9090 View Drop Down
Groupie
Groupie


Joined: 25 October 2002
Location: United Kingdom
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote jaz9090 Quote  Post ReplyReply Direct Link To This Post Topic: dynamic profiles
    Posted: 09 March 2003 at 8:38am

can anyone help me? I'm making a website for my hockey club and want to have player profiles a bit like this : http://www.xkewl.com/bhhhcdynamic/profile.asp, but what i would like is for it to be dynamic and access db driven so i just have to add info to db to add a new player rather than add a whole profile page each time, so i can just add a link like http://www.xkewl.com/bhhhcdynamic/profile.asp?Player=223 the problem is i havent the first idea how to go about it, so any help would be appreciated

p.s. i dont need an admin page, i understand access db (and how to edit etc)

Back to Top
faubo View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 May 2002
Location: Brazil
Status: Offline
Points: 560
Post Options Post Options   Thanks (0) Thanks(0)   Quote faubo Quote  Post ReplyReply Direct Link To This Post Posted: 09 March 2003 at 10:34am

Make your table with those information, and put a field with an autonumber (the key), let's say, PlayerID.

Then you make your query looking for that Player,

Something like this:

first you get the ID from your querystring:

lngPlayer = CLng(Request.QueryString("Player"))

Then you take the info from the DB.

"SELECT yourtable.* FROM yourtable WHERE yourtable.PlayerID = " & lngPlayer & ""

And your links will look like the one you post above to the profile page with ?Player=223 after the .asp

Back to Top
jaz9090 View Drop Down
Groupie
Groupie


Joined: 25 October 2002
Location: United Kingdom
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote jaz9090 Quote  Post ReplyReply Direct Link To This Post Posted: 09 March 2003 at 12:59pm

i dont suppose you could put a small example code together on here? (includeing the connection to the db etc the db being d:/domains/xkewl.com/private/profiles.mdb

i would realy appreciate it



Edited by jaz9090
Back to Top
faubo View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 May 2002
Location: Brazil
Status: Offline
Points: 560
Post Options Post Options   Thanks (0) Thanks(0)   Quote faubo Quote  Post ReplyReply Direct Link To This Post Posted: 09 March 2003 at 1:42pm

didn't you say you knew the access db stuff?

This is part of what I use in my news, take a look and adapt, don't forget to put your variables (the Dim stuff) and close the connections and recordsets after you use them.

And you should take a look in the DB tutorials in this site, there's where I learn this. It's more than worth the time you will spend.

<%

Set notiCon = Server.CreateObject("ADODB.Connection")

atarCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("../private/profiles.mdb") <- this is the path from the root, add more ../ for each folder level your app is in, if not in the root.

notiCon.Open atarCon

%>

<%

Dim rsNews  
Dim lngIDNews 

lngIDNews = CLng(Request.QueryString("NewsID"))
 

Set rsNews = Server.CreateObject("ADODB.Recordset")
 
qtrSQL = "SELECT tblNotic.* FROM tblNotic WHERE tblNotic.News_ID = " & lngIDNews & ""
 
rsNews.Open qtrSQL, atarCon
 
 %>

Back to Top
fernan82 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 17 November 2002
Location: United States
Status: Offline
Points: 362
Post Options Post Options   Thanks (0) Thanks(0)   Quote fernan82 Quote  Post ReplyReply Direct Link To This Post Posted: 09 March 2003 at 3:05pm
I had to practice ASP so I did that code for you.....you can download it here it's a zip with the script and a sample db...
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.