Search found 645 matches

by chorn
Fri Mar 13, 2020 12:27 am
Forum: PHP General
Topic: Problem : Slow fetching data on table [codeigniter]
Replies: 2
Views: 134

Re: Problem : Slow fetching data on table [codeigniter]

you could try PDO . Or use the admin tool for your database to make the raw query.
by chorn
Thu Mar 12, 2020 2:40 am
Forum: PHP coding => General
Topic: 'exit' in registration system.
Replies: 2
Views: 115

Re: 'exit' in registration system.

why the hell is there a maximum of 20?
by chorn
Thu Mar 05, 2020 1:22 am
Forum: PHP coding => General
Topic: Is a BB parser needed in PHP7
Replies: 1
Views: 177

Re: Is a BB parser needed in PHP7

if you want to parse BBCode, you'll need a BBCode-parser ¯\_(ツ)_/¯
by chorn
Thu Mar 05, 2020 1:21 am
Forum: PHP coding => General
Topic: How to read multi part object/array
Replies: 1
Views: 155

Re: How to read multi part object/array

you follow every array by using [] with the appropriate key, and every object with -> with the property key.

$array['key_holds_object']->object_property['key_of_property_array'] etc.
by chorn
Wed Feb 26, 2020 1:24 am
Forum: PHP coding => General
Topic: Never ending loop. does not end.
Replies: 1
Views: 171

Re: Never ending loop. does not end.

so what does it look like if you var_dump($rowCountUpdate) ? As it depends on $updated you should also var_dump that. But at least you are not even using the result of your substraction.

hint (first comment): https://www.php.net/manual/en/language. ... gnment.php
by chorn
Wed Feb 26, 2020 1:19 am
Forum: PHP coding => General
Topic: PHP GET Html elements.
Replies: 1
Views: 188

Re: PHP GET Html elements.

There's SimpleXML, built-in into PHP, if you trust that.
by chorn
Mon Feb 24, 2020 1:14 am
Forum: PHP coding => General
Topic: slot machine validation
Replies: 2
Views: 174

Re: slot machine validation

i don't understand what you define as win.
by chorn
Mon Feb 24, 2020 1:07 am
Forum: PHP coding => General
Topic: Popup box with php
Replies: 1
Views: 167

Re: Popup box with php

so what's the condition for the popup to show?
by chorn
Mon Feb 17, 2020 11:55 pm
Forum: PHP coding => General
Topic: Email landing to Spam folder
Replies: 1
Views: 127

Re: Email landing to Spam folder

put the sender on the whitelist in your email program.
by chorn
Mon Feb 17, 2020 11:55 pm
Forum: PHP coding => General
Topic: strlen function giving different values in old and new version
Replies: 2
Views: 178

Re: strlen function giving different values in old and new version

not really

https://3v4l.org/ENpQJ

(check "eol versions")

must be something on your device / platform or some multibyte issue.
by chorn
Thu Feb 13, 2020 11:02 pm
Forum: PHP coding => General
Topic: Automatic store POST vars (array) from form with foreach.
Replies: 1
Views: 126

Re: Automatic store POST vars (array) from form with foreach.

store... where? the keys/values are already "stored" in the _POST variable.
by chorn
Mon Feb 10, 2020 1:23 am
Forum: PHP coding => General
Topic: Can you set an include as a variable?
Replies: 2
Views: 118

Re: Can you set an include as a variable?

just for completeness: as included files can have code, you can assign that too

Code: Select all

// including.php

$var = include('codefile.php'); // $var = 123


// codefile.php

return 123;
by chorn
Tue Jan 28, 2020 11:35 pm
Forum: PHP coding => General
Topic: MYSQL DB not showing uft8 on php page
Replies: 6
Views: 238

Re: MYSQL DB not showing uft8 on php page

You read the docs provided, start making your connection and perform the queries.
by chorn
Thu Jan 23, 2020 11:49 pm
Forum: PHP coding => General
Topic: $_POST does not have the CR LF chars
Replies: 3
Views: 121

Re: $_POST does not have the CR LF chars

Did you have a look at the source code of your resulting page?
by chorn
Wed Jan 22, 2020 6:30 am
Forum: PHP coding => General
Topic: Create zip file from changing list of files
Replies: 1
Views: 120

Re: Create zip file from changing list of files

So if you have a script that works, and the one that doesn't, look at the differences, here it must be the filename

Code: Select all

var_dump('/file/path/to/add/that/works');
var_dump($row['filename']);
by chorn
Wed Jan 22, 2020 2:14 am
Forum: PHP coding => General
Topic: MYSQL DB not showing uft8 on php page
Replies: 6
Views: 238

Re: MYSQL DB not showing uft8 on php page

You should change to MySQLi - or better PDO - soon, the mysql_* functions are deprecated and are already removed in current versions of PHP 7. It looks like you are using PHP 5.x which is outdated:

https://www.php.net/supported-versions.php

https://www.php.net/manual/en/book.pdo.php
by chorn
Wed Jan 22, 2020 2:12 am
Forum: PHP coding => General
Topic: PHP image store and retrieve
Replies: 1
Views: 143

Re: PHP image store and retrieve

just have a look at >> php image upload tutorial <<
by chorn
Thu Jan 16, 2020 10:56 pm
Forum: PHP coding => General
Topic: Finding a date by adding work hours to a date.
Replies: 1
Views: 140

Re: Finding a date by adding work hours to a date.

I would say, you take your start date, fast forward one week for every occurancy of combined sheduled hours within your working hours (50 hours = 1.xx weeks), take the rest with modulus, loop over your sheduled hours, forward one day if sheduled hours are fully covered for that day and subtract them...
by chorn
Thu Jan 16, 2020 12:11 am
Forum: PHP coding => General
Topic: MYSQL DB not showing uft8 on php page
Replies: 6
Views: 238

Re: MYSQL DB not showing uft8 on php page

Did you check the file beeing UTF8 WITHOUT BOM? How do you transfer files? FTP may change the encoding, you can try binary transfer.

Did you try setting SET NAMES statement on database connection?
by chorn
Mon Jan 13, 2020 5:25 am
Forum: PHP coding => General
Topic: PHP MYSQL URL Filtering
Replies: 1
Views: 151

Re: PHP MYSQL URL Filtering

You get URL parameters via the varialbe $_GET. But only unique keys are allowed, or you use an array like ?country[]=france&country[]=spain. After checking all array items against a whitelist, using array_filter() and in_array() or array_intersect(), you can turn them into a comma seperated list to ...
by chorn
Thu Jan 09, 2020 12:58 am
Forum: PHP coding => General
Topic: PHP - IF ELSE ELSE Help (NULL NOT NULL etc)
Replies: 4
Views: 221

Re: PHP - IF ELSE ELSE Help (NULL NOT NULL etc)

still no clue what's wrong / what you want to achieve. you did not answer all questions. i've posted a direct translation to working, tested code from your description.
by chorn
Thu Jan 09, 2020 12:22 am
Forum: PHP coding => General
Topic: Help a newbie please :)
Replies: 2
Views: 168

Re: Help a newbie please :)

Why did you use two single-quotes instead of a double-quote in the second parameter?
by chorn
Wed Jan 08, 2020 6:37 am
Forum: PHP coding => General
Topic: PHP - IF ELSE ELSE Help (NULL NOT NULL etc)
Replies: 4
Views: 221

Re: PHP - IF ELSE ELSE Help (NULL NOT NULL etc)

And what do you expect? What do you define as "wrong"? Which input did you use?

Just write a test: https://3v4l.org/tg5UQ