Skip to content

cURL to get XML response from an API not working

When I try the url for API endpoint directly in browser, it works and returns XML data, but when I try with cURL, it returns 01 – Unavailable service error, so the issue must be with my cURL code. PHP: Direct URL that works and returns XML data: Answer Rather than trying to send the url parameters withi…

Attempt to read property id on bool in Laravel

i tried assigning a value to a variable in an if condition I get this error Attempt to read property “room_id” on bool meanwhile $hotel variable is not a boolean Answer Your code can be processed by the compiler as in that case you can see $hotel is a bool result from the && operator. You …

apt-get command not working on xampp, running windows 11

I’m facing error in wordpress on my local server while trying to edin an image, it says “Image rotation is not supported by your web host.” I have a Windows 11 64-bit PC that runs a XAMPP. I need to install a few things on this Apache server via command line, so I’m going to the &#8220…

Insert data in a different table sql/ php

Could you please help me i have two different tables table tbl_users: table travail: I put idjob as a foreign key .* And I want to insert the value of job in the user table and i don’ know how the following code of “job” section register.php: Users.php: Answer In your register.php, it would …

Post Method only posting last value fetched from database

I am displaying list of items(multiple entries) from database on one page. I am trying to post all those values fetched from the database to another php file to add item to cart. But when I press ‘add to cart’ button for any item in the list, it is only sending last item through POST. I know it is…

Laravel PHP restart interrupted job where left off

I have a problem. I need to write a Laravel application that reads a json file and writes the content to the database. What is important is that the application can be closed (interrupted) at any time and the application needs to continue where it got interrupted. Now the main writing part is working with bac…