| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Account Suspended Join Date: Jan 2008 Location: Stafford
Posts: 993
![]() ![]() ![]() ![]() ![]() ![]() ![]() | Function breaks out of the layout? Hi, I have a function that echo's the navigation for a website, it runs perfectly, BUT, it breaks out of the layout. If i do; PHP Code: The function is; PHP Code: ![]() So if i have; PHP Code: PHP Code: |
| |
| | #2 (permalink) |
| NamePros Member Join Date: May 2008
Posts: 181
![]() ![]() ![]() ![]() ![]() | PHP Code: |
| |
| | #3 (permalink) |
| NamePros Member Join Date: Sep 2006
Posts: 99
![]() ![]() | You're selecting the field site from your mysql database, but trying to print out the field title. I'm not sure if this is one of your issues or not, but it may be affecting the result. Also, whats with the whole "if" "continue" thing...? Bruce |
| |
| | THREAD STARTER #4 (permalink) | ||||
| Account Suspended Join Date: Jan 2008 Location: Stafford
Posts: 993
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Also, i don't want it to echo the "home" one | ||||
| |
| | #5 (permalink) |
| NamePros Member Join Date: Sep 2006
Posts: 99
![]() ![]() | It doesn't matter what "title" is, if you aren't selecting it in your mySQL query, you can't call $row['title']. Try Code: $NAVresult = mysql_query("SELECT title FROM pages WHERE site='$domain' ORDER BY id"); Bruce |
| |
| | #6 (permalink) |
| Senior Member Join Date: Aug 2005 Location: East Yorkshire, England
Posts: 2,689
![]() ![]() ![]() ![]() ![]() ![]() ![]() | blacknet, you're missing a PHP Code: PHP Code: PHP Code: |
| |
| | #7 (permalink) |
| NamePros Member Join Date: May 2008
Posts: 181
![]() ![]() ![]() ![]() ![]() | Alas, it was only a quick 2 seconds code whilst on the phone and after being awake for way too long. As you'll know there are tonnes of mistakes in the whole thing. Anyways, this may be of more help.. you'll still need to connect up to your db etc and everything else you need to do lol. PHP Code: |
| |
| | #8 (permalink) |
| Senior Member Join Date: Mar 2005
Posts: 4,948
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | My contribution ![]() Instead of: PHP Code: PHP Code: |
| |