hi,
I am having problem. when i load my page like content.php it will give me error of mysql statement because it didn’t got the id of the subject and die.but if i give value in url to variable it works. it means when the page is loaded when it doesn’t find any ID, it dies. here is the get id code i wrote.it has a clause which says if none then its empty. what am i doing wrong?
This is another case where you could have seen the error yourself if you would have echoed out the query like we explained to you.
So you’ll have to decide what your script must do when there is no subject selected, and write the code for it. Just calling the get_subjects query as it is now without passing a subject id isn’t working, as you found out.
Moving the function call inside the if-elseif-else seems correct to me. But you’ve also changed all variable names in that piece of code. What happened to the old ones?
i was able to manage it and it worked but now when i click any link.when the other is not selected/clicked it gives out error saying Notice: Uninitialized string offset: 0
suppose when i click pages.subjects gives me this error and also the other way around with subjects