Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - RATING/VOTE/POLL
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

RATING/VOTE/POLL

 Post Reply Post Reply
Author
aero View Drop Down
Groupie
Groupie
Avatar

Joined: 21 May 2003
Location: Denmark
Status: Offline
Points: 80
Post Options Post Options   Thanks (0) Thanks(0)   Quote aero Quote  Post ReplyReply Direct Link To This Post Topic: RATING/VOTE/POLL
    Posted: 22 May 2003 at 2:08am

Hello

Can someone pleas help me !???

I have a folder : images  whit this images
0_star_rating.gif
1_star_rating.gif
2_star_rating.gif
3_star_rating.gif
4_star_rating.gif
5_star_rating.gif

and a database whit the name : banner.mdb
Tabel: Banner
BannerID = Auto
Url = Text
LinkNavn = Text
Hits = Number
No_of_ratings = Number
Rating = Number
Total_rate_amount = Number

And a site Default.asp
<html>
<title>Hente data fra database</title>
<head>
</head>
<body>
<ul>
<%
Set Conn = Server.CreateObject("ADODB.Connection")
DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; "
DSN = DSN & "DBQ=" & Server.MapPath("banner.mdb")
Conn.Open DSN

strSQL = "Select * From Banner Order by Url Desc"
Set rs = Conn.Execute(strSQL)

Do
  
   strNavn = rs("LinkNavn")
   strHits = rs("Hits")
   strRating = rs("Rating")
   strNORating = rs("No_of_ratings")

  
   strLink = "<a href=antalhits.asp?id='" & rs("bannerID") & "'>" & strNavn & "</a> ("& strHits &") <br><img src=images/'"& strRating &"'_star_rating.gif"" width='66' height='14' alt=""" & strRating & " star rating""> Average rating based on " & strNORating & " votes&nbsp;&nbsp;-&nbsp;&nbsp;<a href=""JavaScript:popup('rate_link.asp?id='" & rs("BannerID") & "','rate_site')"" style=""font-size: 12; font-style: italic;"">Rate Link</a>"    

  
   Response.Write "<li>" & strLink & "</li>"

   rs.MoveNext
Loop While Not rs.EOF

Conn.Close
Set Conn = Nothing
%>
</ul>
</body>
</html>

I cant get se the images om my site !!! if u look at
<img src=images/'"& strRating &"'_star_rating.gif"" width='66' height='14' alt=""" & strRating & " star rating""> Then the &strRating& shut get a number from Rating in my database ex 4 and the show the 4_star_rating.gif images !!!!  but i cant get my script to show the images !!???

the script is running at this adress http://212.10.209.239/antalhits/default.asp

can someone help me !??????

Back to Top
aero View Drop Down
Groupie
Groupie
Avatar

Joined: 21 May 2003
Location: Denmark
Status: Offline
Points: 80
Post Options Post Options   Thanks (0) Thanks(0)   Quote aero Quote  Post ReplyReply Direct Link To This Post Posted: 22 May 2003 at 7:55am

Got it myself !!!!!!!!  he he

no ' at &strRating& he he !!!!!

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.