Fixing Adding New User to OpenDocMan

Posted on June 12, 2009

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.

Filed Under General | Leave a Comment

Leave a Comment

If you would like to make a comment, please fill out the form below.

You must be logged in to post a comment.

© Copyright Jeff's Blog • Powered by Wordpress • Using Detour theme created by Brian Gardner.