Sorry - forgot to mention the data I'm collecting will go into a dbase, that's 
why I posted here.

Thanks I'll work with the session angle.  

Please see if this logic is flawed...

The hyperlink to the pdf will spawn a new window with my form to fill out.  
So I think I must start the session in the first page, the one that the pdf is 
on. 
So I assign the variables collected in the 2nd window the session of the first. 
 
Then when the 2nd window is closed store in session and write to dbase ?
Upon closing the 2nd window redirect to the pdf.
If user wants another file, spawn a third window with form but fill in most of 
what he entered (ie name,address,etc). I get this from the current session 
right?

Ultimately the data in the dbase is the goal and I just dont want the user to 
have to re-enter

Thanks
Mignon



>>> Jochem Maas <[EMAIL PROTECTED]> 03/03/05 11:32AM >>>
Mignon Hunter wrote:
> Hello 
> 

Mignon,

this is really a php-generals question me thinks (you don't even mention a DB 
;-),
regardless....

> I need to dev a small app and I can think of a couple different ways to 
> handle it but not sure the best way.  I need to register those who come to 
> our site that want to download .pdf's. They will fill out some information 
> before I redirect to the pdf.
> 
> I'm thinking the best way to handle this is sessions, but is it appropriate 
> to store all of the users info - so that if he downloads 2 items - I can 
> re-populate the fields so he doesnt have to? So if they click on an 
> additional pdf I'll need to somehow check for the session and re-populate 11 
> fields, and they will only have to fill in one field at that time.
> 
> Or would cookies be better ?  I need to store probably 11 different form 
> variables. Also - would you store the variables in an array in the session? 
> This seems neat and tidy...

lets see:
if you put the data in a cookie then you are allowing malicious users to change 
that data
after you have stored it (so you will have to check it _everytime_ you want to 
use it)...

best to stick an array in the $_SESSION array.. that way you oly need you 
sanitize the
data when you add/change it - there is no problem with storing an array with 11 
items it in in the
session, and using an array rather than 'loose' variables would definitely be 
neater -
you have all the user/pdf data in on place and its easy to extend that ammount 
of
info you store (i.e. if your client decides users must fill out more 
information to download a pdf)

> 
> Hope this is clear.
> 
> Any advice/guidance/sample scripts would be appreciated.
> 
> Thanks
> 

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

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

Reply via email to