athena26 Posted April 6, 2021 Share Posted April 6, 2021 I basically need help does anyone know how to add images in different files like png or img for example I wanted my jail.php to have a picture or GTA or crimes how do I add a image on there ? Quote Link to comment Share on other sites More sharing options...
newttster Posted April 8, 2021 Share Posted April 8, 2021 (edited) This is how I have it in a php file. It displays fine but I haven't had the time to have my files verified for security. Use this at your own risk. echo "<center><img src='/images/jail.png' />"; Edited April 8, 2021 by newttster 1 Quote Link to comment Share on other sites More sharing options...
AdamHull Posted April 8, 2021 Share Posted April 8, 2021 10 minutes ago, newttster said: This is how I have it in a php file. It displays fine but I haven't had the time to have my files verified for security. Use this at your own risk. echo "<center><img src='/images/jail.png' />"; I highly doubt this will cause any security issues. @athenadepends on what you want, if you want to display the avatar or something similar you will have to add it to the loop, or if you just want a picture of a jail then add it to where you want it then style it Quote Link to comment Share on other sites More sharing options...
athena26 Posted April 8, 2021 Author Share Posted April 8, 2021 Veramis teached me how to do it , My website www.gangsterparadise.rf.gd is looking way better Quote Link to comment Share on other sites More sharing options...
Sim Posted April 8, 2021 Share Posted April 8, 2021 Add that echo line he posted in the file u want it displayed in Quote Link to comment Share on other sites More sharing options...
athena26 Posted May 18, 2021 Author Share Posted May 18, 2021 I wanted the users avatar to show in jail and hospital . User display picture. Were it shows there name in jail.php or hospital to show user display pic + name . This is my jail.php <?php include "globals.php";print "<div class='generalinfo_txt'><div><img src='images/info_left.jpg' alt='' /></div><div class='info_mid'><h2 style='padding-top:10px;'> Jail</h2></div><div><img src='images/info_right.jpg' alt='' /></div> </div><div class='generalinfo_simple'><br> <br><br><table class='tablee'><tr><td><center><img src='/images/jail.jpg' /></td></tr></table><br><table width='75%' class=\"table\" border=\"0\" cellspacing=\"1\"><tr bgcolor=gray><th>Name</th> <th>Level</th> <th>Time</th><th>Reason</th> <th>Actions</th></tr>";$q=$db->query("SELECT u.*,c.* FROM users u LEFT JOIN gangs c ON u.gang=c.gangID WHERE u.jail > 0 ORDER BY u.jail DESC");while($r=$db->fetch_row($q)){print "\n<tr><td>{$r['gangPREFIX']} <a href='viewuser.php?u={$r['userid']}'>{$r['username']}</a> [{$r['userid']}]</td><td>{$r['level']}</td><td>{$r['jail']} minutes</td><td>{$r['jail_reason']}</td> <td>[<a href='jailbust.php?ID={$r['userid']}'>Bust</a>][<a href='jailbail.php?ID={$r['userid']}'>Bail</a>]</td></tr>";}print "</table></div><div><img src='images/generalinfo_btm.jpg' alt='' /></div><br></div></div></div></div></div> ";$h->endpage();?> I've tried adding this if ($r['user_level'] == 2) {$user = "<font color='red'>{$r['username']}</font>";} else if ($r['user_level'] == 3) {$user = "<font color='blue'>{$r['username']}</font>";} else if ($r['user_level'] == 4) {$user = "<font color='green'>{$r['username']}</font>";} else if ($r['user_level'] == 5) {$user = "<font color='pink'>{$r['username']}</font>";} else if ($r['user_level'] == 1) {$user = "<font color='white'>{$r['username']}</font>";} else if ($r['donatordays']) {$user = "<font color='#008B8B'>{$r['username']}</font>";} else {$user = "{$r['username']}";}if ($ir['display_pic']) { $display = "<img src='{$r['display_pic']}' width='30' height='30'>"; } else { $display = "<img src='{$gender}' width='30' height='30'>"; } But I get a error is my code of adding wrong ? Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted May 18, 2021 Share Posted May 18, 2021 Code tags! You've got a bunch of none-breaking space entities breaking parsing - the numerous 1 Quote Link to comment Share on other sites More sharing options...
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.