[PHP] Session Id in forms

2003-09-10 Thread Gustavo Del Castillo Meza
Hi, been having some problems with sessions. When i use a session and a form
on the same page. Sometimes php will create a form object called
PHP_SESSIONID.
Since this is inserted as the first object of the form, this will screw up
my javascript validation, wich uses the form element index, i dont want to
change this because is generated by OOH forms .
Is the a way to make this object appear at the end of the form?

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



Re: [PHP] Session Id in forms

2003-09-10 Thread Justin French
This is done by PHP's enable-trans-sid directive.  The simple solution 
would be to disable trand-sid in the php.ini file, but you may rely on 
it to maintain sessions on non-cookie users.

So, then there is this directive in php.ini:

; The URL rewriter will look for URLs in a defined set of HTML tags.
; form/fieldset are special; if you include them here, the rewriter will
; add a hidden input field with the info which is otherwise appended
; to URLs.  If you want XHTML conformity, remove the form entry.
; Note that all valid entries require a =, even if no value follows.
url_rewriter.tags = 
a=href,area=href,frame=src,input=src,form=,fieldset=

1. you may be able to experiment with this setting to change how it 
does things.  For example removing form= will solve your problem, but 
you may lose sessions, so you may have to MANUALLY insert the session 
id into the form as the last form element yourself, or put it in the 
URL YOURSELF.

2. changing form= to form=target may force the session stuff into the 
URL, rather than as a form element

You'll have to experiment a bit, and if you're on a shared server, 
you'll have to see if this directive can be changed in a .htaccess 
file, etc etc.

Justin French

On Thursday, September 11, 2003, at 02:31  AM, Gustavo Del Castillo 
Meza wrote:

Hi, been having some problems with sessions. When i use a session and 
a form
on the same page. Sometimes php will create a form object called
PHP_SESSIONID.
Since this is inserted as the first object of the form, this will 
screw up
my javascript validation, wich uses the form element index, i dont 
want to
change this because is generated by OOH forms .
Is the a way to make this object appear at the end of the form?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---
[This E-mail scanned for viruses]

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