Re: form problem
| From: | John Nichel | Date: | Thu, 24 Oct 2002 20:06:59 +0000 |
| Subject: | Re: form problem | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-121346@lists.php.net to get a copy of this message | ||
Yep, that would be best (or use $_GET if thats the method of the form, or if it's a query sent in the URL).
GC wrote:
So the best way to do this is to keep it disabled and just use $_POST in front every time? Thanks -GC "John Nichel" <jnichel@by-tor.com> wrote in message news:3DB82DC0.9020308@by-tor.com...Yes, turning register_globals will allow you to reference the variable without having to use the $_POST ( or $_GET ) array. However, you'll open your site up to possible security risks. If you want to turn it off, you can do so in the php.ini file ( register_globals = on ), then you must restart your webserver. GC wrote:thatThanks guys, that fixed the problem...is there anyway I can make it soonI don't have to use $_POST in front of it? Does turing register_globalsafix this? If so, how do I do that? Thanks again. //GC "John Nichel" <jnichel@by-tor.com> wrote in message news:3DB82AF5.9010202@by-tor.com...Try this.... echo ( $_POST['firstname'] ); GC wrote:Hi: I'm having a really stupid problem...I'm trying to get the values fromcharset=iso-8859-1">getform object just to display on a php page. When I click submit, I onlya blank screen. Am I missing something really stupid here? Here is my code: ::html file:: <html> <head> <title>Test</title> <meta http-equiv="Content-Type" content="text/html;action="adduser_p.php"></head> <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0"><form name="form1" method="post"value="Submit"><input type="text" name="firstname"> <input type="submit" name="Submit"</form></body> </html> ::php file:: <?php print $firstname; ?> Thanks!!