Jump to content

gere06

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Everything posted by gere06

  1. <?php include("/home/content/g/e/r/gereb/html/ps3t/config22.php"); $query = "SELECT userid,var FROM playertrophy WHERE userid=1 "; $result=mysql_query($query) or die("Error: ". mysql_error. " with query ". $query); $stuff = mysql_fetch_array($result); echo count($stuff['var']); ?> still just gives me a 1
  2. <? include("/home/content/g/e/r/gereb/html/ps3t/config22.php"); $tro=mysql_query("SELECT userid,val FROM playertrophy WHERE userid=1"); while(list($userid,$val)=mysql_fetch_row($tro)){ echo count($val); } ?> what i got now still geting 1
  3. all that is doing is giving me a 1 this is what is in the val{4,2,3,5,6,7,8 } for user id 1 i want to add it up and get a total so in this case i want a 7
  4. What i want to to do is count all the elements in the array and get a total so if the array is (1,2,3,4,5,6) i want to add them up and get 6 but all it does is give me a 0
  5. <? include("/home/content/g/e/r/gereb/html/ps3t/config22.php"); $trophies=mysql_query("SELECT userid,var FROM playertrophy WHERE userid=1 "); $trophies=count($var); echo"$trophies"; ?>
  6. <? include("/home/content/g/e/r/gereb/html/ps3t/config22.php"); $trophies=mysql_query("SELECT userid,var FROM playertrophy WHERE userid=1 "); $trophies=count($var); echo"$trophies"; ?> What i want to to id count all the elements in the array and get a total so if the array is (1,2,3,4,5,6) i want the out put to be total=6
  7. http://ps3trophys.com/guides/guide.php?gui=1 working code for that page <? include("./config22.php"); $thisguide=mysql_query("SELECT * FROM guide WHERE gid=$gui[id]"); while(list($gid,$name,$dis,$guid,$date)=mysql_fetch_row($thisguide)){ if($config[altcolorx]==$config[altcolora]){ $config[altcolorx]="$config[altcolorb]"; }else{ $config[altcolorx]="$config[altcolora]"; } $out[body].=" <br /> <center> <td align='center'> </td> <table border='0' cellpadding='2' cellspacing='1' width='90%' bgcolor=000000> <tr> <td background='$config[bg]' width='90%'> <center><b> $name</b> </i></left></center> </td> </tr> <tr> <td background='$config[bg2]' width='90%'> <left> Published on $date </i></left></td> </tr> <tr bgcolor='$config[altcolora]'> <td width=100% valign=top align=left>$guid</td> </tr> <tr bgcolor='$config[altcolora]'> <td width=100% valign=top align=left>Published by <b>gere</b></td> </tr> </table><br /><br /><br /><br />"; } $out[body].="</table></center>"; $out[body].="<br /><br />"; include("$config[html]"); ?> but when i add the nav bar to the top of the page it breaks the code Code: $games=mysql_query("SELECT id,name,num,flink,rew,pre,guide FROM games WHERE id=$gui[id]"); while(list($id,$name,$num,$flink,$rew,$pre,$guide,)=mysql_fetch_row($games)){ if($rew == 1){ $rewv="<a href='http://ps3trophys.com/reviews/review.php?rev[id]=$id'>Review</a>"; }else{ $rewv="Review"; } if($pre == 1){ $prev="<a href='http://ps3trophys.com/reviews/preview.php?pre[id]=$id'>Preview</a>"; }else{ $prev="Preview"; } if($guide == 1){ $gui="<a href='http://ps3trophys.com/guides/guide.php?gui[id]=$id'>Guide</a>"; }else{ $gui="Guide"; } if($img == 1){ $imgs="<a href='http://ps3trophys.com/Screenshots/Screenshots.php?scr[id]=$id'>Screenshots</a>"; }else{ $imgs="Screenshots"; } if($vido == 1){ $vid="<a href='http://ps3trophys.com/videos/videos.php?vid[id]=$id'>Videos</a>"; }else{ $vid="Videos"; } if($chet == 1){ $che="<a href='http://ps3trophys.com/cheats/cheats.php?che[id]=$id'>Cheats</a>"; }else{ $che="Cheats"; } $fflink="<a href='$flink'>Forum Link</a>"; $out[body].="<center><br />$headlogo<br /> $prev | $rewv | $gui | $imgs | $vid | $che | $fflink <br /> <br /> </tr>"; } if only one of then are on the page that one will work but if there are both there it breaks they are both pulling ?gui[id]=1 from the url and i think that has something to do with it i just don't know how to make it work
  8. http://ps3trophys.com/guides/guide.php?gui=1 working code for that page <? include("./config22.php"); $thisguide=mysql_query("SELECT * FROM guide WHERE gid=$gui[id]"); while(list($gid,$name,$dis,$guid,$date)=mysql_fetch_row($thisguide)){ if($config[altcolorx]==$config[altcolora]){ $config[altcolorx]="$config[altcolorb]"; }else{ $config[altcolorx]="$config[altcolora]"; } $out[body].=" <br /> <center> <td align='center'> </td> <table border='0' cellpadding='2' cellspacing='1' width='90%' bgcolor=000000> <tr> <td background='$config[bg]' width='90%'> <center><b> $name</b> </i></left></center> </td> </tr> <tr> <td background='$config[bg2]' width='90%'> <left> Published on $date </i></left></td> </tr> <tr bgcolor='$config[altcolora]'> <td width=100% valign=top align=left>$guid</td> </tr> <tr bgcolor='$config[altcolora]'> <td width=100% valign=top align=left>Published by <b>gere</b></td> </tr> </table><br /><br /><br /><br />"; } $out[body].="</table></center>"; $out[body].="<br /><br />"; include("$config[html]"); ?> but when i add the nav bar to the top of the page it breaks the code $games=mysql_query("SELECT id,name,num,flink,rew,pre,guide FROM games WHERE id=$gui[id]"); while(list($id,$name,$num,$flink,$rew,$pre,$guide,)=mysql_fetch_row($games)){ if($rew == 1){ $rewv="<a href='http://ps3trophys.com/reviews/review.php?rev[id]=$id'>Review</a>"; }else{ $rewv="Review"; } if($pre == 1){ $prev="<a href='http://ps3trophys.com/reviews/preview.php?pre[id]=$id'>Preview</a>"; }else{ $prev="Preview"; } if($guide == 1){ $gui="<a href='http://ps3trophys.com/guides/guide.php?gui[id]=$id'>Guide</a>"; }else{ $gui="Guide"; } if($img == 1){ $imgs="<a href='http://ps3trophys.com/Screenshots/Screenshots.php?scr[id]=$id'>Screenshots</a>"; }else{ $imgs="Screenshots"; } if($vido == 1){ $vid="<a href='http://ps3trophys.com/videos/videos.php?vid[id]=$id'>Videos</a>"; }else{ $vid="Videos"; } if($chet == 1){ $che="<a href='http://ps3trophys.com/cheats/cheats.php?che[id]=$id'>Cheats</a>"; }else{ $che="Cheats"; } $fflink="<a href='$flink'>Forum Link</a>"; $out[body].="<center><br />$headlogo<br /> $prev | $rewv | $gui | $imgs | $vid | $che | $fflink <br /> <br /> </tr>"; } if only one of then are on the page that one will work but if there are both there it breaks they are both pulling ?gui[id]=1 from the url and i think that has something to do with it i just don't know how to make it work
  9. the games one works its the second one that is not working
  10. <? include("./config22.php"); $games=mysql_query("SELECT id,name,num,flink,rew,pre,guide FROM games WHERE id=$gui[id]"); while(list($id,$name,$num,$flink,$rew,$pre,$guide,)=mysql_fetch_row($games)){ if($rew == 1){ $rewv="<a href='http://ps3trophys.com/reviews/review.php?rev[id]=$id'>Review</a>"; }else{ $rewv="Review"; } if($pre == 1){ $prev="<a href='http://ps3trophys.com/reviews/preview.php?pre[id]=$id'>Preview</a>"; }else{ $prev="Preview"; } if($guide == 1){ $gui="<a href='http://ps3trophys.com/guides/guide.php?gui[id]=$id'>Guide</a>"; }else{ $gui="Guide"; } if($img == 1){ $imgs="<a href='http://ps3trophys.com/Screenshots/Screenshots.php?scr[id]=$id'>Screenshots</a>"; }else{ $imgs="Screenshots"; } if($vido == 1){ $vid="<a href='http://ps3trophys.com/videos/videos.php?vid[id]=$id'>Videos</a>"; }else{ $vid="Videos"; } if($chet == 1){ $che="<a href='http://ps3trophys.com/cheats/cheats.php?che[id]=$id'>Cheats</a>"; }else{ $che="Cheats"; } $fflink="<a href='$flink'>Forum Link</a>"; $out[body].="<center><br />$headlogo<br /> $prev | $rewv | $gui | $imgs | $vid | $che | $fflink <br /> <br /> </tr>"; } $thisguide=mysql_query("SELECT * FROM guide WHERE id=$gui[id]"); while(list($id,$name,$date)=mysql_fetch_row($thisguide)){ if($config[altcolorx]==$config[altcolora]){ $config[altcolorx]="$config[altcolorb]"; }else{ $config[altcolorx]="$config[altcolora]"; } $out[body].=" <tr bgcolor='$config[altcolorx]'> <td width='10%' background='$config[cellbgx]'> $timg1 </td> <td width='35%' background='$config[cellbgx]'> $name</td> <td width='45%' background='$config[cellbgx]'> $dis</td> <td width='10%' background='$config[cellbgx]'>$trimg2</td> </tr>"; } $out[body].="</table></center>"; $out[body].="<br /><br />"; include("$config[html]"); ?> $thisguide=mysql_query("SELECT * FROM guide WHERE id=$gui[id]"); while(list($id,$name,$date)=mysql_fetch_row($thisguide)){ my error is coming from this if i change WHERE id=$gui[id] to WHERE id=1 it works but i need to to work the other way the first one works fine $games=mysql_query("SELECT id,name,num,flink,rew,pre,guide FROM games WHERE id=$gui[id]"); while(list($id,$name,$num,$flink,$rew,$pre,$guide,)=mysql_fetch_row($games)){
×
×
  • 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.