Print Page | Close Window

RATING/VOTE/POLL

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=2934
Printed Date: 29 March 2026 at 5:00pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: RATING/VOTE/POLL
Posted By: aero
Subject: RATING/VOTE/POLL
Date 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 - http://212.10.209.239/antalhits/default.asp

can someone help me !??????




Replies:
Posted By: aero
Date Posted: 22 May 2003 at 7:55am

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

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




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net