The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Try out my first PHP web app! Reply To: Try out my first PHP web app!


Why wasent my header function working?

umm… because, {reasons}?

This is what I was talking about earlier: we can’t troubleshoot or offer advice on code we’ve never seen. I think we’ve reached the point where, if you want more help with this, you’d need to share your code.

Messy HTML … because on each PHP page i am using a require ‘example.php’

Which illustrates that you need to plan out how your includes will be used: for example, if any two files might be used on the same page, they should not have duplicate content. Shared content should probably be separated out into its own file.

The “include, HTML, include” pattern works well on small scales: individual pages with common content. When you’re building a more complex system (e.g., “include, maybe include, HTML, include this-or-that, maybe include”), you need something else. Either very strict separation of content and a well-thought-out control structure, or move to a templates-and-views approach.

I got an idea where we can test out the integrity of my database structure.

Good. Though I’m not sure what I could contribute without any knowledge of the database structure itself.

Lets move this conversation over to a forum post on my website

To be honest, I’m more comfortable keeping the conversation here.