The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need a point in the right direction
#21
I can't run your code without my db being setup correctly. I actually have a /pizza install on my other computer, but I'm not there.

Javascript is normally what you would use for preventing a button from being clicked multiple times.

There are a few php hackery ways to do it though.

So, since you're storing the on_break in the users table as 0 or 1 AND refreshing the page with that redirect message after update, you should be able to go down to the button part of your form and do this.

Code:
<?php
Code:
if($user->data()->on_break != 1) {
Code:
?>
Code:
//your plain submit button in html here
Code:
<?php } ?>

That will just hide your button if on_break = 1.
  Reply


Messages In This Thread
Need a point in the right direction - by sandrews - 11-18-2016, 06:02 PM
Need a point in the right direction - by dan - 11-18-2016, 06:33 PM
Need a point in the right direction - by sandrews - 11-18-2016, 06:44 PM
Need a point in the right direction - by dan - 11-18-2016, 06:47 PM
Need a point in the right direction - by sandrews - 11-19-2016, 04:04 AM
Need a point in the right direction - by Brandin - 11-19-2016, 02:19 PM
Need a point in the right direction - by dan - 11-19-2016, 05:14 PM
Need a point in the right direction - by sandrews - 11-19-2016, 10:25 PM
Need a point in the right direction - by sandrews - 11-20-2016, 12:23 AM
Need a point in the right direction - by sandrews - 11-20-2016, 02:40 AM
Need a point in the right direction - by mudmin - 11-20-2016, 05:57 PM
Need a point in the right direction - by mudmin - 11-20-2016, 06:04 PM
Need a point in the right direction - by sandrews - 11-21-2016, 05:39 PM
Need a point in the right direction - by mudmin - 11-21-2016, 07:42 PM
Need a point in the right direction - by sandrews - 11-22-2016, 12:58 AM
Need a point in the right direction - by mudmin - 11-22-2016, 01:00 AM
Need a point in the right direction - by sandrews - 11-22-2016, 03:43 AM
Need a point in the right direction - by mudmin - 11-22-2016, 07:42 AM
Need a point in the right direction - by sandrews - 11-23-2016, 06:47 PM
Need a point in the right direction - by sandrews - 11-24-2016, 12:43 AM
Need a point in the right direction - by mudmin - 11-24-2016, 03:55 PM
Need a point in the right direction - by sandrews - 11-24-2016, 04:10 PM
Need a point in the right direction - by mudmin - 11-24-2016, 04:19 PM
Need a point in the right direction - by sandrews - 11-24-2016, 09:41 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)