Web development and programming questions and answers

People's Q&A on programming or web development questions, answered quickly and constantly updated


php - smtp email with pear library is not working gives error

Solution:https://support.google.com/accounts/answer/6010255?hl=en You probably have to allow "Less Secure Apps" on the used google account.

Read More


php - Laravel 5.6.15 does not want to accept my post requests

Solution:You need to allow the sending of Cross-Origin Resource Sharing headers You may want to connect this library https://github.com/barryvdh/laravel-cors

Read More


php - Timber/WooCommerce 3.3.x issue?

Solution:In case someone else is running into a similar issue, the cause of the problem is the hook used to add WooCommerce support to the theme. I usually use

Read More


php - Not Redirecting header() . Not echoed anything

Solution:There could be some warning which is not produced on your localhost server, but gets printed on Godaddy's server thus blocking theheader() function. Yo

Read More


php - laravel execute code after return

Solution:Using Laravel, you can run such tasks after sending the response to the user. It works by keeping the PHP process alive to run the tasks after closing

Read More


can any one help to me to get variable from jquery and use in php

Solution:I understand the question and the answer is going to be complex. First you need to add onChange event to your ProducerType selectbox. Add this at the e

Read More


PHP MySQL if row exists not doing anything

Solution: if(mysql_num_rows($check)>0) { echo " "; } else { C

Read More


php - String of file_get_html can't be edited?

Solution:file_get_html() returns an object, not a string. Attempting to concatenate a string to an object will call the object's_toString() method if it exists,

Read More


php - Modify files in /vendor directory and commit changes to composer.lock?

Solution:You should fork the package, create a custom repo with your changes - then include that in yourcomposer.json. { "repositories": [ { "ty

Read More


php - After woocommerce/wordpress registration

Solution:WordPress core handles user registration and runs the hook right after a user is registered. Taking from the codex an example would be: add_action( '

Read More


php - Zend Framework 2: Extend ZfcUser with own fields

Solution:There are two possible methods: Build custom classes extending ZfcUser's entity, form and input filter and add your custom fields. In the ZfcUser conf

Read More


php - Symfony Doctrine One to Many does not insert foreign key

Solution:Firstly, you have to understand that Doctrine and Symfony does not work with id's within your entities.In Einsatztag entity, your property should not b

Read More


php - Apache2 ModSecurity2 does not work (Ubuntu 14.04)

Solution:The rules at modsecurity_crs_43_csrf_protection.conf is looking a CSRF attack, however, the one you are trying to execute is not CSRF. You could try th

Read More


php - Merge rows between two arrays of objects based on column value

Solution:Merging objects is noticeably more tedious than arrays. I'd be tempted to convert the array of objects to an array or arrays in my own project, but I w

Read More


php - captcha code interfering with form handler

Solution:You try to send HTTP header inverify.php: header('Location: contact-form-thank-you.html'); Copy code after sending HTML comment in first line, which is

Read More