Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

File upload validation not working - please help

Featured Replies

I have created a PHP upload script, however I have a bit of an issue with it.

 

The script checks to see if the checkbox 'remote' is ticked. If it is, it uploads the image file and stores the external URL as a field in the database.

 

If the checkbox isn't checked it will upload the file and the image. Or it should.

I appear to have a problem I can't sort.

 

I have some file validation to check if the file is a .rar .zip or .jpg

If the file IS NOT a .jpg it WILL NOT upload any files, but it will store the information in the database instead of giving me an error.

 

The upload (checkbox unticked) will only work with .jpg's as the file when it should check to see the defined files allowed..

 

Here is the file:

http://www.webdesignerforum.co.uk/index.ph...ost&id=3184

There is no code in that script to manage the upload...

 

on line 41 you include this file: includes/uploadfile.php, maybe you should show us that one.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.