Sl4ckB0t Posted April 2, 2003 Share Posted April 2, 2003 I\'m Not a Newbie but new to SUSE. I set up Suse 8.1 pro on a new server. I\'m having the most aggravating computer problem ever, here goes: installed apache: works (serves pages) installed php: works ( php code is executed properly at shell ) installed phpmod: works ( php/html code is executed properly and served by apache) installed phpMyAdmin: works (can login, create and change databases) So what\'s the problem you ask ???? Even though phpMyAdmin and also Mpanel work flawlessly I can not post or get a simple test form. The form works fine on other servers. ----- test.php ------ <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"> <html> <head> <meta http-equiv=\"content-type\" content=\"text/html; charset=ISO-8859-1\"> <title><? echo \"Freakin Test\"; ?></title> </head> <body> Test Form<br> <form method=\"post\" action=\"post.php\"> <input type=\"text\" name=\"textbox\" maxlength=\"12\" /> <input type=\"submit\" value=\"Submit\" /> </form> </body> </html> -------- ------ post.php ------ <html> <? echo \"Test:\" ?><br> <? echo \"<br>$textbox<br>\" ?> <a href=\"./test.php\">back</a> </html> -------- I\'m on my third day and still stuck, Please Help!! Quote Link to comment Share on other sites More sharing options...
hexzero Posted April 2, 2003 Share Posted April 2, 2003 This may be a shot in the dark, but I had to make sure the following was set in the php.ini-dist register_globals = on It should be on or around line 355 I found this fix somewhere in this forum earlier when I had the same type of problem when trying to get a form to work. Hope that works for you... Hexzero Quote Link to comment Share on other sites More sharing options...
DocSeuss Posted April 2, 2003 Share Posted April 2, 2003 that will prolly get your variable to work but that isn\'t the best solution as of version 4.2.0 register globals were set to be off by default for security reasons. If you intend to write alot of php code, download others php code, or share the code that you write in php I would suggest going with the new standard. leave register_globals off when you want to use the variable from your form in post.php access it like this $_POST[\'textbox\']; if your form method was GET you would use $_GET[\'textbox\'] good luck. Quote Link to comment Share on other sites More sharing options...
hexzero Posted April 3, 2003 Share Posted April 3, 2003 Thanks, I appreciate the tip.... Quote Link to comment Share on other sites More sharing options...
Sl4ckB0t Posted April 3, 2003 Author Share Posted April 3, 2003 Worked Great Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.