Help! Image not seen

Started on the old forum in December 2009 · view the original in the archive · old links redirect here

No replies · 363 views · started 16 years ago · 1 min read

Leviathan73 Senior · 260 posts #1

Hello friends, I have this code in the file index.php

echo "<form action=\"genproc.php?action=mkroom&sid=$sid\" method=\"post\">"; 
    echo "Room Name: <input name=\"rname\" maxlength=\"30\"><br/>"; 
    echo "Password: <input name=\"rpass\" style=\"-wap-input-format: '*x'\" maxlength=\"10\"><br/>"; 
    echo "Pic Url: <input name=\"pic\" maxlength=\"255\" value=\"http://\"/><br/>"; 
    echo "<input type=\"Submit\" name=\"Create\" Value=\"Create\"></form>";  
$pic = mysql_escape_string($_POST["pic"]); 
$pic = htmlspecialchars($pic); 
        $res = mysql_query("INSERT INTO ibwf_rooms SET name='".$rname."', pass='".$rpass."', censord='".$cns."', static='0', lastmsg='".time()."', pic='".$pic."'");

in the db ibwf_rooms added pic varchar(255) default="" and I have this code in the file chat.php

$rooms = mysql_query("SELECT id, name, pass, pic FROM ibwf_rooms WHERE static='0'");
        $co=0;
        while ($room= mysql_fetch_array($rooms))
        {
$ilink = trim($room[1]);
  if($ilink=="")
  {
   $ilink = "<img src=\"$ilink\" alt=\"*\"/><br/>";
 
            $co++;
          if(canenter($room[0], $sid))
 
            {
              echo "$ilink <a href=\"chat.php?&rid=$room[0]&sid=$sid\"></a><br/>";
            }else{
              echo htmlspecialchars($room[1]);
              echo "$ilink <form action=\"chat.php\" method=\"get\">";
              echo "<br/><input format=\"*x\" name=\"rpw\" maxlength=\"10\"/><br/>";
              echo "<input type=\"submit\" value=\"GO\"/>";
              echo "<input type=\"hidden\" name=\"rid\" value=\"$room[0]\"/>";
              echo "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
              echo "</form>";
            }
          }
        }

The problem is that when I load an image, (http://universal3000.altervista.org/chat_universal2/uploaded/files/happy_holidays4.gif ) you can not see. I changed so

$ilink =$room[3];
  if($ilink=="")
  {
   $ilink = "<img src=\"$ilink\" alt=\"*\"/><br/>";

but you can not see.

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close