n00b al3rt! 😕
I am not even sure if I am going to be able to describe what I am trying to figure out but I will try my best.
INFO
I have two tables in my db, one for PRODUCTS, and one for ADs. One of the fields in the PRODUCTS table is called
sponsor
The AD table contains the information for each sponsor. It contains 3 fields. They are sponsorimage, sponsorname, and sponsorurl .
Each product has a different sponsor.
I would like to somehow pull the appropriate information for each sponsor into the correct place on each product page.
So for example ...
I have a product like "Cool Cellphone" and it is sponsored by "Wicked Phones LLC". So the code would be something like:
echo "<img align=\"left\" src=\"$sponsorimage.jpg\">Thank you to <a href=\"$sponsorurl\">$sponsorname</a> for donating this product!>";
So in the PRODUCTS table, if the sponsor field says WickedPhones then I'd like to pull the relevant sponsor info for WickedPhones out of the AD table and insert it in the page.
I am getting mixed up on the necessary code to call these two queries together and pull from the appropriate table.
I hope any of this has made some sense.
I am just learning PHP and I have read a lot of stuff but then I try to apply what I have read in a book or seen in a tutorial to my specific needs and I can't seem to tweak what I have learned to do what I specifically need. I mean if I was building an address book or any of the other tutorials I have read I'd be golden 😉 but for what I'm doing I can't seem to find reference material. Hence I'm asking a lot of questions here and I apologize.
Thank you in advance for any help.
Elaine