How to load image in php

Extensions, styles and support for everything else about phpBB
Post Reply
User avatar
Posts: 14
Joined: 10 Feb 2018, 23:13
Location: USA

How to load image in php


Post by title10usc311 » 13 Apr 2018, 08:15

Hello, I have a chat here that id like to add a little avatar before the username. You can see the "NEED IMAGE HERE" My question is how can i display a image there using php? Did I ask that right? :oops: html does not seem to work.. I know this isnt exactly phpbb but, Kasimi!!! The chat master! Please help me!

Thank you!


Code: Select all

    $text = $_POST['text'];
    $cb = fopen("log.html", 'a');
    fwrite($cb, "<div class='name'>NEED IMAGE HERE<b>".$_SESSION['name'].":&nbsp;</b><i>(".date("F j, Y").")</i></div><br><div class='msgln'>".stripslashes(htmlspecialchars($text))."<br><br></div>");
CSS is needed.

Code: Select all

.name { margin:0 0 2px 0;
    font:12px arial;
    display: inline; color: #ffffff; text-shadow: 0 0 1em #1DFF38, 0 0 1em #1DFF38, 0 0 1.2em #1DFF38;}
I was having issues with the image not loading, than blinking..Moreover, i added this and it seemed to work.

Code: Select all

    $src = 'avatar.gif';

 <img src='<?php echo $src ?>'>
Thanks anyway. By the way, love the new chat buttons! Looks great!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest