You are here: Re: Problems using <FORM> tag... « PHP Language « IT news, forums, messages
Re: Problems using <FORM> tag...

Posted by Kimmo Laine on 06/15/05 06:53

"Domestos" <never.you@mind.net> kirjoitti
viestissδ:voHre.23276$cN2.1435@newsfe4-gui.ntli.net...
> heres the html code...
>
> <?php
> $user_name=' ';
> require_once('includes.php');
> do_html_header('register');
> ?>
> <form action="register_new.php" method="post" enctype="text/plain"
> name="register">
> <fieldset><legend>Personal Details</legend>
> <p>
> <label for="user_name" class="label_left"> Login Username :</label>
> <input type="text" name="user_name" size="18" maxlength="16"
> class="input_left" tabindex="11" />

Dude! Where's My Submit button??

> </form>
> <?php
> ?>
>
>
> and here is the file register_new.php
>
>
> <?php
> require_once('includes.php');
> //create short variable names
> $user_name=$_POST['user_name'];
>
> echo $user_name;
>
> ?>

Try debugging by making sure you get variables outside php in _some_ cases.
Easy code in other words.
Make page.php that you call with page.php?foo=bar
contets of said page:
<?php
var_dump($_GET);
var_dump($_POST);
var_dump($HTTP_GET_VARS);
var_dump($HTTP_POST_VARS);
var_dump($_REQUEST);
?>

['foo']=bar should appear at least in three arrays: request, get and
http_get_vars. If it doesn't, contact administrator.

Next add to said page.php the following code
<form method="POST">
<input type="submit" name="foo" value="bar">
</form>

Click the button bar. Again ['foo']=bar should appear at least in three
arrays: request, post and http_post_vars. If it doesn't, contact
administrator.

--
"I am pro death penalty. That way people learn
their lesson for the next time." -- Britney Spears

eternal.erectionN0@5P4Mgmail.com

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация