Fixing Adding New User to OpenDocMan
For me, OpenDocMan wouldn’t allow me to add new users. It turns out that the SQL query was wrong. Since the first field, id, is set as ‘autoincrement’, it’s handled by the database directly, so there should be no reference to it in the query. It may just be my installation that it doesn’t work on, I don’t know. Anyway, here’s what I did to get it to work. You need to remove a couple of things from one of the pages – commitchange.php
Firstly, change $query = “INSERT INTO user (id, username, password,etc.
to read
$query = “INSERT INTO user (username, password,etc.
Notice that id and the comma are removed.
Secondly, change VALUES(”, ‘”. addslashes($_POST[
to read
VALUES( ‘”. addslashes($_POST[
Notice that the single quotes and comma are removed, just after the parentheses.
0 Comments »
No comments yet.
RSS feed for comments on this post. TrackBack URI