Search found 9 matches

by Dash
Thu Jun 28, 2018 3:34 pm
Forum: PHP coding => Images
Topic: Display error message on website page
Replies: 8
Views: 416

Re: Display error message on website page

Okay, thanks. I will see what I can do.
by Dash
Thu Jun 28, 2018 1:21 pm
Forum: PHP coding => Images
Topic: Display error message on website page
Replies: 8
Views: 416

Re: Display error message on website page

Thanks. I have read a lot of that site already, but I still do not follow exactly what you are suggesting. I tried taking the 'if' statements where the error checking has the echos out of the upload.php file and placing them as stand-alone PHP after the buttons. But, it caused a lot of syntax errors...
by Dash
Thu Jun 28, 2018 12:13 pm
Forum: PHP coding => Images
Topic: Display error message on website page
Replies: 8
Views: 416

Re: Display error message on website page

I'm new to PHP and I am not sure what you are telling me to do. The PHP code I showed above is called from the HML and is contained in a file called upload.php the HTML looks like: <div class="upload-area"> <form action="upload.php" method="post" enctype="multipart/form-data"> Select image to upload...
by Dash
Tue Jun 26, 2018 3:46 pm
Forum: PHP coding => Images
Topic: Display error message on website page
Replies: 8
Views: 416

Re: Display error message on website page

Won't that cause the message to display on a new window? I don't want a new window. I want the message to print within the web page rather than causing a new window to open with the message.
by Dash
Tue Jun 26, 2018 11:16 am
Forum: PHP coding => Images
Topic: Display error message on website page
Replies: 8
Views: 416

Display error message on website page

I am using PHP to upload images from a website page. The script I have gives user external error and success messages as an 'echo' statement. I would rather display the messages on the same page just below the upload button. I have tried multiple online searches with no success. Yet I have seen many...
by Dash
Fri Jun 08, 2018 9:21 am
Forum: PHP coding => Images
Topic: Uploading images to server from web page-change error notify
Replies: 5
Views: 510

Re: Uploading images to server from web page-change error notify

Hello Jon, There seems to be a problem when I post the JS to this forum. In line 24 where it says "file = this.files". Following this.files, there are left and right square brackets that contain an "i". Apparently, this forum won't print the square brackets. The actual JS is exactly what is shown on...
by Dash
Fri Jun 08, 2018 9:15 am
Forum: PHP coding => Images
Topic: Uploading images to server from web page-change error notify
Replies: 5
Views: 510

Re: Uploading images to server from web page-change error notify

Hello Jon, Below is the code have. I get a syntax error in the very last line, but I am unsure what is wrong. Thank you very much for your help with this. (function () { var input = document.getElementById("images"), formdata = false; if (window.FormData) { formdata = new FormData(); document.getEle...
by Dash
Mon Jun 04, 2018 2:40 pm
Forum: PHP coding => Images
Topic: Uploading images to server from web page-change error notify
Replies: 5
Views: 510

Re: Uploading images to server from web page-change error notify

Thanks Jon, I tried many Google searches and didn't get the page you reference and I like what it does. However, I get the message saying the image was successfully uploaded, but I don't get any images on the page. First of all, I am unsure of the part after the 1st set of Java Script code where the...
by Dash
Fri Jun 01, 2018 2:46 pm
Forum: PHP coding => Images
Topic: Uploading images to server from web page-change error notify
Replies: 5
Views: 510

Uploading images to server from web page-change error notify

I am using PHP to upload images from my computer to a server file via a web page. The PHP routine works fine and I can see the file being populated with the expected images. However, I would like to change the success and error messages so they print within the web page rather than linking to a whit...