[ic] form data to MySQL Table, permissions, [table-editor], & tutorial
Geoff Sternecker
interchange-users@icdevgroup.org
Tue Mar 4 11:33:00 2003
I've had a perl cgi script running to insert, delete, update info in a mysql
table of client addresses and want to combine it into the Interchange 4.9.5
site I am running on an intranet. The current users are in the userdb and our
client list will be in a table named clientdb. The clientdb entries are not
keyed to the userdb in any way.
The users are not given access to the admin UI.
I've been going through the faq and rtfm as well as the mail archives..
A few questions,
Do I, run the script pretty much as is inside a page with [perl] or [calc]
tags, so that I can permit all users to write/edit the database via setting
$DBI?
Or should I use the [table-editor] tags to do this?
I've attempted to use the [table-editor] tags and keep getting:
"..Attempted database update without permission, table=clientdb key=c00042."
since none of the users are authenticated in the admin UI. What do I need to
change/add/remove from the script below?
<!-- begin page -->
[set mv_data_enable]1[/set]
[tag flag write]clientdb[/tag]
[table-editor
hidden.mv_action=back
ui_hide_key=1
table=clientdb
auto_secure=1
reload=1
all_errors=1
key="[item-code]"
cgi=1
mv_nextpage=client]
<!-- end page -->
or, do I need to rewrite the whole thing, using a standard form declaring
everything by "mv_data" such as:
<INPUT TYPE=HIDDEN NAME="mv_data_function" VALUE="insert">
etc.
What are the advantages to using [table-editor] ?
ps, IMHO I think what I'm pondering through (however basic) might be a nice
next step to the tutorial. Build pages to Add, edit, delete Items. It might
be a nice segway into the admin UI pages.
Thanks in advance,
Geoffs
--
Geoff Sternecker