Well, I was working on my project and suddenly when I created a new route I get this problem where the route exists but it shows 404 !! so I tried to delete an existing route that is working but when I delete that route still works !! I had this problem previously but I just deleted that route and
Tag: php
Sending and email with the auto Increment number attached to the email using PDO/MySQL
Hello my favorite people! I am trying to send an email after submitting a form, with the AUTO INCREMENT number attached to the email because the AUTO INCREMENT number is the clients Job Card Reference Number. So far i have successfully created the insert script which inserts the data into the database perfect…
Refresh part of page when user navigated back to it
In my shop page, for each product I have cart quantities that the user can change without add to cart button (it’s with display none and activated by js). my problem is that if a user changed item quantity in single product page and navigated back into shop page it show the wrong quantity from cache. Ri…
AES-256-GCM unavailable in PHP ext-sodium on M1 Macbook
Recently at work we’ve had a new hire to work on a project of ours that utilizes AES-256-GCM encryption and decryption via PHP’s sodium extension. Since we all use Macbooks, the new employee received a 2020 Macbook Pro with M1 chip. The first attempt at getting the aforementioned project up and ru…
How to split text string in PHP (Song – Artist)
I have this bit of PHP ?> I want it to show on my page as: Song Artist How would I make the song appear in bold and what would I put in place of the ” – ” to make a line break instead? Answer Assuming you want to generate some HTML that can be picked up by a
How to check the weight of product in cart based on meta_key?
I am looking for a solution to check the weight in the cart based on meta. for example, it prints: : 5kg in your basket is Cold and Hot 2.5kg in your basket is other I use the following loop to check the meta_key: Then after checking products with a special meta, I want to calculate the weight. Would you
Get average of average columns in mysql
I am having a table that stores ratings of a restaurant. As shown in the below image. I am trying to get the average of all these columns in which I am being successful but I also want an average of all these averages as a main average. I tried the below query but I am getting 3 as average
the session created in a page doesnt shares with other
when i create a session in php it still only in one page but doesnt get shared with others the login page code: my login code: and the logoff one: i have noticed that the browser saves a “phpsessid” cookie but it doesnt seems to share with other pages. i tried to print the session id with echo ses…
store data into pivot table laravel 8
i have manytomany relation ship between categroy and product category model product model the pivot table what should i do after this i did not undrestant how attach will work in pivot table and return it with the product as json response ? edit this is the schema i am working on i want to give each product i…
PHP MysqlI – How to Select 1 Row? (from select)
I am a bit stumped on how i should be able to Define 1 post ID, and only select from that row my query: my end goal is to get all from row 3 (only row 3), not get all rows. when i run the query above, i get every row from mysql. example: returns with all rows, what i