GuzzleHTTP how to get Request Header

I want to print out the request header of a POST request, but I can't find the answer by searching the web. Can someone explain how to do this? I have this array that I pass in the POST request as $value. I want to see how it's parsed in the GuzzleH...
more »

2017-09-18 21:09 (1) Answers

Symfony form save duplicated old data

The users can create projects with a form on a pop-up using ajax. They use Chrome to get to the tool. The problem is that some times when they create a new project, the form saves the information of a former project, so they loose the new project's ...
more »

2017-09-18 16:09 (2) Answers

Laravel slugs in routes

I'm hoping this turns out to be a simple situation that I have just overlooked in the documentation. I am refactoring our web application to utilize slugs in urls. Our company allows many organizations to register, each having their own page and sub ...
more »

2017-09-18 15:09 (4) Answers

Laravel validation with comma in the value

I'd like to use Laravel's "in" validation to validate data coming from a "select" input but some of the options in the select might contain comma which is a special character in validation string. Is there a way to escape commas. Eg: if the select ha...
more »

2017-09-18 13:09 (1) Answers

PHP Json values with a specified label

I am using json_decode and echoing the values using a nested foreach loop. Here's a truncated json that I am working on: [{"product_name":"Product 1","product_quantity":"1","product_price":"2.99"},.... and the loop foreach($list_array as $p){ ...
more »

2017-09-17 20:09 (2) Answers

zend framework 3 Select tag validation

I am getting the error: The input was not found in the haystack After form post. Please see the selection tag code lines below: // Add "roles" field $this->add([ 'type' => 'select', 'name' => 'roles', ...
more »

2017-09-17 18:09 (1) Answers

Compare two sql tables

I have two tables, one with text strings, and one with words. How do I take each string/row in TABLE A and see how many of the "words" from TABLE B each string in TABLE A contains - and get a result like this: TABLE A id: 1 contains 2 words (car,...
more »

2017-09-16 23:09 (3) Answers

store date picker value in database

I am trying to store the value of the date picker in my database. so far, i have been able to store the other values but not the date picker value. Form: <form class="form-signin" name="Register_Form" method="post" action="reg...
more »

2017-09-16 21:09 (2) Answers

Laravel Unique keyword for particular Column

I'm using "unique" keyword for validating unique users for employee_id in controllers, in my database there is column called company_id , while adding new user they will be set us some company_id ,when i add new user for my company employee id will b...
more »

2017-09-16 10:09 (2) Answers

How to update Woocommerce Order API using Guzzle

I can able to get the Order Details using guzzle. But i can't able to update the Order. Here is my code: use stdClass; use GuzzleHttp\Client; use GuzzleHttp\Psr7\Request; $data = new stdClass(); $data->fulfillment = new stdClass(); $trackingU...
more »

2017-09-16 09:09 (1) Answers

how to create a <img> copy to clipboard?

need some help. How do i change the below code so that i can create when user clicks the button a image tag will be copy to the clipboard and and user can paste it in the address bar <?php $arr = array('1'=>'goo.gl/kgVQMc', '2'=>'goo.gl/cqh...
more »

2017-09-16 06:09 (0) Answers

Dropdown Click PHP Data From mysql

<div class="btn-group m-b-5"> <button type="button" data-toggle="dropdown" class="btn dropdown-toggle btn-info"> Ana Kategori <span class="caret"></span> </button> <ul role="menu" class="dr...
more »

2017-09-15 19:09 (1) Answers

PHP regex last occurrence of words

My string is: /var/www/domain.com/public_html/foo/bar/folder/another/.. I want to remove the root folder from this string, to get only public folder, because some servers have multiple websites inside. My actual regex is: /^(.*?)(www|public_html|pu...
more »

2017-09-15 15:09 (2) Answers

Custom configuration in Symfony

I need to define such configuration parameters as the contacts of the company (phone, address etc) for using in twig templates. How am I supposed to make it? The most obvious way to me is adding them into the app/config/config.yml file like this: # ...
more »

2017-09-15 11:09 (2) Answers

Get HTML from XML tag

I had to get HTML from body tag of this XML file. Code: $doc = new DOMDocument(); $doc->load('https://m360-dev.opoint.com/api/feeds/f201637e-2524-4a56-8504-73090f532c91/view/'); foreach($doc->getElementsByTagName('document') as $node){ $b...
more »

2017-09-15 07:09 (1) Answers