![](https://forums.phpfreaks.com/uploads/set_resources_1/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
chhorn
-
Posts
115 -
Joined
-
Last visited
-
Days Won
2
Posts posted by chhorn
-
-
that's because your update statement is broken. add line breaks to that statement to determine the line that is wrong and think about what could be wrong.
-
you strpos() for the first comma, substr() the string into $quantity and $identifier, then create $countable[$identifier] and assign $quantity if not exists, or add up.
-
setFrom is a function
$mail->setFrom('from@example.com', 'Mailer');
have a look at the documentation
-
Tipp: keep your ears open to the term "rainbow tables"
-
Maybe you read the FAQ of this forum first:
-
Yes, windows OS, there's a linux hint in the thread:
https://stackoverflow.com/questions/8773043/how-to-play-a-sound-file-using-php-script-only
-
the only hint i found was something like
exec('powershell -c (New-Object Media.SoundPlayer "C:\Windows\Media\notify.wav").PlaySync();');
but that's at least windows OS specific, but actually worked on my machine
-
if the software runs on your machine with enough priviledges you can play a sound by using exec() with appropriate comand line arguments to a local mp3-player.
-
that really depends on your task and the data.
-
It's not a bug, parsing print_r is not an inteded feature. if you still think it's a bug, you can just open an issue in the bugtracker, but i bet you get a similar answer.
-
print_r is just a debug function without any format expectations. parsing this is mostly wrong. use a proper data exchange format.
-
1
-
-
if ::1 then echo 127.0.0.1
-
And what's the sql statement then? What data do you expect to show up on that condition? Show an example of both.
-
This depends on the image format an what exactly "resizing" means in this way. When you use the compression feature of PNG the dimensions of that image (width, height, color depth) stay the same and that process is perfectly reversible as PNG is a lossless format, the codec just tries to put as much information as possible into as less bytes as needed, this may result in higher CPU usage. Using JPEG compression you destroy image details and it's irreversible. If you change any dimension or cut something off of your image that information is lost, no matter what format you use. But for the exact details i recommend reading the specification of the image codec.
-
you are updating the record after displaying it. check https://en.wikipedia.org/wiki/IPO_model
also $Submit is never defined, check https://www.php.net/manual/en/security.globals.php
-
replace print_r with var_dump to see what the variables actually contain. Check every condition if it really matches your expected values, like var_dump($residue) and so on. As this is a recursive function it may be of interest to have a static iteration number and all given function arguments to display. As this is a working example (good!) you can test this first online to see if may be a configuration issue on your machine
-
if that info is still in the URL you coudl extract that
https://www.php.net/manual/en/function.parse-url.php
if it's contained in the sourcecode of that page you can try to read this out
-
you need a recursive function then
-
just use the DateTime class with the diff method.
-
so what now? you are sending the ID twice. _If you want to insert, use some other ID. if you want to replace, use an UPDATE statement.
-
So what's the problem then?
-
Looks like you just have to skip some parts
var_dump(new DateTime('Sun, Feb 9 3:00 PM')); /** object(DateTime)#1 (3) { ["date"]=> string(26) "2020-02-09 15:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
then modify() and format().
-
Or
SELECT DATE(timestamp) = CURDATE() -- true or false FROM mytable WHERE whatever
-
location.href = 'foo.php?data='+json.html
var_dump($_GET['data']);
maybe you need to escape that somehow. Or use AJAX.
Rest API caching
in PHP Coding Help
Posted
if you dont have a redis server running, stick to using a file with the functions provided by @kicken - the logic is pretty easy