PHP Display with Variable array

Again please find my code ( repository ) here :

https://github.com/ValComputers/PCAMERICA-ONLINE

The issue I am trying to figure out is my database has 2 tables ( with multiple rows of data / depending on the Item ) I am trying to get the queried data into 2 separate arrays first one being AltSKU and the other being TagAlong. So what I am trying to accomplish is getting each set into an Array so AltSKU(1), AltSKU(2), etc etc ( depending on the items amount of skus ) and the same for tagAlong(1), TagAlong(2), etc etc and have them displayed in their separate text areas ( in the Index9.php file ) I had them working previously but when I switched over to AJAX ( Json ) data calls they stopped working. Please see both photos the first being the original version ( before ajax ) that was working how I wanted it to work and the second being the new ( Ajax ) version that does not do so. I also need to be able to click Add to add a new item to the arrays or delete to remove a highlighted item from the arrays.

image
original version ( with working fields )

image
New ( ajax ) version with NON working fields

I have spent many hrs trying to figure this out but can not seem to get them working properly. Any help would be appreciated

Thank You All

The current code is producing a comma separated list of values and is putting it into a <div></div> in the markup. What was the original code producing and putting into the markup? Possibly a form field, since there are <label></label> elements without a corresponding form field?

Edit: it’s highly likely that the current problem is due to a javascript function named loadAltSkuTagAlong() that’s not present in the provided code. I suspect its purpose is to take the comma separated list and produce the needed markup and functionality.

The issues I am having is the previous code was post / get the new code that is not working with the altsku and tagalong fields are being updated dynamically with ajax ( json ) calls so where it working previously in the old script it does not work in the new ajax type version

Should I update the repository to add a folder with the old version files or are they needed ?

Thanks again for all your help … I would love to work with you directly and would offer to hire you ( pay you to just spend some time with me getting my last few issues resolved ) but that I leave up to you Sir

I really do appreciate you …

Yes, posting the original/working code would help.

Is this missing javascript function named loadAltSkuTagAlong() something that was never written?

How would I add the files as some of them have the same name … not familiar with github < can you add a new folder / directory ? >

A git repository holds your complete file and folderstructure including a history of all changes over time (if you commit and push those changes).

Other developers can jump back to any commit and see what has changed

Furthermore you can have different versions of your code organized in “branches”.
So you can have for example a “production” branch that holds the latest working version but lacks the last added features, plus a “development” branch that holds the bleeding edge of your work etc.

You can also fork from one branch to another to test things out and merge back when everything is fine for you.

If you are not happy with using git client from your command line, you may wanna take a look at Sourcetree:

Sponsor our Newsletter | Privacy Policy | Terms of Service