Re: . becomes _ when submitting page

From: Date: Mon, 09 Sep 2002 14:50:56 +0000
Subject: Re: . becomes _ when submitting page
Groups: php.windows 
Request: Send a blank email to php-windows+get-15724@lists.php.net to get a copy of this message
Actually, this is a PHP feature, not a Javascript bug. The '.' character is very special in PHP, so it cannot be used for variable scoping like in VB or Java. The PHP engine will automaticly translate any '.' into a '_' to make it PHP-safe. The PEAR folks suggest using '::' to scope variables and functions, like in C++. -- Brian 'Bex' Huff bex@stellent.com Phone: 952-903-2023 Fax: 952-829-5424 > Your naming conflicts with javascript. Remember what dots are used for in > js. > > Avoid using other characters than alphanum and underscore. There is no > reason you should need to use any other character. > > I am not quite even sure that it is valid HTML to use dots in attributes > values. > > HTH > > Ignatius > > ____________________________________________ > ----- Original Message ----- > From: "Kjell Hansen" <kjell.hansen@telia.com> > To: <php-windows@lists.php.net> > Sent: Sunday, September 08, 2002 7:12 PM > Subject: [PHP-WIN] . becomes _ when submitting page > > > >> Hi, >> In my HTML page I have a textarea called "filename.ext" when I submit >> the page I get "filename_ext" in my $_POST array. >> >> Anyone know why?!??!? >> >> TIA >> Kjell >> >> >> >> >> -- >> PHP Windows Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > >

« previous php.windows (#15724) next »