Jump to content

kurtos123

Members
  • Posts

    19
  • Joined

  • Last visited

Recent Profile Visitors

933 profile views

kurtos123's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. It works now, thanks for all your help Barand, i really appreciate it, have a nice day !
  2. Tried inplementing your code Barand but i am sorry it did not give any result. I need to print on my webpage the total number of games with the name "Bratz" and "yasmine ski dressup" which are in my mysql database. (SpelNamen means GameNames, SpelNaam means GameName). <?php $sWhere = ""; $i = 0; foreach($aSpelNamen AS $sSpelNaam) { $sWhere .= "name LIKE '%" . $sSpelNaam . "%'"; if(++$i < count($aSpelNamen)) { $sWhere .= " OR "; } } $rQuery = mysql_query("SELECT COUNT(id) as total FROM " . $pre . $sqlgame . " WHERE (" . $sWhere . ")"); $iCount = mysql_num_rows($rQuery); ?> bratz games (<?php echo $iCount; ?>)
  3. figured this out and it works but is there a much shorter way? Figured this out and it works, but is there a much shorter way ? <?php $sWhere = ""; $i = 0; foreach($aSpelNamen AS $sSpelNaam) { $sWhere .= "name LIKE '%" . $sSpelNaam . "%'"; if(++$i < count($aSpelNamen)) { $sWhere .= " OR "; } } $rQuery = mysql_query("SELECT id FROM " . $pre . $sqlgame . " WHERE (" . $sWhere . ")"); $iCount = mysql_num_rows($rQuery); ?> bratz spellen (<?php echo $iCount; ?>)
  4. [ code ]<?php $iKolommen = 5; $iGamesPerPagina = 60; $aSpelNamen = array( "bratz", "yasmine ski dressup", ); ?> [ / code ] I use above code to determine all games with name bratz and yasmin ski dressup in my database and to print them on my webpage. How can i print the exact number of all the games with those names ? Can you give me the exact code because i am a newbie in php. I tried a code but it only gives the number 2 because it counts the names and not the amount. Many thanks for your help in advance.
  5. Topic can be closed found the errror !
  6. or something like this http://www.spellentuin.nl/spellen.php/The-Treasures-of-Montezuma-4.html click on one of the three images, can give you the code if you are interested
  7. The implementation of the easy slider was not that easy for me losing more than a day of my precious time. if any one can help please do. The problem is that the first image does not load well to the left side with a bit of the last picture can be seen on loading, after that the slider loads well Please check my website for the slider between the purple bars on top: http://www.crocgame.com If you need some code let me know. Thanks for help in advance Best regards, Kurt
  8. ok thanks for your help and tips !
  9. The result of below code can be seen on http://www.crocgame.com under Recommended Games (between purple on top) My Question: Is it possible adjusting my code here and there, to show 5 new games after a certain time duration on the same index page so that images and corresponding urls (purple buttons) rotate on the webpage and it will be less boaring. Anyone who helps me fix this can get 15 dollar on your paypal because i think you need to put some work in it. Best regards, Kurt <?php $iKolommen = 5; ?> <?php include_once("config.php"); ?> <?php $rQuery = mysql_query("SELECT * FROM " . $pre . $sqlgame . " WHERE (name LIKE '%candy crush%') OR (name LIKE '%goodgame farmer%') OR (name LIKE '%rummy%') OR (name LIKE '%goodgame empire%') OR (name LIKE '%Gorillaz Tiles%') OR (name LIKE '%goodgame shadow kings%') OR (name LIKE '%my free zoo%') OR (name LIKE '%my free farm%') OR (name LIKE '%kapi hospital%') OR (name LIKE '%garbage garage%') OR (name LIKE '%11 legends%') OR (name LIKE '%dansen met de sterren%') OR (name LIKE '%skyrama%') OR (name LIKE '%seafight%') OR (name LIKE '%battlestar galactica%') OR (name LIKE '%pirate storm%') OR (name LIKE '%rising cities%') OR (name LIKE '%zoo mumba%') OR (name LIKE '%drakensang online%') OR (name LIKE '%uptasia%') ORDER BY RAND() LIMIT 5"); $iCount = mysql_num_rows($rQuery); ?> <?php if(!$iCount) { ?> <span style="color: white; text-align: center;">No games were found.</span> <?php } else { ?> <table width="780" cellpadding="0" cellspacing="0" align="center"> <tr> <?php $i = 1; while($aGame = mysql_fetch_assoc($rQuery)) { ?> <td width="<?php echo (100 / $iKolommen); ?>%" align="center" style="text-align: center;"> <?php if($aGame['cijfer'] != 0 AND $aGame['stemmen'] != 0) { $iCijfer = floor($aGame['cijfer'] / $aGame['stemmen']); } else { $iCijfer = 0; } $sSpelUrl = str_replace(" ", "-", $aGame['name']); ?> <div style="float: left; margin-left:2px; width: <?php echo ($i == 2 OR $i == 3) ? "152" : "153"; ?>px; text-align: center;"> <a target="_blank" href="http://www.crocgame.com/games.php/<?php echo $sSpelUrl; ?>.html" class="recommendedLink"> <span class="iconwrapper"><img src="<?php echo $aGame['screenshoturl']; ?>" width="140" height="89" alt="recommend games" /></span> <span class="recomendedButton" style="margin: 5px auto auto auto;"> <?php echo strlen($aGame['name']) > 19 ? substr($aGame['name'], 0, 19) . ".." : $aGame['name']; ?> </span> </a> </div></td> ?>
  10. topic can be closed thanks for great help again !
  11. small detail don't now it can be solved the list is printed like this (watch position number 10 under 9): 1 2 .. 9 10 Possible to print like this: 1 .. 9 10
  12. Everybody thanks for great help, it works now !!!!
  13. Code so far: <?php include "config.php"; // initiate counter $i = 0; $rQuery = mysql_query("SELECT * FROM " . $pre . "$sqlgame WHERE cijfer / stemmen >= 10 ORDER BY views DESC LIMIT 10"); while($aGame = mysql_fetch_assoc($rQuery)) if($aGame['cijfer'] != 0 AND $aGame['stemmen'] != 0) { $cijfer = floor($aGame['cijfer'] / $aGame['stemmen']); } else { $cijfer = 0; } $sSpelNaam = str_replace(" ", "-",$aGame['name']); // increment counter by one $i++; // output counter echo "$i.<font color='#333333'>• <a href=\"http://www.crocgame.com/games.php/" . $sSpelNaam . ".html\" target='blank' onmouseover=\"ddrivetip('<img src=\'" . $aGame['screenshoturl'] . "\' width=\'170\' height=\'140\' alt=\'" . $aGame['name'] . "\'><br /><b>" . $aGame['name'] . "</b>');\" onmouseout='hideddrivetip();'>" . $aGame['name'] . " " . $aGame['extra'] . "</a></font><br />" . PHP_EOL; } ?> STill not working with above code get mysql error: Parse error: syntax error, unexpected '}' in/home/crocgame/domains/crocgame.com/public_html/beste_games1.phpon line 23 Please help !
  14. i agree in code of moderator Ch0cu3r " )" on line 6 was missing but something more but be wrong ....
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.