Search found 688 matches

by chorn
Wed Dec 02, 2020 4:59 am
Forum: PHP General
Topic: How to Get Country ISD Code
Replies: 1
Views: 397

Re: How to Get Country ISD Code

just go to wikipedia and copy the list.
by chorn
Thu Nov 26, 2020 4:56 am
Forum: PHP coding => General
Topic: $_GET question
Replies: 1
Views: 364

Re: $_GET question

get is an array, not a function, so you get an error message for that, if not set your error reporting right

https://www.php.net/manual/en/function. ... orting.php

https://www.php.net/manual/en/reserved. ... es.get.php
by chorn
Thu Nov 26, 2020 1:03 am
Forum: PHP coding => General
Topic: handling session variables when the same page is opened
Replies: 12
Views: 1549

Re: handling session variables when the same page is opened

what do all the terms "page", "instance" and "open" even mean? you have a sequence of request/responses that incorporate different data like URL, POST-Variables and Cookies that may contain one or more session-IDs that link to one user.
by chorn
Wed Nov 18, 2020 5:49 am
Forum: PHP coding => General
Topic: PHP sessions not working in my server after refresh
Replies: 3
Views: 522

Re: PHP sessions not working in my server after refresh

at least session_start() is missing.
by chorn
Tue Nov 17, 2020 11:06 pm
Forum: PHP coding => General
Topic: Please help me to print the below array using for loop
Replies: 4
Views: 603

Re: Please help me to print the below array using for loop

So what did you try? i see no for loop.
by chorn
Sun Oct 25, 2020 10:57 pm
Forum: PHP coding => General
Topic: P2P Crypto Exchange
Replies: 2
Views: 462

Re: P2P Crypto Exchange

sounds like you get a 500 error, have a look into your server log file.
by chorn
Fri Oct 16, 2020 2:07 am
Forum: PHP coding => General
Topic: Crazy weird 403 Error triggered by URL keyword?
Replies: 3
Views: 461

Re: Crazy weird 403 Error triggered by URL keyword?

something in the .htaccess file?
by chorn
Thu Oct 15, 2020 10:17 pm
Forum: PHP coding => General
Topic: Ajax call executed the last
Replies: 5
Views: 642

Re: Ajax call executed the last

basically the A in AJAX is for async, and that means everything you do happens more or less concurrently without blocking, so you have no predictive "last" operation.
by chorn
Mon Oct 12, 2020 10:22 pm
Forum: PHP coding => General
Topic: Array - Print a value from a a key
Replies: 2
Views: 371

Re: Array - Print a value from a a key

you should always use print_r when looking at the source code in the browser or set a <pre> tag around it, so you would see that "id" is within the _data property of the object.

$obj->_data['id']
by chorn
Fri Sep 25, 2020 3:31 am
Forum: PHP General
Topic: Problem import information from csv file with PHP
Replies: 1
Views: 309

Re: Problem import information from csv file with PHP

$imports is undefined.
by chorn
Mon Jul 20, 2020 6:08 am
Forum: PHP coding => General
Topic: nearest GPS location
Replies: 1
Views: 428

Re: nearest GPS location

At least you would need a database with all airfields and the corresponding coordinates. As "nearest" is a distance between two points, you need a starting point. Then you need some euclidian math to calculate the distance on a globe. And you need to know what you mean by "widget" (i dont know what ...
by chorn
Wed Jul 15, 2020 3:32 am
Forum: PHP coding => General
Topic: PHP Contact Form Not sending Dropdown Values in Email When Submitted HTML
Replies: 2
Views: 491

Re: PHP Contact Form Not sending Dropdown Values in Email When Submitted HTML

what does var_dump($_POST) show you? at least one of your dropdowns is namen "shirtsize" but you are not using this in your PHP anywhere. You shouldnt use mail() this way for security reasons, hackers will use your form spamming other people, try PHPMailer instead.
by chorn
Wed Jul 15, 2020 3:28 am
Forum: PHP coding => General
Topic: php on page load inset some stuff into a database column?
Replies: 1
Views: 386

Re: php on page load inset some stuff into a database column?

Code: Select all

// create PDO connection https://www.php.net/manual/en/book.pdo.php
// do query https://www.php.net/manual/en/pdo.query.php
// add interval https://www.postgresql.org/docs/current/functions-datetime.html
// update columns https://www.postgresql.org/docs/current/sql-update.html
by chorn
Wed Jun 03, 2020 1:13 am
Forum: PHP General
Topic: Frameworks, is it worth using them?
Replies: 1
Views: 407

Re: Frameworks, is it worth using them?

Frameworks are worth a look, most of them have dedicated security pages to learn from. But at least they are standard tools for every-day programming, so they might not fit your special needs. Database abstraction is essential, so you should go test that, mostly you can bypass the models and realtio...
by chorn
Wed Jun 03, 2020 1:08 am
Forum: PHP coding => General
Topic: php mobile website testing for multiple websites (bulk)
Replies: 1
Views: 365

Re: php mobile website testing for multiple websites (bulk)

what is "not working" and what does that mean? where is the code?
by chorn
Wed Jun 03, 2020 1:08 am
Forum: PHP coding => General
Topic: HTML Porfile template to php profile
Replies: 1
Views: 416

Re: HTML Porfile template to php profile

And whats the problem there? You got the key within the URL, take that and read out contents from your database.
by chorn
Wed May 27, 2020 5:52 am
Forum: PHP coding => General
Topic: Newbie variable scope question
Replies: 1
Views: 417

Re: Newbie variable scope question

Code: Select all

$sprunje->extendQuery(function ($query) use ($id) {
	return $query->where('owner_id', $id);
});
by chorn
Wed May 27, 2020 5:50 am
Forum: PHP General
Topic: Retrieving form data from JSON using PHP
Replies: 1
Views: 442

Re: Retrieving form data from JSON using PHP

what is var_dump($json_data) ?
by chorn
Wed May 06, 2020 4:04 am
Forum: PHP coding => General
Topic: construct specific JSON file from db with php
Replies: 6
Views: 729

Re: construct specific JSON file from db with php

you're just dumping stuff into that array. What you need is an array of objects (or asociative arrays) with proper keys and a counter, like while($section) $id = $section['id']; $result[$id]['label'] = $label; while($cpick) $result[$id]['items'][] = $cpick; $values = array_values($result);
by chorn
Tue Apr 28, 2020 4:34 am
Forum: PHP coding => General
Topic: How to capture and save User_Agents list one by one?
Replies: 2
Views: 335

Re: How to capture and save User_Agents list one by one?

but it's not working.
what should that mean to anybody not sitting right in front of your computer?
by chorn
Mon Apr 27, 2020 8:41 am
Forum: PHP coding => General
Topic: Help with serialize function and unserialize
Replies: 3
Views: 434

Re: Help with serialize function and unserialize

why did you serialize this data anyway? just run a script that reads out all records, unserializes them and write them back to database.