Skip to content
View in the app

A better way to browse. Learn more.

Unraid

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.

Need help with a php form

Featured Replies

I am using the following code to change a .cfg file and then execute a php after the changes are made:

 

	<form markdown="1" name="vfs_recycle_settings" method="POST" action="/update.php" target="progressFrame">
<input type="hidden" name="#file" value="vfs_recycle/vfs_recycle.cfg">
<input type="hidden" name="#include" value="/plugins/vfs_recycle/include/update.vfs_recycle.php">
Enable Recycle Bin:
: <select name="SERVICE" size="1">
	<?=mk_option($vfs_recycle_cfg['SERVICE'], "disable", "No");?>
	<?=mk_option($vfs_recycle_cfg['SERVICE'], "enable", "Yes");?>
  </select>

Remove trash once a week:
: <select name="WEEKLYRUN" size="1";>
	<?=mk_option($vfs_recycle_cfg['WEEKLYRUN'], "yes", "Yes");?>
	<?=mk_option($vfs_recycle_cfg['WEEKLYRUN'], "no", "No");?>
 </select>

Remove files older than (minutes):
: <input type="text" name="AGE" class="arrow" maxlength="5" value="<?=$vfs_recycle_cfg['AGE'];?>">

<input type="submit" name="#default" value="Default">
: <input type="submit" name="#apply" value="Apply"><input type="button" value="Done" onclick="done()">
</form>

 

What seems to be happening is the update_vfs_recycle.php is getting executed before the vfs_recycle.cfg file has been updated.  I need to have the .cfg file updated because I execute a script that uses the new values of the .cfg file.

 

Can anyone suggest what I am doing wrong here?

#include is used to execute a PHP script before settings are saved.

 

#command is used to execute any command or script after settings are saved.

 

You can turn the PHP script into an independent script by including the first line: #!/usr/bin/php (and optionally remove the .php extension).

Then use something like this:

 

<input type="hidden" name="#command" value="/plugins/vfs_recycle/scripts/update.vfs_recycle">

 

Edit: corrected typo

 

Archived

This topic is now archived and is closed to further replies.

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.