Skip to content

Tag: php

Unexpected end of JSON input ajax

Here is what is going on. I have an error in my Ajax code that is causing the following error: Unexpected end of JSON input ajax Here is my code: I’m getting data from an array by doing the following: Then I’m parsing the JSON by doing the following: Based on the code, what could be causing the is…

How do I get data from another table in MySQL?

I’m currently trying to link some databases up for a project I’m working on for my business. Here’s my below SQL I’m using for my PHP website. At the moment my output goes like this to show what’s in each row using e.g. $lname=$lname[“variable”] I have another “…

Adding Custom Footer to page Template

I have made a custom footer layout using “dummy” content to start with. This is the footer html To get this to display on the bottom of my last “scrolling section” (#contact) I have added this html footer to : page-templates/template-full-page.php However my footer is not displaying at…

Laravel only one friend_id per user

I’m only starting with laravel and was wondering if anyone could help, I’ve created a friend_id and user_id from the database and have made a form in the view that adds the user_id to the friend_id (not sure what the terminology is for anything yet XD) everything working fine but each time I press…

Create array from DOM node values in PHP

I’m trying to create an array of amazon product variants using DOM php, My desired array should look like; Here is my code: Though my code is working but there are some mistakes in code and it might wont work for all amazon products. so I need suggestions and improvement. and also my output is a json ob…

PHP trying to simply a repetitive script involving rowsets

I’m trying to simplify a repetitive script that I’m doing in PHP. I’ve looked at a few loop options but since it involves rowsets being returned from a MySQL stored procedure it’s not acting properly. I’m doing this same script about 15 times to return all the data. Ultimately I&…