Re: Problem with input name, how can i use . (dot) in a name of a input type text?

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

 



Jônata Tyska Carvalho wrote:
> Well if i cant, i cant! But dont say i dont need!!!!

why not?

>  Im working with a
> framework that works in that way. Need to put the name of the column of

please name the framework - I like to know what to avoid :-)

> my database like the name of the input. And i CANNOT alter the source
> code of framework.

why not?

 Thanks for your time anyway.

you could use the auto_prepend_file to unbork the $_POST array prior to
this application running - you can set the auto_prepend_file directive in
the relevant webserver config.

with regard to things not to do, don't f'ing reply off-list (unless asked),
etiquette asks that you keep the conversation on the mailing list. if you
wAnt to call me an ass because you don't like the way I tried to help that's fine
but please do it in public :-)

> 
> On Nov 5, 2007 1:44 PM, Jochem Maas <jochem@xxxxxxxxxxxxx
> <mailto:jochem@xxxxxxxxxxxxx>> wrote:
> 
>     Jônata Tyska Carvalho wrote:
>     > then, there is no way to do it works??? i just wanna use a name of
>     input
>     > like table.name <http://table.name> < http://table.name>, if i to
>     need to write another
>     > solution i know how to do it, but right now i need to use the name in
>     > that way. =/
> 
>     NO YOU DON'T - you need to work around the problem and make your
>     code work.
>     you may want 'table.name <http://table.name>' but alas you can't
>     have it. so use some super simple
>     character substitution in order to work around. easy enough if
>     rather annoying.
> 
>     then again unless your developing something likwe phpmyadmin or a
>     custom report generation tool, then you probably shouldn't be
>     [needing to]
>     placing table names anywhere in output that goes to the browser ..
>     it just doesn't
>     seem right or necessary ... that said you may have a perfectly sound
>     reason :-)
> 
>     >
>     > On Nov 5, 2007 11:22 AM, Jochem Maas <jochem@xxxxxxxxxxxxx
>     <mailto:jochem@xxxxxxxxxxxxx>
>     > <mailto:jochem@xxxxxxxxxxxxx <mailto:jochem@xxxxxxxxxxxxx>>> wrote:
>     >
>     >     Stut wrote:
>     >     > Jônata Tyska Carvalho wrote:
>     >     >> Im having a big problem because the name of one input type
>     text
>     >     that is '
>     >     >> table.name <http://table.name> <http://table.name>' in my
>     html, becomes 'table_name'
>     >     in php, it is a kind of
>     >     >> bug??
>     >     >> =S
>     >     >>
>     >     >> <form method="post">
>     >     >> <input type="text" name" table.name <http://table.name>
>     <http://table.name>">
>     >     >> </form>
>     >     >>
>     >     >> in PHP we have:
>     >     >>
>     >     >> $_POST["table_name"] instead of $_POST[" table.name
>     <http://table.name>
>     >     < http://table.name>"]
>     >     >>
>     >     >> someone knows some way to put this to work?? i wanna send
>     >     'table.name <http://table.name> <http://table.name>'
>     >     >> and
>     >     >> receive in php ' table.name <http://table.name> <
>     http://table.name>'!
>     >     >
>     >     > I don't know for certain but that's likely happening because a
>     >     period is
>     >     > not valid in a PHP variable name. One alternative would be
>     to use
>     >     > table[name] instead. This will lead to $_POST['table']['name'].
>     >
>     >     I think Stut is correct - the period is a concatenation operator.
>     >     also there are plenty of alertnatives to the Stuts suggested
>     >     'table[name]' naming approach.
>     >
>     >     that said given the following code:
>     >
>     >            $f = "my.bad";
>     >            $$f = "MY BAD";
>     >            echo $f, "\n", $$f, "\n";
>     >
>     >     ... I personally feel that the $_POST should just contain
>     >     'table.name <http://table.name> <http://table.name
>     <http://table.name>>' - which is not an illegal array key
>     >     - most likely the reason it is (the var name)
>     >     transformed is due to BC, namely with register_globals set to
>     ON php
>     >     is required to automatically
>     >     create a variable $table.name (which is not legal).
>     >
>     >     >
>     >     > -Stut
>     >     >
>     >
>     >
>     >
>     >
>     > --
>     > Jônata Tyska Carvalho
>     > -----------------------------------------------------------------
>     > -- Técnico em Informática pelo Colégio Técnico Industrial (CTI)
>     > -- Graduando em Engenharia de Computação
>     > Fundação Universidade Federal de Rio Grande (FURG)
> 
> 
> 
> 
> -- 
> Jônata Tyska Carvalho
> -----------------------------------------------------------------
> -- Técnico em Informática pelo Colégio Técnico Industrial (CTI)
> -- Graduando em Engenharia de Computação
> Fundação Universidade Federal de Rio Grande (FURG)

-- 
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