-
Posts
15,227 -
Joined
-
Last visited
-
Days Won
427
Everything posted by requinix
-
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
-
php excell search for string and return cell value = a12
requinix replied to Paulqvz's topic in PHP Coding Help
Pay very close attention to the question and try to answer it directly: Does getActiveSheet() return multiple values? -
An infinite loop and a runaway recursive algorithm spawning cloud resources to process its workload are two very different things. Much harder to believe that the former could create a $72K cloud bill than the latter. I'm just going to side-step the whole issue of you not understanding how CPU usage works, and move on to the answer: if you have to worry about micro-optimizing your PHP code to minimize the number of CPU cycles then you do not have the budget to afford the cloud. Buy some traditional, dedicated site hosting package instead.
-
php excell search for string and return cell value = a12
requinix replied to Paulqvz's topic in PHP Coding Help
You're correct, that code does try to search the active worksheet for a cell containing a value. -
php excell search for string and return cell value = a12
requinix replied to Paulqvz's topic in PHP Coding Help
foreach ($objPHPExcel->getActiveSheet() as $worksheet) { foreach is only for multiple values. Does getActiveSheet() return multiple values? I don't see anything in your code that tries to do this. If you need help making code work then you're going to have to post the code. -
How do I highlight mysql fetch dates in a datepicker?
requinix replied to imgrooot's topic in PHP Coding Help
I don't know what you think, but that is not a date. That's a bunch of numbers and hyphens. Would you expect this $.post('snippets/adapter-fetch.php', {}, function(data) { $("#datetimepicker1").datepicker({ datesEnabled : "2021-06-022021-06-032021-06-01" }); }); to work? Keep thinking in that direction for a few minutes and see what you can come up with. -
How do I highlight mysql fetch dates in a datepicker?
requinix replied to imgrooot's topic in PHP Coding Help
Exactly what did the alert show? Or change your alert to a console.log and copy/paste what you get in the console. -
How do I highlight mysql fetch dates in a datepicker?
requinix replied to imgrooot's topic in PHP Coding Help
Definitely not the correct syntax. You familiar with Javascript much? May be worth spending an hour or two learning about it. -
How do I highlight mysql fetch dates in a datepicker?
requinix replied to imgrooot's topic in PHP Coding Help
Have you looked at what output adapter-fetch.php is returning? -
I believe people felt the same way about their horse and buggy when Ford introduced the car.
-
You cannot combine PHP code and Javascript code. Fundamental concept, that. You can use PHP code to output Javascript code. Such as a line of code that sets a variable. Then your Javascript code could use that variable to decide whether to mark the option as selected. But really, document.write? What is this? The '90s?
-
There could be some minor differences based on how the system actually works, but yes: that's more or less correct. If the result of submitting the form is only showing a picture then it'll probably be easier if you don't use a new page: 1. Submit the form data through AJAX. 2. As that request begins processing, use some sort of busy placeholder (modern designs have spinning circles) where the image will appear so the user knows something is happening. You'll also probably want to prevent additional form submissions, such as disabling the submit button. 3. When the request completes it returns the image. That could be a URL or it could be a raw image. 4. Put that image where the placeholder was.
- 2 replies
-
- swirly crap
- loaders
-
(and 1 more)
Tagged with:
-
Use a "remember me" cookie: the session cookie continues to do what it's doing now, and you set another cookie (which may live up to 4 months) that can be used to log the user back in automatically.