-
Posts
15,292 -
Joined
-
Last visited
-
Days Won
436
Everything posted by requinix
-
You'll need to use service workers.
-
You can do it on mobile the same way you can do it on the desktop: with AJAX polling or websockets. Polling is easier to implement but not instantaneous - which is probably fine for you.
-
Okay. What's the original code before you started making changes, and how do you know what folders are "from" a user?
-
1. What's the original code before you started making changes? 2. How do you know what folders are "from" a user?
-
Share info between 2 Apps in the same server
requinix replied to DanteDantas's topic in PHP Coding Help
One session cookie can cover all three apps, since they're all on the myserver domain. That requires whatever PHP setups are serving the three apps be all be able to access the same session files, and that all three should be running some shared code which is capable of handling the user account. Most likely, since they're all just different paths under the same domain, make sure the session cookie is set to the root path and not just one app and it should work. More complicated would be an OAuth setup, which would be mostly necessary if the sites were potentially being hosted on different websites and/or servers. -
$_REQUEST is discouraged, not deprecated, due to the way that it may or may not contain certain values depending on php.ini settings. Best practice is to get the value specifically from the query string ($_GET) or submitted form data ($_POST). But unless you have a weird setup, $_REQUEST should contain both of $_GET and $_POST (if not more). If there is no "shortUrlDomain" key in it then that probably means there was no value being passed, so the first step should be looking at where the value is supposedly being passed to the PHP script.
-
Great. Code is a good first step. The next step is describing your problem: what are you trying to do, what do you expect to see, and what are you actually seeing?
-
How would I give each appended li elements a unique I'd?
requinix replied to Abel1416's topic in Javascript Help
This var li = $('<li class="pagination-link"></li>').html(item).attr('id', function(i) { return 'listing' + (i + 1); }); won't work because the li is only one element (at a time) so they all have i=0. Barand's code has a typo and should be var li = $('<li class="pagination-link"></li>').html(item).attr('id', index); which correctly does what the first code was attempting to do. -
I can see that your list of menu buttons isn't dynamic and it should be, which will also fix that one bug and make sure it doesn't happen again. Otherwise I can't tell what you're asking about either.
-
What is "->save", exactly? Try telling me in as much detail as you possibly can what that line is supposed to do. Lots of detail. Like you had to explain it to someone who is new to programming and has very little understanding of how things work.
-
You know your application and framework (looks like Laravel) better than us so it's not like we can instantly tell you what table and/or column(s) you have to update. If there's a "last logged in" timestamp on the user table then update that. Otherwise...
-
Re: july 2021 version update
requinix replied to mac_gyver's topic in PHPFreaks.com Website Feedback
-
If you're having problem with your code and want help making it work then you're going to have to post the code.
-
get GitHub Secret (ENV) variable value in PHP
requinix replied to abhishekchess1's topic in PHP Coding Help
You can access environment variables that you did not create on your own with $_ENV or getenv(). -
chat room, send audio to store in server
requinix replied to nitiphone2021's topic in Javascript Help
I like how the code has a comment that doing a thing is a "rather bad idea", and then does it anyway. Check the return value from move_uploaded_file() to see if that worked, and make sure you have error displaying/logging/reporting set up so that you can see any errors that happen. -
How do I highlight mysql fetch dates in a datepicker?
requinix replied to imgrooot's topic in PHP Coding Help
I'm not going to write the code for you. Instead, I'm going to refer you to my previous post where I said Look at your code, read that post again, and decide whether your code is accurately reflected by the statements I made. -
cURL can't extract a part of a webpage for you. You get the whole thing. How about a better and more detailed explanation of what you're trying to do, what website and "posts" you're talking about, and what's going wrong? Make sure to post your code too.
-
How do I highlight mysql fetch dates in a datepicker?
requinix replied to imgrooot's topic in PHP Coding Help
var highlighted = null; $.ajax({ ... onSuccess: function(data) { highlighted = data; } ... }); -
How do I highlight mysql fetch dates in a datepicker?
requinix replied to imgrooot's topic in PHP Coding Help
The date picker only allows one of itself to exist on #datetimepicker1 at a time. Imagine the types of conflicts there could be if it tried to run twice on the same control. Your first datepicker code needs "highlighted" to know which dates to highlight. Instead of using the variable that comes from $.ajax, use a separate variable, and have the AJAX set that variable. For a brief moment after the page loads, the date picker will be set up and not highlighting any dates, but the user probably won't be able to hit the date picker fast enough to see that being the case. With the datepicker initialization happening outside of the AJAX, you can more easily combine the beforeShowDay and onSelect options into that configuration object datepicker needs. -
Use explode() to break the string into an array of each keyword, then use a foreach loop to output each one in turn the way you want it.
- 1 reply
-
- 1
-
-
php excell search for string and return cell value = a12
requinix replied to Paulqvz's topic in PHP Coding Help
Right now, with the foreach loop problem dealt with, the code will search the entire sheet for the cell. Have you confirmed that part works? If so then you can make the change to the code so it only needs to search the first column. -
php excell search for string and return cell value = a12
requinix replied to Paulqvz's topic in PHP Coding Help
I keep asking that question because you don't know the answer. No, actually, it does not. getActiveSheet() returns a single PHPExcel_Worksheet object - as seen in the other places in your code where you call that method. Which means this foreach ($objPHPExcel->getActiveSheet() as $worksheet) { does not make sense. -
Some routes are set up in ways other than web.php - look at the auth system, which is what normally handles logins.
- 1 reply
-
- 1
-