php - Creating a (simple) flash game website with rating system -


he guys,

for school need make website can play flash games, rate games leaving reactions in text form , vote system uses number system (i.e. 1 = extremely bad , 10 = good.).

right want this:

have index page each category of games users can click on games name , directed page script loads game.

so far i've written code index (master) page.

    <!doctype html>     <?php         include("dbconnect.php");     ?> <html>     <head>         <meta charset="utf-8">         <title>master page</title>     </head>     <body>         <?php             //place data mysql query in $result.             $result = mysql_query("select * gamesdb");              //while row of data exists, put row in $data associative array.             while($data = mysql_fetch_assoc($result)) {                  //echo link games in mysql database.                 echo "<a href='detail.php?id=" . $data['id'] . "'>";                      //echo games name in url.                     echo $data['spel'];                  //echo closing tags                 echo "</a>";                 echo "<br />";             }         ?>     </body> </html> 

and game (detail) page.

    <!doctype html>     <?php         include("dbconnect.php");     ?> <html>     <head>         <meta charset="utf-8">         <title>detail page</title>     </head>     <body>         <?php             //place data out of database, id number retrieved out of url $result.             $result = mysql_query("select * gamesdb id = '" . $_get['id'] . "'");              //while row of data exists, put row in $data associative array.             while($data = mysql_fetch_assoc($result)) {                  //retrieve files name database , place in <embed> tags src="...".                 echo "<embed width='800' height='512' src='" . $data['file'] . "' type='application/x-shockwave-flash'></embed>";                  //echo games name                 echo "spel: " . $data['spel'] . "<br />";                  //echo points (not yet functional)                 echo "punten: " . $data['punten'] . "<br />";                  //echo reactions users regarding game.                 echo "reacties: " . $data['reactie'] . "<br />";              }         ?>     </body> </html> 

when click on link in masterpage redirected detail page unfortunately, game not load.

in mysql db added file name first row id 1. thought, when inquire filename in tags load game says (when right click box in game should display) "movie not loaded...".

can me work ? thinking way off perhaps, or headed in right direction.

since assignment school, there no need worry sql injection vulnerabilities.

thanks!

i forgot put entry file column. problem had "<embed>" has been resolved, focus on how add user comments 'comments' column, , have each comment displayed. i'd find code myself as possible react question pointers instead of writing complete code grateful.


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -