Re: [PHP] passing a variable with php_self
oops, that should be htmlentities, not htmlspecialchars. - Jeff On 3-Oct-05, at 11:51 AM, Jeffrey Sambells wrote: $PHP_SELF should not be used because it will not work without register_globals being enabled. Rather, you should use $_SERVER ['PHP_SELF'] for it as above however... Don't forget to check for XSS! Using PHP_SELF you could simply change the URL in the browser to: /path/to/script.php">alert('hello'); ~~ Jeffrey Sambells Director of Research and Development Zend Certified Engineer (ZCE) We-Create Inc. ~ Internet Solutions http://wecreate.com [EMAIL PROTECTED] office: 519.745.7374 cell: 519.897.2552 ~~ Get Mozilla Firefox at http://spreadfirefox.com/community/? q=affiliates&id=466&t=50
Re: [PHP] passing a variable with php_self
can someone show me the right way to do the following... I want to pass a variable to a self submitting link. Thanks, $PHP_SELF should not be used because it will not work without register_globals being enabled. Rather, you should use $_SERVER ['PHP_SELF'] for it as above however... Don't forget to check for XSS! Using PHP_SELF you could simply change the URL in the browser to: /path/to/script.php">alert('hello'); -Jeff ~~ Jeffrey Sambells Director of Research and Development Zend Certified Engineer (ZCE) We-Create Inc. [EMAIL PROTECTED] email 519.745.7374 office 519.897.2552 mobile ~~ Get Mozilla Firefox at http://spreadfirefox.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] passing a variable with php_self
- Original Message - From: "A.J. Brown" <[EMAIL PROTECTED]> To: Sent: Tuesday, September 27, 2005 3:26 PM Subject: Re: [PHP] passing a variable with php_self "> works well too -- Sincerely, A.J. Brown "Jim Moseby" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] -Original Message- From: Ross [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 27, 2005 8:58 AM To: php-general@lists.php.net Subject: [PHP] passing a variable with php_self can someone show me the right way to do the following... I want to pass a variable to a self submitting link. Thanks, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.11.7/112 - Release Date: 2005-09-26 Try to avoid the typing as: Use instead for compability reasons... /G http://www.varupiraten.se/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] passing a variable with php_self
A.J. Brown wrote: "> works well too works only if register_globals is on, doesn't it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] passing a variable with php_self
"> works well too -- Sincerely, A.J. Brown "Jim Moseby" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> -Original Message- >> From: Ross [mailto:[EMAIL PROTECTED] >> Sent: Tuesday, September 27, 2005 8:58 AM >> To: php-general@lists.php.net >> Subject: [PHP] passing a variable with php_self >> >> >> >> can someone show me the right way to do the following... >> >> >> >> >> I want to pass a variable to a self submitting link. >> >> Thanks, >> > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] passing a variable with php_self
Ross wrote: > can someone show me the right way to do the following... > > > > I want to pass a variable to a self submitting link. Easiest way to do that is to use sprintf() or printf(): %s', $_SERVER['PHP_SELF'], $link_title); ?> Or, like you did with inline code in the HTML: click my self-referring link Warm Regards, Torgny -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] passing a variable with php_self
> -Original Message- > From: Ross [mailto:[EMAIL PROTECTED] > Sent: Tuesday, September 27, 2005 8:58 AM > To: php-general@lists.php.net > Subject: [PHP] passing a variable with php_self > > > > can someone show me the right way to do the following... > > > > > I want to pass a variable to a self submitting link. > > Thanks, > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] passing a variable with php_self
[snip] can someone show me the right way to do the following... I want to pass a variable to a self submitting link. [/snip] echo $_GET['action'] . "\n"; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] passing a variable with php_self
can someone show me the right way to do the following... I want to pass a variable to a self submitting link. Thanks, R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php