PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have a code where it takes all results from an employment table and puts them into html tables. Im using java to make it where you click on the title and the rest of it shows up. my problem is when it supposed to echo all the results, it picks the newest one only, instead of sorting and showing all of them. once again im lost, most of the code is in php, but i am inculding the java as well, ill post it in the php part for now (sorry if im not supposed to i dont know)
awsome it worked, thank you! i do have one more question though on another part of the code. where you see it pull up the div in the html, i cant figure out how to pull it up for each title. it only works on the first one, no matter which link you click for the title, and it only shows up under the first field in the db. its probably something simple i overlooked like looping
theyre all in the original code i posted above. what im trying to do is make it where the $title is clickable and when you click it from one of the results it will show up the $desc and $job according to that $title, all in the row in the db. i hope im making sense
my problem is it only shows up the first results $job and $desc when you clikc on any $title. i have all the $titles showing up now, i just need to have them show the correct info in the correct spot when you click on different $titles.
heres an example too http://cyril.ulmb.com/employment.php
Want you want is complicated to implement because you need to know which title has been clicked.
You could use XMLHttpRequest (in other terms AJAX) to send the data (title) and receive the information you want (description, job). It' s not complicated, look at this example.
But if you want to do it your way you need to have an identifier for each title and to use JavaScript to read that identifier and display it. You make in JS a function that makes a window which takes a parameter a number or a letter (give it in php) and for that number letter you associate the data you want to display.