Jump to content

Call From Table & Images


tier1rep

Recommended Posts

ok so i have 2 questons.

 

1) s it possible build a page in HTML , ID certain tables or text placeholders around the page and have them call data form fields in the table?

 

everything i see is echo'ing or printing the data in a table on the page but not where i need the table to show like next to an imaga or so.. is it possible to set the cell or table as a placeholder to auto call data from the connected database?

 

hope i explained that right.

 

 

2) I seen some posts about this but nothing that i could understand.. what i want to do is make a table call it GFX, have a field called files and have named something liek img001, img002, img003 and so on. and what i want to do is on the website someone can click a drop down list or something labled Photos, they can choose "waterfall 1" and that will inturn load the the waterfall 1 photo labled img069.JPG in my "image" folder. but i wnat the photo to either come up in a specified placeholder on the page or even a popup window, either will be fine...

 

I know its alot. I hope i explained it right. if anyone could answer ether of these i would be SOOO gratefull

 

*********BTW, I will be creating in Dreamweaver cs5 if that matters.

 

 

 

++++++++++++++++++++++++++++

Server info:

Windows server 2008 sp1

webserver IIS7

PHP 5

mysql 5.5

PHPmyadmin 3.5.3

Link to comment
Share on other sites

1) You're not really getting client-server programming. PHP runs and generates a text document, then dies. Then that document shows up on the client's screen (there's overlap, but I'm simplifying for this description). Once the document arrives at the client, the client's browser parses it and does what he needs to do. If the document is plain HTML, it's rendered (you would place tables and images using HTML and CSS). If the document contains javascript, it's executed (you would auto-populate tables after the fact using Ajax). PHP doesn't know it's printing HTML. PHP has no idea about the shape or layout of web pages. PHP makes a string.

 

2) Everything you mentioned here is javascript functionality. Write the javascript function which handles the onchange event for the drop-down and puts the correct image tag in the correct place on your website. PHP can be used to tell javascript where those images are located. The function should be generic so it can be in a .js file, but the drop-down should be generated from PHP using the current values in the table.

 

3)

*********BTW, I will be creating in Dreamweaver cs5 if that matters.
Don't do that. You're not writing code when you're using dreamweaver, you're letting an automated software make a best-guess effort at potentially-working code.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.