Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Chat room not working Reply To: Chat room not working

#179938
ChatRoom
Participant

Hey chris thanks for the quick reply. I was first trying to get it working and then consider security. I have run into a problem that i can’t upload pictures, the pics get uploaded when i am using xampp. When i put the code on http://freewebhostingarea.com for testing nothing happens after uploading the pics. I am posting some code
`

if (isset($_FILES['image']['name']))
  {
    $saveto = "$user.jpg";
    move_uploaded_file($_FILES['image']['tmp_name'], $saveto);
    $typeok = TRUE;
  switch($_FILES['image']['type'])
{
  case "image/gif":   $src = imagecreatefromgif($saveto); break;
  case "image/jpeg":  // Both regular and progressive jpegs
  case "image/pjpeg": $src = imagecreatefromjpeg($saveto); break;
  case "image/png":   $src = imagecreatefrompng($saveto); break;
  default:            $typeok = FALSE; break;
}

`