Salve a tutti, ho quato codice
Codice 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>";
questo
Codice PHP:
$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."'");
e infine questo
Codice 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[3]);
if($ilink=="")
{
$ilink = "<img src=\"default_image.gif\" alt=\"*\"/>";
}else{
$ilink = "<img src=\"$ilink\" alt=\"*\"/>";
}
$co++;
if(canenter($room[0], $sid))
{
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline WHERE rid='".$room[0]."'"));
if($room[2]=="")
{
echo "$ilink <a href=\"chat.php?&rid=$room[0]&sid=$sid\">".htmlspecialchars($room[1])."($noi[0])</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>";
}
}
}
il problema è che quando carico un immagine non si vede, sapete perchè?