Re: newbie help, pressing the submit button returns nothing
| From: | Burhan Khalid | Date: | Fri, 04 Apr 2003 12:52:55 +0000 |
| Subject: | Re: newbie help, pressing the submit button returns nothing | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-142313@lists.php.net to get a copy of this message | ||
Petre Agenbag wrote:
Your problem is not with PHP but with basic HTML. Your <FORM> tag needs an action="www.somepage.com" in order to "do" something. With PHP, you can call the same page back onto itself. On Fri, 2003-04-04 at 14:37, David McGlone wrote:The action attribute is an excellent suggestion ( I do believe that if no action is given, the form defaults to the same file its being submitted from ). Anyhow, My guess is register_globals is off in your PHP setup. Depending on your PHP version, replace your $UserName with : PHP version < 4.1 = $HTTP_POST_VARS['UserName'] PHP version > 4.1 = $_POST['UserName'] -- Burhan Khalid phplist[at]meidomus[dot]comHi all, I have a real quick question. I'm trying to learn PHP and right now im working with variables, anyway, I cannot get the code below to work correctly, could anyone help me out here the problem is, when you submit the name, the name will not appear at all. <code below> <HTML> <FORM METHOD="post"> Name:<br> <INPUT NAME="UserName" TYPE="text"><br> <INPUT TYPE="SUBMIT" VALUE="Enter"> </FORM> <br> Your name is: <?php echo ($UserName); ?>