I’m trying to make an investment website where I want to set an expiration date exactly after a year that the registration was made. Upon the registration, an initial deposit is required which is the …
Get connection handle details of Oracle resource handle in PHP for debugging validity of connection
Scenario I use a function, namely oci_connect, to connect to an Oracle database. Outputting oci_num_rows($handle) displays 0, which does not correspond to another page output that displays a value …
Server document root and folder in different machines
I am using tDPDF to use unicode font. The problem is that i am creating my web page using xampp, testing on Raspberry Pi LAMP server and uploading on my server. All of them have different server document root address which it is causing an error on a unicode file(php). It has the following line Xampp File I m…
PHP: how to correct if else statement to check if POST array is empty or not, and if not check REGEX to continue
I’m working on an e-commerce website project, and I’m trying to validate customer’s information using PHP. And I’m here trying to check if the customer put his/her phone number, and to check if the …
Laravel how to register a user with a default image in user::create
I wanted to make it that when you register a new user it comes with a default picture : https://upload.wikimedia.org/wikipedia/commons/8/89/Portrait_Placeholder.png I tried something like this but it …
How to filed form fields based upon user selection in php?
I’ve build a form but I’m kind of stuck at this thing where I have a yes or no field, and upon selecting yes some of the fields should appear otherwise those should be hidden if the user selects no. I’m not sure how to do it. Here’s the code: Answer New here and also learning. Hope I&#…
Problem with loading modal in bulma with Laravel
I have a link on one page that goes to another route where when clicked I want to open modal. I am using bulma with Laravel. Currently when clicked it goes to that route and it shows plain html and …
Ajax how to find something in array of objects via find method
In backend PHP I have this defined in loop: and then final list is created: In javascript I am getting these results via ajax call: The first console.log(result); gives me all data something like: but console.log(this.myoutput.approved); gives me undefined. Is something what I am doing wrong here? Answer The …
Jquery/ Ajax: Send additional php variable to server sided script
I have this select box. The selected option is sent with ajax to a server side script. 50&…
PHP loop increment quirk – (FizzBuzz in one line)
I am learning PHP. I decided to adapt a solution to the famous FizzBuzz problem from Javascript to PHP, just to see how JS and PHP compare. For those who forgot what the FizzBuzz problem is : Write a …