[PHP] shopping cart question

2002-03-01 Thread Jon Feldhammer

The way I see it, there are three options for maintaining state in php.
I've already taken the route of keeping a random session id and putting it
into a database to track a user/cart.  So the only variable i need to track
is the session id.  The three options I know of then are:

1. Putting the session id in the url
2. Putting the session id into a cookie
3. Putting the session id into a hidden input type and have every button be
a form

Option 3 sucks asthetically and coding wise.  Option 1 is somewhat ugly
because now you have a big ole session id in your url (plus I don't think
search engines like these).  Also, with option 1 you need to have a  type line in every href which is a pain in
the ass.  Option 2 is great, if the user uses cookies, if not, you cannot
track the user at all.  Anyone have the perfect solution?

Thanks.

Jon





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




[PHP] Re: shopping cart question

2002-03-02 Thread Jon Feldhammer

Hmm I miss understood in the past how exactly php session handling was done.
Thanks for the answer.

Jon

"Markas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED].;
> Why not use php's sessions, where php uses cookies for getting phpsessid,
> and if no cookies are available, it automatically adds those id's to every
> href (you can manage that in php's conf file)
>
> Jon Feldhammer <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED].;
> > The way I see it, there are three options for maintaining state in php.
> > I've already taken the route of keeping a random session id and putting
it
> > into a database to track a user/cart.  So the only variable i need to
> track
> > is the session id.  The three options I know of then are:
> >
> > 1. Putting the session id in the url
> > 2. Putting the session id into a cookie
> > 3. Putting the session id into a hidden input type and have every button
> be
> > a form
> >
> > Option 3 sucks asthetically and coding wise.  Option 1 is somewhat ugly
> > because now you have a big ole session id in your url (plus I don't
think
> > search engines like these).  Also, with option 1 you need to have a
 > echo "?session_id=$session_id" ?> type line in every href which is a
pain
> in
> > the ass.  Option 2 is great, if the user uses cookies, if not, you
cannot
> > track the user at all.  Anyone have the perfect solution?
> >
> > Thanks.
> >
> > Jon
> >
> >
> >
> >
>
>



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




[PHP] Re: Ok Gurus Shake your nudels !!!

2002-03-03 Thread Jon Feldhammer

Olev Rumm wrote:
> Mime problem.
> I have my web form here www.toolmecindustries.com/submform.php
> 
> Now my email recieves all the contens thruogh [EMAIL PROTECTED] (fields
> what customer filles out)
> but attachment (picture fail) is shown like encrypted
> here:
> 
> rewfg/wr;tlkmbwsl/kw;relktnh;wlkfdvbs.kdfnghb/asdfmgbn/.slfg
> rewfg/wr;tlkmbwsl/kw;relktnh;wlkfdvbs.kdfnghb/asdfmgbn/.slfg
> 
> all like that.
> 
> Now I did an account with hotmail, yahoo and some other mail services
> and sended this stuff through them - it works I recieve everything !!
> 
> Asked my ISP - they told  that it is 100% my script's problem.
> How is it possible?
> Olev
> 
> 
> 

My guess would be that the email header isn't specifying a multi input 
type email (with attachments) properly.  Or that your email client 
doesn't support the image type.  Hotmail and yahoo probably take some 
liberties and try things out to get the email to work properly, where 
"pine" or a basic email client like that won't.

Jon


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




[PHP] header generation problem

2002-03-03 Thread Jon Feldhammer

I'm trying to create a single dynamic header for a wide range of web 
pages which I'll just include as I need it.  There are a few things that 
change per web page in the header, but I've settled all the issues 
except a good way of how to modify a single image that changes based on 
the web page being displayed.

For example:
I'm displaying index.php, which includes 'header.php', the variable 
$wpid indicates that the current web page is index.php.  Now index.php 
needs to display: (changing index_off.gif to index_on.gif)
index_on.gif anotherpage_off.gif yetanotherpage_off.gif

(the tricky part is that each image will change to on depending on what 
page is being displayed)

I really haven't come up with an adequate solution.  Ideas?  Thanks.

Jon


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




Re: [PHP] header generation problem

2002-03-03 Thread Jon Feldhammer

Greg Donald wrote:
> On Sun, 3 Mar 2002, Jon Feldhammer wrote:
> 
> 
>>I'm trying to create a single dynamic header for a wide range of web
>>pages which I'll just include as I need it.  There are a few things that
>>change per web page in the header, but I've settled all the issues
>>except a good way of how to modify a single image that changes based on
>>the web page being displayed.
>>
>>For example:
>>I'm displaying index.php, which includes 'header.php', the variable
>>$wpid indicates that the current web page is index.php.  Now index.php
>>needs to display: (changing index_off.gif to index_on.gif)
>>index_on.gif anotherpage_off.gif yetanotherpage_off.gif
>>
>>(the tricky part is that each image will change to on depending on what
>>page is being displayed)
>>
>>I really haven't come up with an adequate solution.  Ideas?  Thanks.
>>
> 
> I usually program dynamic image names when I encounter this.
> 
>  $image = "banner";
> if(isset($xmas_var)){
>   $image .= "_xmas";
> }
> $image .= ".gif";
> ?>
> 
> 

Well this is a solution I thought of, but then aren't you stuck doing 
this for every image that can change?  (like 20 of them in my case?)  I 
didn't think there was a better way, I was just hoping there was.

Jon


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




[PHP] storing tables into memory (that won't deconstruct after every page)

2002-03-04 Thread Jon Feldhammer

I have a rather large hash table (consisting of about 1000 different 
key/value combinations) that I want to use on every web page.  This 
table will rarely be updated, but I will need to update it time to time. 
  How do I do this *efficient* in php? I assume include "table.php" 
won't stick it (semi)permenantly into memory.

Any help would be great, thanks.

Jon


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