FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Why doesn't this work?
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Why doesn't this work? [message #172227] Mon, 07 February 2011 04:40 Go to next message
Xev is currently offline  Xev
Messages: 1
Registered: February 2011
Karma: 0
Junior Member
Why doesn't this work?
<?php
    if ($_POST['textbox1'] != "")
		$_ENV['mytestzeststring'] = $_POST['textbox1'];
	print $_ENV['mytestzeststring'];
?>

<form name="registerform" id="registerform" action="<?php echo
site_url('wp-login.php?action=register', 'login_post') ?>"
method="post">
	  <input type="text" name="testbox1"/>
	  <input type="submit" value="Click me!"/>

</form>

Wouldn't this present on the page before the form declaration whatever
the user types in the test box?
Re: Why doesn't this work? [message #172229 is a reply to message #172227] Mon, 07 February 2011 07:44 Go to previous message
David Quinton is currently offline  David Quinton
Messages: 2
Registered: February 2011
Karma: 0
Junior Member
On Sun, 6 Feb 2011 20:40:36 -0800 (PST), Xev
<xev(dot)angelic(dot)athono(at)gmail(dot)com> wrote:

> Why doesn't this work?
>
[/color]
[color=blue]> <?php[/color]
[color=blue]>     if ($_POST['textbox1'] != "")[/color]
[color=blue]> 		$_ENV['mytestzeststring'] = $_POST['textbox1'];[/color]
[color=blue]> 	print $_ENV['mytestzeststring'];[/color]
[color=blue]> ?>[/color]
[color=blue]> [/color]
[color=blue]> <form name="registerform" id="registerform" action="<?php echo[/color]
[color=blue]> site_url('wp-login.php?action=register', 'login_post') ?>"[/color]
[color=blue]> method="post">[/color]
[color=blue]> 	  <input type="text" name="testbox1"/>[/color]
[color=blue]> 	  <input type="submit" value="Click me!"/>[/color]
[color=blue]> [/color]
[color=blue]> </form>[/color]
[color=blue]> 
[/color]
> Wouldn't this present on the page before the form declaration whatever
> the user types in the test box?

Your form field is called:
testbox1.
Your code is looking for:
texbox1.

(assuming that it is posting to itself)
--
Free personal divertable Phone number: <http://www.bizorg.co.uk/personalnos.htm>
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Looping through Web Service results
Next Topic: Stats comp.lang.php (last 7 days)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 09:46:18 GMT 2024

Total time taken to generate the page: 0.02650 seconds