Skip to content
Advertisement

Tag: image

What are the ways of sending images to my server?

I’m mostly a PHP backend / HTML/CSS frontend developer, so I’ve always sent images to my server from the client using either form enctype: multipart/formdata or through a FormData object when uploading through ajax requests. After that I would receive the file in the $_FILES array. Lately I’ve been working with REST APIs and I’ve been doing some research about

PHP image upload – several errors

So, I’m trying to upload an image using move_uploaded_file(). Here is the code: HTML FORM: PHP SCRIPT: But I’m getting lot of warnings: Can someone please help me with that? Answer # Array to string conversion This warning is in insert function: you passed array ($_FILES[‘fileImage’]) instead of string. It seems that you want to store address of image, if

PHP, Image preview with javascript and uploader by PHP

I made PHP script to preview an image before upload it, which is simple and easy to read. the first part is to displays the image then to upload it after pressing Submit button. I have an issue with uploading the image, it doesn’t upload. Answer You have several logical errors in your PHP Code as well as HTML. When

Problem pasting one image into another PHP

I want to paste the $original image into the center of $fondo image, i write the following code: The result i got is this: As you can see the cyan color is affecting original image: Any ideas on what i’m wrong? Thank you! Answer the solution is: Creating the image as imagecreatetruecolor instead of imagecreate Then, need to paint the

Advertisement