tier1rep Posted October 19, 2012 Share Posted October 19, 2012 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 Quote Link to comment https://forums.phpfreaks.com/topic/269700-call-from-table-images/ Share on other sites More sharing options...
ManiacDan Posted October 19, 2012 Share Posted October 19, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/269700-call-from-table-images/#findComment-1386469 Share on other sites More sharing options...
tier1rep Posted October 19, 2012 Author Share Posted October 19, 2012 I appreciate the response. I will do alittle more research based on your sugestions and see if i can create what im looking for. Thanks again for the direction. Quote Link to comment https://forums.phpfreaks.com/topic/269700-call-from-table-images/#findComment-1386476 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.