dynamically creating web pages

Miscellaneous Forums/General Discussion/dynamically creating web pages

Hiya, what is the best way to dynamically create (and save on the server) a web page based on a form that a user has filled out. For example the user fills out name, some details (bits of text to go on the page), picks some colours with droplists then the code actually creates an HTML page for them based on their preferences, but also with our own links and text on it. Should I look for perl, CGI or PHP code?

Also is it possible to edit an html page later and change the contents or would it be best to store the current page's info in a database and then if the user make's an edit, update the database then recreate the whole page? I'm aware that the pages could be totally dynamic i.e. not stored on the server at all, just served up on demand but then google won't find them...

Thanks very much for any advice.

ASP.NET

lol, OK same as for the password system.

PHP can do this...no problem too. Just write the page to a file and load it, no big deal. Check out http://www.cmsimple.dk/ it's a very simple CMS that lets you edit pages. Everything is just stored in HTML files, no database requiered.

Ragnar

since html is plain text, PHP can edit it no problem. split the page by tags and then create a system that interprets the tags and give the user whatever you want them to be able to edit/create

you can also create your own tags...

http://www.customcleaningcompany.com/services.htm

this services page uses a system I coded called wizedit, view source on it and you will see some strange comment tags

<!-- -- template --e:/www/customcleaning/-- template -- -->
<!-- -- base_URL --http://www.customcleaningcompany.com/-- base_URL -- -->

These are used by the wizedit PHP code to split the page. Then, the person who owns that site can add to the list, and it auto creates the pages for each link. And lets him edit them.

It is simple stuff for him to add a new service with description.

I assume that is basicly what you want.


The thing is, it ain't exactly easy to do, and takes some planning. But I'm basicly a power-novice with PHP and I managed to get it to work.


There is also a gallery system (which uses sql) and text changer things... view source all over that site and find all the custom tags that control the wizedit system... its like a scavenger hunt.

PHP / MySQL

I'd go for PHP too if it's just something simple. You can whip up functional stuff quite quickly.

PHP is the way to go, more portable. Using simple templates and MySQL for the actual data.

I'd agree, PHP all the way.

PHP!

PHP.
It's much easier to deal with, in my opinion, than that nutty ASP stuff. It isn't closed down to a single kind of server (A Windows server! That thing hardly does file permissions; I wouldn't risk running a server on it...), and it is most widely used. (Just look at how many web sites have pages with a .php extension).

I'll admit that the language is a bit big and full of built-in functions and has a weird syntax stuff (eg: Variable Variables). At the same time, though, its incredible number of functions (every simple task you could possibly want is taken care of already!) and funky/flexible syntax make it a very easy to use language.
Two good starting places are the very basic but handy starting tutorial at W3Schools, and PHP.net.

Don't worry; Unlike some other very big collections of functions which will go unnamed, PHP is actually well documented. (If you search for something on php.net, it comes up; no rambling articles on something completely different, and they aren't mingled with completely unrelated articles for the end user).

I remember coming across a very big and convenient free eBook as well, and it is really the place where I learned PHP. (I honestly read that book one night, forgot about it, then 6 months later realized, "Hey, I know PHP!").
I'll try to find its title for you...

Also, if you want an HTML editor, I hugely recommend Xinha:
http://xinha.python-hosting.com/
...and if you want file upload capabilities, you can just throw in the Extended File Manager extension. (I have a thread in their forums right now regarding a standalone EFM, which makes that even nicer).

very interesting all, many thanks. So PHP and MySQL could be the way to go. Well I'm very experiences with SQL (10 years) so that bit's OK. I've used W3Schools to learn Javascript and got 100% in the easy test so I trust them to teach me PHP, good idea. I used to use NotePad for my HTML haha but now I used FrontPage for the visual layout stuff then just click the HTML tab when I need to edit the code. What advantages do other HTML editors have then?

I use notepad for all my web-code... I do layouts in photoshop, cut them up, and now I use DIV to lay it out... so it isn't a thoughtprocess problem for me... its just "go into photoshop and see how many pixels from what corner and then stick in that number."

Getting a CMS System? The best i've used so far for work was Obtree but meanwhile there are also some interesting free ones around. Google for them!

Hello.

I prefer ASP and MS-SQL than php and MySQL, but that's probably because of the nonsense I've had both with my hosting company and their set up of php/mysql, and with trying to get the two communicating (via apache) on my home PC. IIS, notepad and MS-SQL are all happy and jolly together.

And, if you've got any vb/vba/vbscript experience you'll fall straight into ASP.

And, I'd trust MS-SQL alot more than MySql on the basis of what I've read about the stability of using Transactions/Constraints (through InnoDB). Though I'd ignore Access as the performance is not much cop.

Goodbye.

The database won't be put under major strain and it's for us not a mega corp so MySQL may suffice. I hear you on the MS route as I've had hassle with Apache and Perl versions etc before...

A business partner is looking into Joomla now after it was recommended and is free.