chicka Posted May 29, 2009 Posted May 29, 2009 I'm trying to add house images to my game but no matter what I try I can't seem to get the images to show up... would someone kindly post something that might help?? Thank you so much Quote
Uridium Posted May 29, 2009 Posted May 29, 2009 Re: House Images Help It would depend on what you have named the table for house pics to show on your MYSQL if its hsepics <<< EXAMPLE then on your index page you would need to put in place If the pic is in an image folder say IMAGES then you would need to add this Quote
chicka Posted May 29, 2009 Author Posted May 29, 2009 Re: House Images Help thanks illusions i'm gonna give that a try and see what happens Quote
Alex Riley Posted May 29, 2009 Posted May 29, 2009 Re: House Images Help Hmmm Chicka If You Can't Get It To Work ... Post You'r Index Page Here And I'll Add It For You :) Quote
chicka Posted May 29, 2009 Author Posted May 29, 2009 Re: House Images Help i'll do that.. I'm gonna give it a try first... Quote
chicka Posted May 29, 2009 Author Posted May 29, 2009 Re: House Images Help I have been trying and I just keep getting errors.. I thinks its because i'm still new...lmao... if you could help me that would be great <?php $housequery=1; require "globals.php"; echo "<h2>General Info:</h2>"; $exp=(int)($ir['exp']/$ir['exp_needed']*100); echo " <table class='table'> <tr> <th>Name</th> <th>Crystals</th> <th>Level</th> <th>Exp.</th> <th>Money</th> <th>Health</th> <th>House</th> </tr> <tr> <td><center>".$ir['username']."</center></td> <td><center>".$cm."</center></td> <td><center>".$ir['level']."</center></td> <td><center>".$exp."</center></td> <td><center>$fm</center></td> <td><center>".$ir['hp']."</center></td> <td><center>".$ir['hNAME']."</center></td> </tr> </table> <h2>Stats:</h2>"; $ts=$ir['strength']+$ir['agility']+$ir['guard']+$ir['labour']+$ir['IQ']; $ir['strank']=get_rank($ir['strength'],'strength'); $ir['agirank']=get_rank($ir['agility'],'agility'); $ir['guarank']=get_rank($ir['guard'],'guard'); $ir['labrank']=get_rank($ir['labour'],'labour'); $ir['IQrank']=get_rank($ir['IQ'],'IQ'); $tsrank=get_rank($ts,'strength+agility+guard+labour+IQ'); $ir['strength']=number_format($ir['strength']); $ir['agility']=number_format($ir['agility']); $ir['guard']=number_format($ir['guard']); $ir['labour']=number_format($ir['labour']); $ir['IQ']=number_format($ir['IQ']); $ts=number_format($ts); echo " <table class='table'> <tr> <th>Strength</th> <th>Agility</th> <th>Guard</th> <th>Labour</th> <th>IQ</th> <th>Total Stats</th> </tr> <tr> <td><center>".$ir['strength']."</center></td> <td><center>".$ir['agility']."</center></td> <td><center>".$ir['guard']."</center></td> <td><center>".$ir['labour']."</center></td> <td><center>".$ir['IQ']."</center></td> <td><center>".$ts."</center></td> </tr> </table> <h2>Stats Rankings:</h2> <table class='table'> <tr> <th>Strength</th> <th>Agility</th> <th>Guard</th> <th>Labour</th> <th>IQ</th> <th>Total Stats</th> </tr> <tr> <td><center>Number: ".$ir['strank']."</center></td> <td><center>Number: ".$ir['agirank']."</center></td> <td><center>Number: ".$ir['guarank']."</center></td> <td><center>Number: ".$ir['labrank']."</center></td> <td><center>Number: ".$ir['IQrank']."</center></td> <td><center>Number: $tsrank</center></td> </tr> </table> "; if(isset($_POST['pn_update'])) { $update = sprintf("UPDATE users SET user_notepad = '%s' WHERE userid = '%u' ", ($_POST['pn_update']), ($ir['userid'])); mysql_query($update); $ir['user_notepad']=stripslashes($_POST['pn_update']); header('Location: index.php'); } echo " <hr> Your Personal Notepad: <form action='index.php' method='post'> <textarea rows='10' cols='50' name='pn_update'>".htmlspecialchars($ir['user_notepad'])."</textarea> <input type='submit' value='Update Notes' /> </form>"; $h->endpage(); ?> Quote
Alex Riley Posted May 29, 2009 Posted May 29, 2009 Re: House Images Help Fully Working And Tested : <?php $housequery=1; require "globals.php"; print "<h2>Housing Info:</h2> <table class='table' border='1'> <tr> <td>[img=images/{$ir[]</td> </tr> </table> [b]You Currently Live In {$ir['hNAME']}[/b] "; echo "<h2>General Info:</h2>"; $exp=(int)($ir['exp']/$ir['exp_needed']*100); echo " <table class='table'> <tr> <th>Name</th> <th>Crystals</th> <th>Level</th> <th>Exp.</th> <th>Money</th> <th>Health</th> <th>House</th> </tr> <tr> <td><center>".$ir['username']."</center></td> <td><center>".$cm."</center></td> <td><center>".$ir['level']."</center></td> <td><center>".$exp."</center></td> <td><center>$fm</center></td> <td><center>".$ir['hp']."</center></td> <td><center>".$ir['hNAME']."</center></td> </tr> </table> <h2>Stats:</h2>"; $ts=$ir['strength']+$ir['agility']+$ir['guard']+$ir['labour']+$ir['IQ']; $ir['strank']=get_rank($ir['strength'],'strength'); $ir['agirank']=get_rank($ir['agility'],'agility'); $ir['guarank']=get_rank($ir['guard'],'guard'); $ir['labrank']=get_rank($ir['labour'],'labour'); $ir['IQrank']=get_rank($ir['IQ'],'IQ'); $tsrank=get_rank($ts,'strength+agility+guard+labour+IQ'); $ir['strength']=number_format($ir['strength']); $ir['agility']=number_format($ir['agility']); $ir['guard']=number_format($ir['guard']); $ir['labour']=number_format($ir['labour']); $ir['IQ']=number_format($ir['IQ']); $ts=number_format($ts); echo " <table class='table'> <tr> <th>Strength</th> <th>Agility</th> <th>Guard</th> <th>Labour</th> <th>IQ</th> <th>Total Stats</th> </tr> <tr> <td><center>".$ir['strength']."</center></td> <td><center>".$ir['agility']."</center></td> <td><center>".$ir['guard']."</center></td> <td><center>".$ir['labour']."</center></td> <td><center>".$ir['IQ']."</center></td> <td><center>".$ts."</center></td> </tr> </table> <h2>Stats Rankings:</h2> <table class='table'> <tr> <th>Strength</th> <th>Agility</th> <th>Guard</th> <th>Labour</th> <th>IQ</th> <th>Total Stats</th> </tr> <tr> <td><center>Number: ".$ir['strank']."</center></td> <td><center>Number: ".$ir['agirank']."</center></td> <td><center>Number: ".$ir['guarank']."</center></td> <td><center>Number: ".$ir['labrank']."</center></td> <td><center>Number: ".$ir['IQrank']."</center></td> <td><center>Number: $tsrank</center></td> </tr> </table> "; if(isset($_POST['pn_update'])) { $update = sprintf("UPDATE users SET user_notepad = '%s' WHERE userid = '%u' ", ($_POST['pn_update']), ($ir['userid'])); mysql_query($update); $ir['user_notepad']=stripslashes($_POST['pn_update']); header('Location: index.php'); } echo " <hr> Your Personal Notepad: <form action='index.php' method='post'> <textarea rows='10' cols='50' name='pn_update'>".htmlspecialchars($ir['user_notepad'])."</textarea> <input type='submit' value='Update Notes' /> </form>"; $h->endpage(); ?> Enjoy! Quote
chicka Posted May 29, 2009 Author Posted May 29, 2009 Re: House Images Help thank you so much :) +1 Quote
Alex Riley Posted May 29, 2009 Posted May 29, 2009 Re: House Images Help No Problem :) Out Of Curiosity, Did It Work? Quote
chicka Posted May 29, 2009 Author Posted May 29, 2009 Re: House Images Help well I haven't uploaded the pics yet i'm working on that now.... i'll post it up here when i'm done and let you know... Quote
chicka Posted May 29, 2009 Author Posted May 29, 2009 Re: House Images Help would this be correct for my db?? ALTER TABLE `houses` ADD `hsepics` BIGINT(90) NOT NULL; Quote
CrazyT Posted May 29, 2009 Posted May 29, 2009 Re: House Images Help would this be correct for my db?? ALTER TABLE `houses` ADD `hsepics` BIGINT(90) NOT NULL; Why bigint?... ALTER TABLE `houses` ADD `hsepics` VARCHAR(255) NOT NULL DEFAULT 'defaultpic.jpg'; .. somethink like that Quote
Alex Riley Posted May 29, 2009 Posted May 29, 2009 Re: House Images Help If You Want My Index Version To Work You Have To Use This Sql ALTER TABLE `houses` ADD `hPIC` VARCHAR(255) NOT NULL DEFAULT 'defaultpic.jpg'; Quote
Danny696 Posted May 29, 2009 Posted May 29, 2009 Re: House Images Help chick i can help u if ya cum on msn Quote
chicka Posted May 29, 2009 Author Posted May 29, 2009 Re: House Images Help ok that worked like a charm... im greatfull for all that helped and didn't make fun of a noob.... this makes me wanna add images to everything lmao.. thanks again guys for your help Quote
Alex Riley Posted May 29, 2009 Posted May 29, 2009 Re: House Images Help Hey No Problem, It's What We Do :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.