Jump to content
MakeWebGames

Pet Image on Header


Recommended Posts

how would i go about making the pet image apear or a no pet image if theres none selected....

 

[mysql]

<?

if($user_class->pet != ""){

?>

?? confuses me \

<?

} else {

?>

nopet.gif

<?

}

?>

[/mysql]

 

i dont even think user_class->pet will pull your pet... i really appreciate all the help ive received on this site ... but lol again ahh help please ?(

Link to comment
Share on other sites

Select the image table from the db, If no image is there then output the default image, if not then show the real image

 


if($row['image']){ 
$petimage= "[img=images/" . $row[]";} 
else{ 
$petimage= "[img=images/mynoimage.gif]";  
}  

 

Something along those line's, You'd need to do the select query and change stuff though

Link to comment
Share on other sites

also i would like links to refill loyalty and energy... but the links are all crazy

 

mypets.php?refill_energy=Refill+Energy&pet_id=253

its all from a form and looks like

[mysql]<form method=get action=$PHP_SELF> <input type=submit name=refill_energy value=\"Refill Energy\"><input type=hidden name=pet_id value=\"$line[id]\"></form>

[/mysql]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...