If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Threaded View

Write permanently to a CSS file from php, no cookies or DB

I have placed a previous post and have been advised to use a DB for this purpose - but I have a niggeling feeling that this can be done without a database. (see previous post (at bottom of this post) and answer to place in contect)

I am looking for a way to save poitions of divs permanently to a css file. To explain:

I have a Javascript that handles drag and drop of divs. Once the divs are dropped I will be using Ajax and Php to write the new positions to the CSS file.
I cant save this information in a cookie and ideally id like not to have to save it in my DB so is there a way I can write this value permanently to a CSS file so when anyone views the page it is in the order/position the artist has designated.

This is for an artist to position elements on there profile, and then for the "public" to view this profile in its new position. The "public" will not be logging, they will just be browsing the site.

Ok I am implementing a drag, drap and save engine from scratch on my new site. Basically users will be able to position elements on there profiles. And then people viewing the site will see these profiles in there different positions.

Site is going to support 300 ish artists and I also have an admin element that will be dragging and positioning elements on other pages.

Just to get my head around the implementation of this I wil be using JS and Php, now rather than saving the position information in cookies or sessions I need a way of saving the positions so that when website viewers (who just broswe and dont login) view the pages the positions that the artist have set are represented.

Now the way I see it I can save these values into the database and everytime a page is viewed then the database is called for position values.

Is there a better way to do this as we are expecting 2000+ traffic values a month and as mentioned there will be 300ish artists. I will be using a cahing system on the php which only changes after users have entered new values, otherwise calls the cached page.

Could I maybe use xml which is saved and refered to instead of weighing down the database.

Can Mysql handle this?

Can I somehow write new css files?

Please help as Im unsure as to how to do this

Thanks

--------------------------------------------------------
REPLY TO POST
--------------------------------------------------------
Quote:
Could I maybe use xml which is saved and refered to instead of weighing down the database.
The amount of traffic you are mentioning will not cause any problems for the DB server unless you write some really bad queries or are indexing your tables poorly. If you only plan to serve the content as HTML then there is no point in using XML as it would add an unnessesary processing overhead.
Quote:
Can Mysql handle this?
Sure no problem.
Quote:
Can I somehow write new css files?
You can use PHP to create files.