PHP

PHP
1 year ago

Cannot send hidden input in $_POST PHP

PHP
I have a table with users, when I click icon it redirects me to '/edit.php' where I have form: <form action="form.php" class="form-horizontal col-...
1 year ago

Undefined Index Error in Wordpress

PHP
I have this code in Wordpress, with undefined index error for $option_name. The options are saving correctly but I'm getting the error. I have it wr...
1 year ago

How to validate picture captcha..?

PHP
Here i have tried out giving user a picture captcha using google api..But the problem is even if user click on submit even without submitting captcha ...
1 year ago

How to inject method result of a service as an argument for another service?

PHP
I have a FooService that's fetches some data from another config service. I have that config service as the config is different depending on the requ...
1 year ago

PHP code for insert checkbox value into spesific column on mysql with select form

PHP
I need help php code to identify my checkbox value insert in to some spesific coloumn, my form like this. <input type="checkbox" name="A" Value="A...
1 year ago

diffence between ::class and get_class in Datetime class

PHP
Can you explain the difference between ? get_class($instance) and ClassName::class <?php // PHP 5.5 var_dump(get_class(new Datetime())); // strin...
1 year ago

Saving wordpress settings api options with ajax,

PHP
I have been wrestling with this problem for quite some time now. I have an options page for a theme, and a single option registered. I have been tr...
1 year ago

Measuring the distance between two coordinates in PHP

PHP
Hi I have the need to calculate the distance between two points having the lat and long. I would like to avoid any call to external API. I tried to ...
1 year ago

PHP file structure for a simple website?

PHP
I have been working with PHP for a couple of years now but I don't consider myself any more than a moderate programmer. While creating some websites ...
1 year ago

Websockets - Getting Data (Polling?)

PHP
This may be a silly question to some who have wrapped their head around it already and maybe I just need more coffee. Question: Whether using websock...
1 year ago

Ajax Upload image

PHP
Q.1 I would to convert this form to ajax but it seems like my ajax code lacks something. On submit doesn't do anything at all. Q2. i also want the f...
1 year ago

Zend framework 2 Rest API : Calls getList() instead of get($id) function

PHP
Following is my module config file return array( 'controllers' => array( 'invokables' => array( 'RSMobile\Controller\User' => 'R...
1 year ago

PHP Simple HTML DOM - get text from element without css class

PHP
How to get content of an element, only if element doesn't have class? I'm using PHP Simple HTML DOM to get content from external page. $html = file_g...
1 year ago

PHP: date "Yesterday", "Today"

PHP
I have a little function that shows latest activity, it grab timestamp in unix format from the db, and then it echo out with this line: date("G:i:s ...
1 year ago

Passing price variable to PayPal with custom button

PHP
I have a form and a custom paypal button but I am not sure how to pass the value/price variable to paypal. <form action="https://www.paypal.com/cg...
1 year ago

Update current page on submit

PHP
<body> <form method="post" action="index.php?module=membres&action=forum"> <table id='forum'> <tr...
1 year ago

Manually Creating A Paginator in Laravel 5.1

PHP
I try to create a pagination instance manually like the following use Illuminate\Pagination\LengthAwarePaginator as Paginator; public function cre...
1 year ago

How to do a loop (foreach) in PHP

PHP
I am trying to scrape some strings (colors in the example below) but can only manage to scrape the first string (blue): <?php function extract...
2 years ago

How to access protected lastPage property from result set

PHP
I am using laravel 4.2 and for some reason i need to access the lastPage property in my view which I failed. Here is the code of my controller when pa...
2 years ago