...

View Full Version : Database Entry Field



greens85
09-10-2007, 10:43 AM
Hi All,

First off id just like to say im not sure if im posting in the right area here, so if im not i appologise.

I currently have a website built simply using html/css, however i have div tags which i want to contain content. However the content needs to come from other users... such as the user has a database field to fill in and when they sumbit and FTP it (presumably) the content on the website changes to what they have submitted.

Can anyone point me in the right direction

Thanks in advance

Daemonspyre
09-10-2007, 02:43 PM
Then you are looking more at AJAX than ASP.

If you would be willing to change your .html to .asp, then we could show you how to do this, otherwise you will probably need to change your DIVs to IFRAMEs and use AJAX, or just use a JS Timer to call AJAX to change the innerHTML of those DIVs.

HTH!

greens85
09-10-2007, 03:14 PM
As you may of realised i am new to this, but i read somewhere that it was possible with PHP and MYSQL, is this correct?

nikkiH
09-10-2007, 03:19 PM
You may wish to switch to a content management system instead of trying to "roll your own", so to speak. It's easy to mess up the scripts and leave them open to script attack and whatnot, plus you will likely want a way to control which users can modify which content.
Here's a little comparison of the more popular CMS systems out there.
http://tech.blorge.com/Structure:%20/2007/03/31/cms-web-design-mambo-joomla-or-drupal/

Most open source systems are free, pretty easy to install, and may even come with your hosting package.

Daemonspyre
09-10-2007, 03:21 PM
Nikki is right about using a CMS, but you are also right, greens. This can be done with PHP and MySQL, but it can also be done with ASP/.Net.

Try the CMS system first rather than trying to re-create the wheel. Once you feel more comfortable with that code, then you can try designing your own system.

greens85
09-10-2007, 04:52 PM
Thanks for the link, ive read about CMS, they seem to be the easiest way to manage dynamic content. Although im just wondering how i go about fitting this CMS in with the html/css i have already produced. Do i just download one and then add my html/css to it?

Sorry about the lack of knowledge guys

Daemonspyre
09-10-2007, 05:07 PM
Never apologize for not knowing - as long as you learn, that's all that matters!

You will need to read the docs that come with the one you choose, as they are all different (but have similar methods).

More than likely it will be a "plug-n-play" solution - tell your CMS where you want the data updated in your design and it will take care of the rest, with a little tweaking here and there.

greens85
09-10-2007, 05:37 PM
Will CMS(s) work in conjunction with div tags, or will i have to recode the basis of my site. E.G. I have one div tag that is entitled NewsContent and inside this i want the latest news(as you might expect). So would this be achievable through the use of div tags.

Daemonspyre
09-10-2007, 06:08 PM
Yes, that would be achievable through CMS. It is based on simple JavaScript functions that edit the Document Object Model (or DOM).

For Example: your code probably states:


<div id="NewsContent">News Goes Here</div>

If I wanted to change that after-the-fact, then I would use



<div id="NewsContent">News Goes Here</div>

<script language="javascript" type="text/javascript">
window.onload(document.getElementById('NewsContent').innerHTML = 'This is the NEW News Content');
</script>


That's it... CMS uses the same basic techniques except they make this database-driven instead of hard-coding it.

nikkiH
09-10-2007, 07:28 PM
Will CMS(s) work in conjunction with div tags, or will i have to recode the basis of my site. E.G. I have one div tag that is entitled NewsContent and inside this i want the latest news(as you might expect). So would this be achievable through the use of div tags.

It depends on which one you choose, but the ones I have played with have templates that control the look and feel of the site. You could use your existing content to model the template, plug in your static content, and go from there.
This site lets you look at a ton of them to compare options (not all are free)
http://www.cmsmatrix.org/
It also has links to demos.

greens85
09-11-2007, 01:44 PM
Hey again,

I've found a tutorial on the net which i think is exactly what im looking to do, http://www.sitepoint.com/article/php-mysql-tutorial

However this way the content would be entered by me and not by clients, does anyone if this method can be slightly modified in order to allow the client to enter the information.

Thanks in advance

Daemonspyre
09-11-2007, 02:04 PM
Set up a *basic* CMS by creating a simple form that allows your clients to upload their data, including any images they may want to use.

If you want more information on this, there are plenty of sites out there that give out this type of code.


However, as this is starting to get into PHP, and not ASP, you need to create a new thread there to continue any questions that you may have on this topic.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum