edit, clear and save User-Adds in an html-Table to MySQL

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
phpRoundX
Forum Newbie
Posts: 7
Joined: Mon Dec 30, 2002 6:43 am

edit, clear and save User-Adds in an html-Table to MySQL

Post by phpRoundX »

I've tried to make a script, witch has the functionality, to let User edit, clear, save and so..... their Adds in a kinda table in a html-page. Think thats not so hard to do, but I want to have it that easy for the User, that he only have a Page, with an empty- tablelike view, with only 3 Buttons:
Get (..the Content) | Clear (wrong Adds..) | Save (to DB).
thats all.
Some Genies arround here?
Thx for help.
lostboy
Forum Contributor
Posts: 329
Joined: Mon Dec 30, 2002 8:12 pm
Location: toronto,canada

not too clear here with what you need/want

Post by lostboy »

are you lloking to save/edit the html code or just the contents?

contents are easy

<form name=myform action='$_PHPSELF' method='post'>
<input type='hidden' name='savedb4' value='1' for yes 0 or blank for new entry>
<input type='hidden' name='userid' value="$userid'>
<textarea name='myfield' value='$myfield' cols='20' rows='10'>
<input type='submit' value='Save' id='submit1' name='submit1'>
<input type='reset' value='clear' name='reset'>
</form>

then the db needs a table which has all the relevant fields. then it is just a matter of checking on the $savedb4 value to see if the statement should
be an INSERT for a new entry or an UPDATE for the $userid for someone who is updating their post

hth
phpRoundX
Forum Newbie
Posts: 7
Joined: Mon Dec 30, 2002 6:43 am

cool :)

Post by phpRoundX »

thx, some like that is exactly what I'm looking for...
The need is, to get the functionality for the contents of that html-table.
See what I mean:
Image
There are 3 Buttons: New | Open | Save
There are Options to open a new blank sheet- edit write or/and save Adds.


I've also tried to write a class, to realize that in an generated *xls-Format,
but I am not happy about that.....

What's your idea about that?

thx
lostboy
Forum Contributor
Posts: 329
Joined: Mon Dec 30, 2002 8:12 pm
Location: toronto,canada

is that table editable?

Post by lostboy »

are the cell editable or does it bring up another form to make changes to a specific entry?

from the look of the sight, it might be a java application that provides this which would be hard to do in straight php....
phpRoundX
Forum Newbie
Posts: 7
Joined: Mon Dec 30, 2002 6:43 am

tablecells should be editable, yes....

Post by phpRoundX »

tablecells should be editable, yes....

I had that idea, to make the tablecells, a form-textfield or textarea for itself, to look like ordinary html-table for the user, but i duno if thats the best way and how to gonna make it.

your're a legend, if you have somthing about that.

thx
Jan
lostboy
Forum Contributor
Posts: 329
Joined: Mon Dec 30, 2002 8:12 pm
Location: toronto,canada

i know that it is possible to

Post by lostboy »

make the borders on cells disappear using CSS...those boxes were read-only...dunno about editable boxes though, have to test that...

since i got laid off, no access to that code, sorry...check some other sites or here in the css portion....

hth
phpRoundX
Forum Newbie
Posts: 7
Joined: Mon Dec 30, 2002 6:43 am

Hi, I've done it...

Post by phpRoundX »

The site ist ready.
The code is pure PHP. It comes with Interfaces for Users and Admins. The Adminsection has different Userlevel. User can lock in with autoredirect and it's on the Admins, to accept that User to be a Member. The functionality with that writeable tablething is working very fine. I've done that with Objects and Classes. Every cell is an specific object. In different parent/child - Relations, the Object can be used by other functions.
...
On that, every cell is writeable for itself alone- that means, that no other cell is touched, when somebody write or edit or delete somthing....
It comes like an WindowApp and its behavior is that kinda too :)

Image
Long ago since i came here for help.
thanks you legends :)

bye

Jan
Post Reply