i donno if i can post to post a day or ?? but if im doing somthing wrong plz tell me
i am trying to get the pokemon lvl of user thats loged in so if i log in has shadow i wanna get pokemon1 pokemon2 pokemon3 pokemon 4 pokemon5 pokemon6
date from the database just for shadow
this is the script im using it was working good on my old site but just tryed to switch it over and it ent saying no errors but dont show the lvls
View Your Pokemon.php
<?php
// this is the include to be able to display the SAME information mulitple times wihtout writting it multiple times
include_once('pokemon_level.php');
// end file include
?>
Pokemon_level.php
<?php
$sql = "SELECT Pokemon1, Pokemon2, Pokemon3, Pokemon4, Pokemon5, Pokemon6 FROM users WHERE username='$_SESSION[valid_user]'";
$result = mysql_query($sql) or die(mysql_error());
$values = mysql_fetch_array($result);
// this is the include to be able to display the SAME information mulitple times wihtout writting it multiple times
include_once('config.php');
// end file include
?>
<td align="center"><p><img src="pokemon/004.gif" width="32" height="32">
<p>Pokemon 1 Levell: <?php echo $values['level']; ?> </p>
<td align="center"><p><img src="pokemon/005.gif" width="32" height="32">
<p>Pokemon 2 Level: <?php echo $values['Pokemon2']; ?> </p>
<td align="center"><p><img src="pokemon/006.gif" width="32" height="32">
<p>Pokemon 3 Level: <?php echo $values['Pokemon3']; ?> </p>
<p>
<td align="center"><p><img src="pokemon/006.gif" width="32" height="32">
<p>Pokemon 4 Level: <?php echo $values['Pokemon4']; ?> </p>
<p></p></td>
<p>
<td align="center"><p><img src="pokemon/005.gif" width="32" height="32">
<p>Pokemon 5 Level: <?php echo $values['Pokemon5']; ?> </p>
<p></p></td>
<p>
<td align="center"><p><img src="pokemon/004.gif" width="32" height="32">
<p>Pokemon 6 Level: <?php echo $values['Pokemon6']; ?> </p>
<p></p></td>
</tr>
</table>
Config.php
<?php
mysql_connect("mysq.com", "admin", "nike4eva");
mysql_select_db("a1979179_pokemon");
?>
i have got sessions on the site has well but the session file is to big
i have noticed my session uses $_SESSION['username'];
and pokemon_lvl.php uses $_SESSION[valid_user]'";
This post has been edited by nick1200: 02 April 2009 - 06:24 AM

Start a new topic
Add Reply



MultiQuote
| 


