Skip to content

Laravel sync users to all of categoires which they can be unlimited

In our web application each user can create multiple nested category by selecting the parent which that specified with category_id column. now you supposed one of our user created this category structure: multiple nested categories children are unlimited, that means every category can be have child and we can…

what is the correct way to access this multidimensional array with PHP

I cannot seem to find the correct way to access the VAT value of this array… In my limited knowledge i’ve tried: and lots of variations of this but cant seem to figure it out can anyone help me understand the syntax i need to access it or if i need to change my array at all. Thanks Answer The

PHP flock does not lock second run of the script

I trying to implmente a simpler version of the code in this answer: How to detect whether a PHP script is already running? The problem described here is my EXACT situation. I want to prevent cron from launching the same script if it’s already running. I started with this simple test code: As I understan…

dealing with forms in php

I have only one php file called index.php. I have created there a form with one input text element and one input submit element. When I click on submit I want to deal with the value from the input element in the function that is in the same file, namely index.php. So my question is what to write into action

Dynamically get path to file

I’m making a website and I’ve moved all the contents of the HTML <head> to a header.php file, in which I link to my stylesheets, etc.. On my other pages I’m including this document. But when I include it in pages that are in a sub folder, the link to the stylesheet is no longer correct…

How to get input from form using PHP/Jquery live?

I have a simple HTML form that includes an input field and a submit button. How can I use JQuery to get the text from the input field live and then send that data to a PHP file that evaluates the data? Form: Edit: here’s what I want it to look like Answer Your current code doesn’t need jquery to

Unable to update a field in phpMyadmin using PHP

I have been trying to update a field in database using php, everytime I run the script there is no effect on the table. Here’s how my code looks : where $link is the connection variable which is working fine with other queries. Here’s the table structure. The $result variable is returning true. I …