Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

outputting list of Consultant ID's

Status
Not open for further replies.

c0deM0nK424

Programmer
Oct 28, 2007
126
GB
outputting list of Consultant ID's and their Names inside a DIV Box, with a checkbox alongside each row and a 'delete' button next to it.


basicaly Ive got a website that im building, its more of a web tool actualy - that allows one to monitor his/her consultants etc.

The pages all use the same stylesheet and its all CSS. Two DIV elements make my two columns, or boxes rather on the screen.

On the left box I want to somehow retrieve current ID and Consultant name info from my mysql database, and have it output INISDE that box, with either paging or a vertical scrollbar lol

This is what I'd call 'advanced' web designing because to achieve this would require on my part, extensive 'tinkering and experimentation' with snippets of other peoples of code and also trying out things myself from the php manual heh

thats how I learn. Of course I understand some of the easy-moderate level stuff, but then when things get messy or a little too complicated i look at tutorials on the web for assitance etc.


So basicaly, on the main page I have DIV 1 and DIV 2, and DIV 2 will display the consultants by name, ive already done a simply test to see if i could use php inside that particular div class , and it works. So basicaly inside the DIV class - ive embedded my php script, which connects to my mysql database, and does a simple select * from table query.

the results are outputted neatly but go OVER and BEYOND the DIV box boundary (basicaly exceeding the height at thebottom of the div 2 box)

im wondering if its time to brush on my ajax, or is that something irrelevant in this affair ?

it gets comlpicated though when you find snippets of other ppls code and attempt to 'integrate' and 'stick' it in between your own code...especialy when you've already got php scripts running inside div tags : ))

oh and i've got forms INSIDE my divs too - ive succesfully created the 'Add Consultant' form, simple text box with a Add Consultant button - you enter the name and just click that button, and that consultant is added into the Consultants table - i check in PhPMyAdmin - and sure enough, the new consultant has been added - sweeeeet ! ^_^

yeah so cmon you lot - few pointers, tips, hints, advice on how to achieve what im trying to achieve ?

 
Assuming your DIV has a specific height, try setting its overflow property to scroll or auto in the CSS for it.

If not, or that doesn;t fix it, we'd need to see the generated HTML, from the View->Source option in your browser.





----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
few pointers, tips, hints, advice on how to achieve what im trying to achieve ?

Start by explaining more clearly what you are trying to achieve, and the problem you're experiencing in doing so. I've read your post several times and still can't figure out exactly what you're asking.

But I'll make a general point, picking up on this sentence:

ive already done a simply test to see if i could use php inside that particular div class , and it works

Take a step back and consider how php actually works.

It's a scripting language that runs on your web server to generate HTML code within your pages. By the time a page is served up to the browser, the document contains only HTML, and the browser neither knows nor cares which bits of HTML were generated by the php and which were hard-coded.

So, in order to generate any more complicated layout, the first step is to work out what the completed HTML should look like. Try building a page by hand with a 3 or 4 consultants in it, till you get it looking howw you want it. Then think about how to write the php to achieve that markup.

If your aim is to get columns and rows of consultant information, I'd say that's a legitimate occasion to use a table rather than trying to imitate one with divs. But I may not have understood your intentions correctly.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Chris hit it on the nose. You are trying to go at this the wrong way. Design to output. That works IF you know what the output was going to be when you designed.

In this case you dont. So first create your php script and run it and see what HTML is spit out.

Are you returning your consultants in a UL or are then each in their own encapsulated DIV's with each element in their own relevant tag to be able to apply classes?

Once you have that information then you can get to styling your document.

Darryn Cooke
| Marketing and Creative Services
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top