note 128907 added to wrappers

From: Date: Thu, 21 Sep 2023 09:21:05 +0000
Subject: note 128907 added to wrappers
Groups: php.notes 
Request: Send a blank email to php-notes+get-220866@lists.php.net to get a copy of this message
hi, If you think like me all the time in terms of SCOPE of variables and/or scripts, then you will like this way of doing $_POST without $_POST! we will use an i/o php://input flow during the ajax request we retrieve the key/value variable of the request as follows: $my_variables_posts = file_get_content('php://input'); for example we sent: mypost0=0&mypost1=2 all that remains is to make a small php function with 1 entry and explode 1 time with the 1st separator character & then do a foreach where we explode a 2nd time with the separator character = we rebuild the key/value variable into an array! for example: $postout['mysport0'] = 0; etc... SCOPE is cooler, isn’t it? you want persistence of a page id? use $_SESSION! see you all ; German CASTRO ALBA (Baniwhouais) ---- Server IP: 45.112.84.4 Probable Submitter: 45.91.157.134 (proxied: 92.184.107.252) ---- Manual Page -- https://php.net/manual/en/wrappers.php Edit -- https://main.php.net/note/edit/128907 Del: integrated -- https://main.php.net/note/delete/128907/integrated Del: useless -- https://main.php.net/note/delete/128907/useless Del: bad code -- https://main.php.net/note/delete/128907/bad+code Del: spam -- https://main.php.net/note/delete/128907/spam Del: non-english -- https://main.php.net/note/delete/128907/non-english Del: in docs -- https://main.php.net/note/delete/128907/in+docs Del: other reasons-- https://main.php.net/note/delete/128907 Reject -- https://main.php.net/note/reject/128907 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#220866) next »