I am a newbie so I want to know if what I am asking is possible. I have a SQl Select query that returns a While loop and I convert the results (peoples names)to a php Array. In a another SQL Query …
Tag: php
redirect to 404 page instead of Fatal error: Uncaught ArgumentCountError: Too few arguments to function
I made an MVC framework for training, and I get this error and I’m not sure what is wrong with my function. when I open link like this : http://mvctrav.com/posts/show/6 it show me the post but when deleting the id like this http://mvctrav.com/posts/show/ it shows me the error My error looks like this: a…
How to pass variable to markdown? laravel mail
I am using MailMessage to send a mail message to mailtrap, and I pass a variable email. My problem it doesn’t recognize the variable that I pass in the markdown. It returns an error below Facade…
DOMPdf not generating PDF on production server, only showing code
I have a working DOMPdf generation from HTML on a local server. I uploaded it to my production server and from my first tests it seemed to be working. Now a couple of days ago I started receiving reports that the PDF generation only shows symbols and letters. So, I checked and did some testing and apparently …
Keeping variables in a class after refresh PHP
i come here with a question: I have a class User created in a php file, this class is included in 2 main files, it’s there any chance to save values in that file? I mean, in the moment when i refresh the page, my variables saved in class are gone, and i want to save them without using $_SESSION.
How to add constraints to existing keys using laravel migration
I currently have a database in my project which has already been put in production. But I didn’t use constraints in the previous migrations. Now I have tables products, shops and an intermediate table product_shop. The problem is that if I delete any product, that has been put on some shop, the pivot is…
PHP BCMath cannot handle the exponential number if it is passed to its function, PHP BCMath return “ bcmath function argument is not well-formed”
I working on the few of the small decimals like 0.0000687, 0.0000063241, 0.0000454. I used BCMath as to get the most precise result because it involved with money calculation, so far BCMath it is very …
subcategory will not show as parent category
I am trying to get my subcategory based on the category here is my code
Category <select id="categoryList" …
How to fix Illegal offset type in Drupal/mystore/vendor/composer/composer/src/Composer/DependencyResolver/Pool.php:61
I’m very new to Drupal and trying to install it with composer. My composer install went well, but now, each time I try to do something, I get this error in the console : I get the feeling that this may be a compatibility issue ? Here is my composer.json : I have absolutely no idea how to fix this,
Get different values of same string in PHP
I have checkboxes of categories in a form. When checkbox is changed, from is submitted through ajax and get the values in PHP. //form I get the form data and submit through ajax In PHP, I am getting input fields as a string I tried to get the inputs values of category using explode, parse_str but could not ge…