HELP!!!!! PHP Question here......

777php

Diamond Member
Jul 17, 2001
3,498
0
0
I know that I wouldn't get any responses anywhere else so here goes:


I am developing a web content editing tool via an web interface.

I want users to be able to add edit and delete content on an (inc) include file which basically is the body of the page.

Now when someone wants to add content and then edit right away, everything is fine. For this I am using sessions, so a session starts when they click on add so when they click on edit the session is picked up fron there and all params are passed on.

What happens when someone wants to edit a page out of the blue without first adding contect? There would be no session or it would pick up from the last one containing different information.

This really isn't a tech question as in help me out with code but, I need help figuring out a good method of handling this situation, probably not sessioning. I hope there are some PHP guru's out there to help me. I am stuck. Thanks guys.
 

777php

Diamond Member
Jul 17, 2001
3,498
0
0
Hmmmm...that might work but what if they have multiple windows open , I'd like something to be tied into the .inc file.
 

AdamDuritz99

Diamond Member
Mar 26, 2000
3,233
0
71
hmm, i do alot of php programming, but i have never used sessions. What are the advantages. What can they do? i just let people log in then they will pass varibles back and forth.

peace
sean
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
If I was doing this in perl, I'd have each user get thier own login/password/directory. Which seems like what you're doing.

Here, I'm assuming you're jsut letting users write html and store thier pages on your server. If you're doing something significantly different,
then you'll have to modify this

Then, when they start the script, they'll have the option to open any of the html files they've already created, or, they can create a new one.
whenever they hit "save" (or whatever you use) the script writes the file, with whatever they've edited. also, a "reload file" would be useful, if they're working
in more than one window at a time.
 

777php

Diamond Member
Jul 17, 2001
3,498
0
0
This is a temp solution until I have set up a mysql server so that I can apply user variables to each page but, I need to present this project on Tuesday and need a solution for the time being.

I've set up login/pass sites before but am curious to how others do it, what methodology do you guys follow.
 

notfred

Lifer
Feb 12, 2001
38,241
4
0


<< This is a temp solution until I have set up a mysql server so that I can apply user variables to each page but, I need to present this project on Tuesday and need a solution for the time being.

I've set up login/pass sites before but am curious to how others do it, what methodology do you guys follow.
>>



make a cookie for each username and password. have a database of some sort somewhere on the server (I use flat files) In which you can look up usernames and passwords.

When users log in, the username and password are checked against the database, if they match, the cookies are set, and they then have access to whatever it is that username gives them access to (in my example, a directory). Every time a script is called, it checks the cookies against the username/pass database to make sure the person is still correctly logged in.