Home › Forums › Back End › Chat room not working › Reply To: Chat room not working
August 19, 2014 at 4:48 pm
#179938
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;
}
`