I’m trying to make my own MVC Architecture and i’m stuck on getting id from url. For example in the url, I have http://localhost/EdelweissMagazine /articles/edit/?id=66 but when I call print_r($_GET[url]) I only have Array ( [url] => articles/edit/ [id] => ) I can’t understand why.. Here is my code. I hope you could help me ..
Category : superglobals
I am writing a login page for a web application. I am using ajax to pass a user name and pwd to a php file. In the php file I started with the following code. if(isset($_POST)) { $uname = $_POST[‘uname’]; $pwd = $_POST[‘pwd’]; } IntelliJ IDEA Ultimate with the php plugin is highlighting the "$_POST" ..
I am trying to create a basic captcha page for a site that I am working on. I am wondering if there is another way to do this without having to use super globals. <?php use GregwarCaptchaCaptchaBuilder; use GregwarCaptchaPhraseBuilder; /* Captcha Creation */ $captcha = new CaptchaBuilder(); $captcha->build(); session_start(); if ($_SERVER[‘REQUEST_METHOD’] == ‘POST’) { // ..
I have php function that is supposed to verify if there is a token, and if so, search my table for a company name that matches. The function works fine when I use xampp in localhost. When I do it in prod on the server, it gives me a ‘token undefined’ error, What could possibly ..

I’m looking for an alternative to get the data inside the $_FILES due to a codacy issue I don’t know how to don’t use directly the superglobals. I can’t use filter_input like I did for resolve the same issue with $_POST Below this, my form : <form class="d-flex flex-column" method="post" action="/image/update/99/trick/144" enctype="multipart/form-data"> <input type="file" name="newImg"> ..
So, I am trying to set a $_SESSION variable and pass it to another page, but the variable on the other page is different than the one it must be. In petitionlist.php the $_SESSION[‘petitionNameT’] = $petitionName1; is being set. The contest of $petitionName1 is different depending on which page you choose to click and it ..