CSRF for internal $_SERVER["REQUEST_METHOD"] form

PHP
Trying to implement CSRF token for the first time ever ... I have an internal $_SERVER["REQUEST_METHOD"] form ... Most of the stuff online talks a...
1 year ago

HTACCESS redirect from subfolder to php file in subfolder

PHP
hello I have a website that includes an /admin folder in this folder I have a login.php file How can I make it redirect the website.com/admin to webs...
1 year ago

curl_multi_add_handle produces an error in file "Unknown" on line 0

PHP
I'm trying to use curl_multi_* to fetch multiple (around 50) URLs simultaneously since doing it consecutively takes a long time. However I get the fol...
1 year ago

How to return elements of an array with the highest values?

PHP
In my code I have two elements which has the same age "Joe"=>"43" and "Rob"=>"43" . My code output is: Joe I want to output: Joe and ...
1 year ago

What determines the view folder structure in ZF2?

PHP
What determines the view folder structure in ZF2? I followed the initial ZF2 tutorial with the Album app and noticed the location of the views for th...
1 year ago

PHP detecting request type (GET, POST, PUT or DELETE)

PHP
How can I detect which request type was used(GET, POST, PUT or DELETE) in php?
1 year ago

Sanitizing and validating form php

PHP
Completely thrown in the deep end - new to PHP and doing a simple form submission (create account page) to send to a mySQL database so apologies for t...
1 year ago

Symfony2 & SonataAdmin: ManyToMany field being inserted twice upon create (causing duplicate primary key error) but works on update

PHP
I'm trying to add tags to a Story entity. I've created my own bundle, form type and data transformer to make use of textext and I thought all was work...
1 year ago

Hot to get to column as an array keys and values?

PHP
What is the Laravel's way to retrieve an associative array in which, the keys are the first column of a query and the values are the second column. U...
1 year ago

How to detect "Google Chrome" as the user-agent using PHP?

PHP
I'm interested to know whether the user-agent is "Chrome" at the server end using PHP. Is there a reliable regular expression for parsing out the user...
1 year ago

PHP Anti-Spam field

PHP
I have a problem with my email form. Everything works fine, except the Anti-Spam field. The anti-Spam field shows me a wrong answer in all situations...
1 year ago

If there is any character after "," then press <space> between them

PHP
I have some strings like these: $str = "it is a test,it is a test"; $str = "it is a test ,it is a test"; $str = "it is a test, it is a test"; $str = ...
1 year ago

Jquery Show / Hide based on checkbox status

PHP
I am trying to customize the local pickup shipping option in woocommerce. Basically, if a Local Pickup option is selected from the woocommerce setting...
1 year ago

Algorithm for creating cells by spiral on the hexagonal field

PHP
Help to find an algorithm for creating cells by spiral on the hexagonal field. Look at the image: Let's imagine an dimensionless 2d array. The X ...
1 year ago

How to sort Illuminate Collection by multiple columns in Laravel 5.1?

PHP
I have a an instance of Laravel's Illuminate Collection. The array contains multiple properties. I need to be able to sort the collection based on 2 ...
1 year ago

one file php working with two forms

PHP
i have two forms (formulaire.html) and (authentification.html), the first i used to lo signe up and the second i use to signe up.. and i have one clas...
1 year ago

PHP in javascript file

PHP
in my .js file i have a line. var sidebarWidth = 120; I need the the number above to be dynamic, so i users can change it in admin panel. I have c...
1 year ago

How can I use data in an input field as a filename?

PHP
I'm attempting to concoct a script for saving form submissions as a .txt file. What I would like to do is use the person's first name as the file nam...
1 year ago

Decorators Zend Framework PHP

PHP
I have a label and i want to change it's color: so i'm doing this: i have my form class in zend: $this-&gt;addElement('text','name',array('label' =&g...
1 year ago

Create page that displays Codeigniter log files on webpage

PHP
I have an admin page that I would like for all of the log messages that are created in my Codeigniter's application/log folder to be displayed on the ...
1 year ago