Re: forms problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrew Ballard wrote:
> On Wed, Jun 3, 2009 at 7:13 PM, PJ <af.gourmet@xxxxxxxxxxxx> wrote:
>   
>> Tom Chubb wrote:
>>     
>>> 2009/6/3 PJ <af.gourmet@xxxxxxxxxxxx>:
>>>
>>>       
>>>> The code:
>>>> ...snip
>>>> <div id="loginbox">
>>>> Â  Â  Â  Â <form name="login" method="post" action="<? echo
>>>> $_SERVER['PHP_SELF'] ?>">
>>>> Â  Â  Â  Â  Â  Â <h2>acc&egrave;s client <br /><input type="text"
>>>> name="title" value="<? echo $user; ?>" size="10" /><br />
>>>> Â  Â  Â  Â  Â  Â mot de passe <br /><input type="text" name="title" value="<?
>>>> echo $passwd; ?>" size="10" /><br />
>>>> Â  Â  Â  Â  Â  Â <input class="submit" name="submit" type="submit"
>>>> value="      entrez     " /><br /></h2>
>>>> Â  Â  Â  Â  Â  Â <h2><a href="inscription.php"> Inscription </a></h2>
>>>> Â  Â  Â  Â </form>
>>>> Â  Â </div
>>>> snip...
>>>>
>>>> PROBLEM 1: On Firefox3, the first input (accès client) does not accept
>>>> any input, does not show the cursor; the second input (mot de passe)
>>>> works fine.
>>>>
>>>> PROBLEM 2: The form does not appear on IE 6
>>>>
>>>> Running FreeBSD 7.1, apache22, php 5, using sessions, CSS
>>>>
>>>> Am I doing something wrong?
>>>>
>>>> --
>>>> Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
>>>> -------------------------------------------------------------
>>>> Phil Jourdan --- pj@xxxxxxxxxxxxx
>>>> Â  http://www.ptahhotep.com
>>>> Â  http://www.chiccantine.com/andypantry.php
>>>>
>>>>
>>>> --
>>>> PHP General Mailing List (http://www.php.net/)
>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>
>>>>
>>>>
>>>>         
>>> I think the first problem is because both your inputs are defined as "title".
>>>
>>>       
>> Does that change anything in the functionanlity? If so, how?
>> Bastien says it works in IE8; here it does not in IE6. :-)
>>
>>     
>
> I'm not sure about functionanlity, but it definitely changes the
> functionality. ;-) 
>
> It means that regardless of whether someone is able to enter a value
> in the field you have labeled "accès client", your PHP page will never
> see it because it will look at the value from the field you have
> labeled "mot de passe", even if it is left blank. And that is true
> regardless of which browser they are using. In some scripting platform
> other than PHP, or if you process the raw post data yourself it could
> be different, but in PHP the variable $_POST['title'] will only have
> one value in it, and it will be the last one passed by the form. (In
> this case, "mot de passe".)
>
> Andrew
>   
Thanks Andrew, I hadn't gotten that far and had not thought about
that... it's a wake-up call for me. Glad to learn that. PJ

-- 
Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
-------------------------------------------------------------
Phil Jourdan --- pj@xxxxxxxxxxxxx
   http://www.ptahhotep.com
   http://www.chiccantine.com/andypantry.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux