473,320 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

What am I doing wrong with the rating code?

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. include('rating/rating.php');
  3.  if ($handle = opendir('upload/')) {
  4.    while (false !== ($file = readdir($handle)))
  5.       {
  6.           if ($file != "." && $file != "..")
  7.       {
  8.               $thelist .= '<tr><td><b>File Name:</b> '.$file.'</td> <td><b>Rating:</b> rating_form('.$file.'); </td> <td><b>Download:</b> <a href="upload/'.$file.'">'.$file.'</a></td></tr>';
  9.           }
  10.        }
  11.   closedir($handle);
  12.   }
  13. ?>
  14. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  15. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  16. <head>
  17.     <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  18.     <meta name="Description" content="" />
  19.     <title>CraftFiles List</title>    
  20.     <link rel="stylesheet" type="text/css" href="rating/rating.css" media="screen"/>
  21.     <script type="text/javascript" src="http://www.google.com/jsapi"></script>
  22.     <script type="text/javascript">google.load("jquery", "1.3.2");</script>
  23.     <script type="text/javascript" src="rating/rating.js"></script>
  24. </head>
  25. <body>
  26. <P>List of maps:</p>
  27. <table border="1">
  28. <P><?=$thelist?></p>
  29. </table>
  30. </body>
  31. </html>
  32.  
Say I wanted to include a rating in any page I could use <?php rating_form("test1"); ?> but I can't figure out how to get that working with my code right I'm a bit new so go easy on me! If I could figure out the right way to do it I could learn. I know rating_form('.$file.'); is wrong but I can't figure out how to get it included with my code.
Oct 24 '10 #1
0 859

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: WebSLS | last post by:
What am I doing wrong ? Here is my XML: <?xml version="1.0" standalone="yes"?> <Specials xmlns="http://tempuri.org/Specials.xsd"> <Trip> <ID>0</ID> <Lieux>Canada</Lieux>...
11
by: Dart | last post by:
This code is okay: class CSingle { public: static CSingle membs; int MEM_NUM; CSingle(int n) { }
2
by: websls | last post by:
I get no output from this file: <?xml version="1.0" standalone="yes"?> <Specials xmlns="http://tempuri.org/Specials.xsd"> <Trip> <ID>0</ID> <Lieux>Canada</Lieux> <Hotel>Clarendon</Hotel>...
7
by: Vic | last post by:
Dear All, I found this code snippet on this list (taken from a nice webpage of a courteous fellow), which I used to filter a form on a combo box. I wanted to repeat the same code to have an...
3
by: brianbasquille | last post by:
Hello all, Strange little problem here... am just trying to insert some basic information into an Access Database using OleDB. I'm getting a "Syntax error in Insert Into statement" when it...
8
by: Thaqalainnaqvi | last post by:
Several times I logged-in successfully but after log-in I can't use features/services which were shown prior to my login. Can anyone exoert from this forum check , is it technical fault of Bank...
8
by: watkinsdev | last post by:
Hi, I have created a mesh class in visual studio 6.0 c++. I can create a device, render objects and can edit the objects by for instancnce selecting a cluster of vertices and processing the...
10
by: Enkidu | last post by:
Beginner question, sorry! I am using indexers to access an array of StringBuilders in an instance of a class: Getting: value = board1; Setting: board1 = value1 ;
6
by: MyMarlboro | last post by:
i wish to compare 1 file with multiple files (in a folder) @allfile - >> the paths for all files in a folder but once i run the code below, it keep loop at print "comparing $masterfile with...
1
by: Michelle Chase | last post by:
Option Compare Database 'this one is to use to concatenate the fields Function combine_descriptions() 'turn off warning dialog DoCmd.SetWarnings (False) Dim rst As Recordset Dim...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.