umm.. well no except that path would put you well above the directory that wp-blog-header.php ought to be living in. Maybe you already know that.
Thank you. You are right except that I lied – the file is not directly in the plugins folder, but rather a sub-folder of plugins.
What I am doing is sending html form data using the post method to a ‘update.php’ file in my plugin’s folder. Using the ‘require’ was the only way I could get the ‘update.php’ file to know it was running in wordpress. I need to make sure the user who submitted the form data has authorization to use the database by checking if the user is logged in and has the correct role.
Is there a better way?
To answer my own Q’s, the better way appears to be to use viewer-side AJAX.
http://codex.wordpress.org/AJAX_in_Plugins
Ok, so I read and followed the instructions mentioned in the above link. I think I have everything in the right place, but after I submit the form I get the Please Register screen.
Picky, picky. I had to change this line (the submit for the form):
<input type="submit" value="Update" onClick="ei_update_ex(this.form.name);">
to a type of button:
<input type="button" value="Update" onClick="my_js_func(this.form.name);">
Go me.