With all things being equal i suspect my problem is caused by htaccess I have a main directory in which there is wordpress installed. Besides wordpress i want to directories that should work untouched by wordpress. I wrote this htaccess to make sure no rewriting is done <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_URI} ^/abb/ [NC,OR] RewriteCond %{REQUEST_URI} ^/shop/ [NC] RewriteRule .* - [L] RewriteCond %{REQUEST_METHOD} !^post$ [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /news/index.php [R=301] </IfModule> Code (markup): abb and shop are the directories that should not be touched. On surface it seems to work but at closer look it does not. The most important thing is that variables being passed by a form are not comming accros to the target place. It seems as if there is still some rewriting being done. not only from forms but also from included files. It looks like all external variables are being disregarded or rewritten to no value. My prime suspect of this behavior is htaccess but Wordpress itself is also something i am thinking of. I only can't understand why as to my idea i have shieled the abb directory and no influance from outside should effect the files within it..... Anyone that can help me solve this puzzle and make my code work inside a folder that lives as a good but distant nextdoor neighbor of wordpress i will pay $25 .. Thanks, Edwin PS i know it's not my code as when i remove wordpress and the htaccess file all is fine
I narrowed the problem down It's the connection to the datbase that causes it. But it stays strange. For the connection i use the data from wp-config.php include ('../wp-config.php'); $connexion = mysql_connect(DB_HOST,DB_USER,DB_PASSWORD); $db_selected = mysql_select_db(DB_NAME, $connexion); Code (markup): if i remove that from the pages my code works again. But obviously i want to input something into the database. I haven't slept much to get my program working so i must be missing something obvious
found the problem and solution...I needed to declare my variables again $content = $_POST['content']; I didn't had to on my demo site but it did needed on the production one.
Well done you saved $25 With register globals on you can access your form variables just with their names and there is no need to use $_POST['some_var'], just $some_var.
such a small thing and you don't know how long it took to find it because only when i was litterly running up the wall i posted it here to see if someone could fix it for me. In my defence I hadn't slept 2 nights this week making sure to have the application ready..so i was a bit doozy and couldn't focus at the end.