I am running this site which I've gotten allot of responses about and its been a hassle to edit the html constantly to add more content. Is there a way I can make a extreamly easy CMS to add information?

Here is the site thats going on:
http://competitive.rebornservers.com/

What I really want to happen is s form type thing (like at the bottom) that i have to enter myself (not through the form at the bottom, that is just to submit information to me) which will add another line to the tables that are already there.

I haven't looked at PHP too much or know what I would need to do but I'm a fast learner. I'm not asking to do it for me but rather what I need to do this and how.

Recommended Answers

All 3 Replies

You would need only one separate html form with the fields you'd like to enter into your db. Post that to a php script which does the insert. That should be it.

The tables then need to be dynamically created from the db. That's not hard either.

It's even possible to write directly to the html file, should you want that. Then you wouldn't need a DB, but write access to your HTML file.

can you explain more on how to write directly to a html file?

Suppose you have write access to your html file.
1. Include a tag so you can determine where to insert a new <tr> Let's say <!-- ROW -->
2. in php do

$html = file_get_contents("yourfilehere");
$row = "<tr>...</tr>"; // containing your new data
$row .= "<!-- ROW -->";
$html = str_replace("<!-- ROW -->", $row, $html);
file_put_contents("yourfilehere", $html);

Note that editing a line is not possible in this case.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.