php-general Digest 15 May 2004 10:34:44 -0000 Issue 2764
Topics (messages 186263 through 186287):
Looking For Easy To Use Shopping Cart
186263 by: Ryan Schefke
186266 by: Justin Patrin
186268 by: Dan McCullough
186270 by: Ryan Schefke
186271 by: Justin Patrin
186273 by: Dan McCullough
186274 by: Dan McCullough
Missing data types?
186264 by: René Fournier
Re: tracking ip and its location
186265 by: adwinwijaya
Re: GD createpng and getting different png formats
186267 by: Galen
186269 by: Sam Joseph
186275 by: Galen
186278 by: Sam Joseph
How to duplicate this functionality?
186272 by: Ryan A
186276 by: Robert Cummings
186277 by: Ryan A
186279 by: Will Collins
186280 by: Curt Zirzow
186282 by: Will Collins
Re: php-general Digest 14 May 2004 22:05:59 -0000 Issue 2763
186281 by: Graeme Foster
Re: [PHP-DB] php-mysql problem
186283 by: Burhan Khalid
Re: Template Engine
186284 by: Tom Rogers
186285 by: electroteque
Carrying Variables
186286 by: Ronald \"The Newbie\" Allen
186287 by: Torsten Roehr
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Can anyone recommend a good open source shopping cart solution? I built an
application for custom websites, now, I just need to interface to a shopping
cart. I'm using mysql. Any suggestions?
...looking for something easy.
Thanks,
Ryan
--- End Message ---
--- Begin Message ---
Ryan Schefke wrote:
Can anyone recommend a good open source shopping cart solution? I built an
application for custom websites, now, I just need to interface to a shopping
cart. I'm using mysql. Any suggestions?
...looking for something easy.
Thanks,
Ryan
Well...
Do you mean that you've created a storefront already and need a cart, or
do you need the whole thing? There really isn't any only cart software,
they all include a storefront.
From what I've seen, Zen Cart is pretty well featured and is open
source and free.
--
paperCrane <Justin Patrin>
--- End Message ---
--- Begin Message ---
There are several tutorials that are just the cart, probably some minimal
code typing and fixing for your needs.
MyMarket found on SourceForge is one. There was one on Monkey Junkies.
FreeTrade is good.
dan mccullough
sr. engineer
url: heathermccullough.com
tf: 866.298.3991
w: 603.444.9808
________________________________
There is no such thing as a problem, unless the servers are on fire.
Sometimes great opportunity comes brilliantly disguised as bad news.
-----Original Message-----
From: Justin Patrin [mailto:[EMAIL PROTECTED]
Sent: Friday, May 14, 2004 6:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Looking For Easy To Use Shopping Cart
Ryan Schefke wrote:
> Can anyone recommend a good open source shopping cart solution? I built an
> application for custom websites, now, I just need to interface to a
shopping
> cart. I'm using mysql. Any suggestions?
>
> ...looking for something easy.
>
> Thanks,
> Ryan
>
Well...
Do you mean that you've created a storefront already and need a cart, or
do you need the whole thing? There really isn't any only cart software,
they all include a storefront.
From what I've seen, Zen Cart is pretty well featured and is open
source and free.
--
paperCrane <Justin Patrin>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I want my customer to be able to select a few options via radio buttons (12
months or 24 months - how many photos in their photo album, etc) that impact
the price. Then, I want the customer to click a "checkout" link that takes
them directly to a form to input billing address and credit card
information.
Any recommendations/guidance?
I'm calling around and speaking to payment gateways and merchant account
providers but wanted to tap into the open source community to see what's out
there that can fit my needs.
I really don't think this is that complex of a task, or maybe it is?
Thanks,
Ryan
-----Original Message-----
From: Justin Patrin [mailto:[EMAIL PROTECTED]
Sent: Friday, May 14, 2004 6:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Looking For Easy To Use Shopping Cart
Ryan Schefke wrote:
> Can anyone recommend a good open source shopping cart solution? I built an
> application for custom websites, now, I just need to interface to a
shopping
> cart. I'm using mysql. Any suggestions?
>
> ...looking for something easy.
>
> Thanks,
> Ryan
>
Well...
Do you mean that you've created a storefront already and need a cart, or
do you need the whole thing? There really isn't any only cart software,
they all include a storefront.
From what I've seen, Zen Cart is pretty well featured and is open
source and free.
--
paperCrane <Justin Patrin>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Ryan Schefke wrote:
I want my customer to be able to select a few options via radio buttons (12
months or 24 months - how many photos in their photo album, etc) that impact
the price. Then, I want the customer to click a "checkout" link that takes
them directly to a form to input billing address and credit card
information.
Any recommendations/guidance?
I'm calling around and speaking to payment gateways and merchant account
providers but wanted to tap into the open source community to see what's out
there that can fit my needs.
I really don't think this is that complex of a task, or maybe it is?
Thanks,
Ryan
-----Original Message-----
From: Justin Patrin [mailto:[EMAIL PROTECTED]
Sent: Friday, May 14, 2004 6:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Looking For Easy To Use Shopping Cart
Ryan Schefke wrote:
Can anyone recommend a good open source shopping cart solution? I built an
application for custom websites, now, I just need to interface to a
shopping
cart. I'm using mysql. Any suggestions?
...looking for something easy.
Thanks,
Ryan
Well...
Do you mean that you've created a storefront already and need a cart, or
do you need the whole thing? There really isn't any only cart software,
they all include a storefront.
From what I've seen, Zen Cart is pretty well featured and is open
source and free.
No, it's not that complex. And if you want something simple, you may
want to make your own cart and use something like PEAR's Payment_Process
to deal with the payments.
That said, I believe that Zen Cart does product options, but don't quote
me on that, I've never actually used it myself, just looked. ;-)
--
paperCrane <Justin Patrin>
--- End Message ---
--- Begin Message ---
That's very simple. If you don't mind writing a bit of specific code you
could do it in about an hour, there are many snippets of code for payment
processors that you could use. Try Hotscripts.com.
dan mccullough
sr. engineer
url: heathermccullough.com
tf: 866.298.3991
w: 603.444.9808
________________________________
There is no such thing as a problem, unless the servers are on fire.
Sometimes great opportunity comes brilliantly disguised as bad news.
-----Original Message-----
From: Ryan Schefke [mailto:[EMAIL PROTECTED]
Sent: Friday, May 14, 2004 8:05 PM
To: 'Justin Patrin'; [EMAIL PROTECTED]
Subject: RE: [PHP] Re: Looking For Easy To Use Shopping Cart
I want my customer to be able to select a few options via radio buttons (12
months or 24 months - how many photos in their photo album, etc) that impact
the price. Then, I want the customer to click a "checkout" link that takes
them directly to a form to input billing address and credit card
information.
Any recommendations/guidance?
I'm calling around and speaking to payment gateways and merchant account
providers but wanted to tap into the open source community to see what's out
there that can fit my needs.
I really don't think this is that complex of a task, or maybe it is?
Thanks,
Ryan
-----Original Message-----
From: Justin Patrin [mailto:[EMAIL PROTECTED]
Sent: Friday, May 14, 2004 6:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Looking For Easy To Use Shopping Cart
Ryan Schefke wrote:
> Can anyone recommend a good open source shopping cart solution? I built an
> application for custom websites, now, I just need to interface to a
shopping
> cart. I'm using mysql. Any suggestions?
>
> ...looking for something easy.
>
> Thanks,
> Ryan
>
Well...
Do you mean that you've created a storefront already and need a cart, or
do you need the whole thing? There really isn't any only cart software,
they all include a storefront.
From what I've seen, Zen Cart is pretty well featured and is open
source and free.
--
paperCrane <Justin Patrin>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
http://tutorialized.com/tutorials/PHP/E-Commerce/tutorial/Roll-Out-Your-Cart
/619
very very simple. The problem with most e-commerce carts out there is that
they come with more then just the cart piece, they have all the product and
ancillary pages and you have to weed through their design. That's why I
suggest a tutorial as they usually only have the cart piece.
http://tutorialized.com/tutorials/PHP/E-Commerce/tutorial/Building-an-E-Comm
erce-Site-Part-1-Building-a-Product-Catalog/622
http://tutorialized.com/tutorials/PHP/E-Commerce/tutorial/Building-an-E-Comm
erce-Site-Part-2-Managing-Users-with-Sessions/623
http://tutorialized.com/tutorials/PHP/E-Commerce/tutorial/Building-an-E-Comm
erce-Site-Part-3-Catalogs-and-Shopping-Carts/624
A little more involved.
dan mccullough
sr. engineer
url: heathermccullough.com
tf: 866.298.3991
w: 603.444.9808
________________________________
There is no such thing as a problem, unless the servers are on fire.
Sometimes great opportunity comes brilliantly disguised as bad news.
-----Original Message-----
From: Ryan Schefke [mailto:[EMAIL PROTECTED]
Sent: Friday, May 14, 2004 8:05 PM
To: 'Justin Patrin'; [EMAIL PROTECTED]
Subject: RE: [PHP] Re: Looking For Easy To Use Shopping Cart
I want my customer to be able to select a few options via radio buttons (12
months or 24 months - how many photos in their photo album, etc) that impact
the price. Then, I want the customer to click a "checkout" link that takes
them directly to a form to input billing address and credit card
information.
Any recommendations/guidance?
I'm calling around and speaking to payment gateways and merchant account
providers but wanted to tap into the open source community to see what's out
there that can fit my needs.
I really don't think this is that complex of a task, or maybe it is?
Thanks,
Ryan
-----Original Message-----
From: Justin Patrin [mailto:[EMAIL PROTECTED]
Sent: Friday, May 14, 2004 6:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Looking For Easy To Use Shopping Cart
Ryan Schefke wrote:
> Can anyone recommend a good open source shopping cart solution? I built an
> application for custom websites, now, I just need to interface to a
shopping
> cart. I'm using mysql. Any suggestions?
>
> ...looking for something easy.
>
> Thanks,
> Ryan
>
Well...
Do you mean that you've created a storefront already and need a cart, or
do you need the whole thing? There really isn't any only cart software,
they all include a storefront.
From what I've seen, Zen Cart is pretty well featured and is open
source and free.
--
paperCrane <Justin Patrin>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I need to pack() data in PHP according to a typedef'ed C format
structure, but there seems to be two problems (as per the docs:
http://ca.php.net/manual/en/function.pack.php).
First, in PHP there is no format option for "long signed integers,
big-endian byte order", just "signed long (always 32 bit, machine byte
order)". Or am I missing something?
Second—and I guess this is not a problem with PHP per se, just a
question of interpretation—the client specifications call for a certain
10-digit string to be packed as char (" char[10] "). But "char" is just
a single character right? Or do you think the docs essentially mean
packing it as an alpha? (Whose length can be specified.)
$str = "1234567890";
$packed = pack("a10string",$str);
...Rene
--- End Message ---
--- Begin Message ---
Hello Tom,
Friday, May 14, 2004, 7:21:39 PM, you wrote:
TC> Try:
TC> http://www.1phpstreet.com/vb/scripts/ShowCode.asp?txtCodeId=318&lngWId=8
TC> Regards,
TC> Tom
so, where i can download the list of countries and its ip address ?
thx
--
Best regards,
adwin
--- End Message ---
--- Begin Message ---
IIRC, the goal of PNG is lossless output and it outputs that exactly
with PHP. What you send is what you get out. When you're using GD, I
suggest you make an 8 bit GD image resource, then make that into PNG.
There are several functions dealing with converting bit depth and such,
poke around the GD image reference section in the PHP manual.
Sorry if this is too vague, it's all off the top of my head but I think
it will give you enough to go on.
-Galen
On May 14, 2004, at 3:05 PM, Sam Joseph wrote:
Hi all,
I've recently got the GD libraries set up and working with php and I
have been resizing and reformating images to my hearts content.
One thing I notice however is that when I output png images they seem
by default to come out in the larger size PNG32 format, as opposed to
the lightweight PNG8 format that I would prefer.
I've checked the archives and googled and found no direct reference to
this issue.
If anybody can tell me how to adjust the png output format php I'd be
very grateful. Although I have the feeling that this might well
require hacking away at the gd source ....
Thanks in advance.
CHEERS> SAM
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi Galen,
Many thanks for your reply. I tried to find things in the php manual
relating to bit depth, but I didn't find anything relevant:
http://www.google.co.jp/search?sourceid=navclient&hl=ja&ie=UTF-8&oe=UTF-8&q=site:www%2Ephp%2Enet+bit+depth
I haven't read every single one of the image functions in detail, but I
did look through them all, and at the moment I can't see anything that
allows me to manipulate the bit depth. The closest thing I can see is
the imagecolorstotal function which returns the number of colors in the
specified image's palette.
Apologies if I'm missing something obvious, but if anybody knows about a
specific function that does this I'd be very interested to hear about it.
Many thanks in advance.
CHEERS> SAM
Galen wrote:
IIRC, the goal of PNG is lossless output and it outputs that exactly
with PHP. What you send is what you get out. When you're using GD, I
suggest you make an 8 bit GD image resource, then make that into PNG.
There are several functions dealing with converting bit depth and
such, poke around the GD image reference section in the PHP manual.
Sorry if this is too vague, it's all off the top of my head but I
think it will give you enough to go on.
-Galen
On May 14, 2004, at 3:05 PM, Sam Joseph wrote:
Hi all,
I've recently got the GD libraries set up and working with php and I
have been resizing and reformating images to my hearts content.
One thing I notice however is that when I output png images they seem
by default to come out in the larger size PNG32 format, as opposed to
the lightweight PNG8 format that I would prefer.
I've checked the archives and googled and found no direct reference
to this issue.
If anybody can tell me how to adjust the png output format php I'd be
very grateful. Although I have the feeling that this might well
require hacking away at the gd source ....
Thanks in advance.
CHEERS> SAM
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Sam,
OK, sorry, I only had a few moments before. Let's see if this points
you in the right direction.
Basically, you can have "standard" 8-bit images ("color") and then
"true" color images (24 bit). When you "create" the GD image resource,
you use a function to do that. One such function is imagecreate() -
this generates a palette based image that (IIRC, 8 bit or less) will
compress to that smaller PNG 8 file. imagecreatetruecolor() typically
makes full-depth ("true color") images that become PNG 24/32 and
support transparency and everything. You may find
imagetruecolortopalette() also of interest as it transforms a true
color image into a palette based image.
So the distinction is this: true color = 32 bit (24 bit + alpha
channel), palette based = exact number of colors + no alpha channel
I may be subtly wrong on a few of these smaller points, and please
accept my apologies if I am, but the gist is that you need a
palette-based image to get 8-bit PNGs!
-Galen
On May 14, 2004, at 4:27 PM, Sam Joseph wrote:
Hi Galen,
Many thanks for your reply. I tried to find things in the php manual
relating to bit depth, but I didn't find anything relevant:
http://www.google.co.jp/search?sourceid=navclient&hl=ja&ie=UTF
-8&oe=UTF-8&q=site:www%2Ephp%2Enet+bit+depth
I haven't read every single one of the image functions in detail, but
I did look through them all, and at the moment I can't see anything
that allows me to manipulate the bit depth. The closest thing I can
see is the imagecolorstotal function which returns the number of
colors in the specified image's palette.
Apologies if I'm missing something obvious, but if anybody knows about
a specific function that does this I'd be very interested to hear
about it.
Many thanks in advance.
CHEERS> SAM
Galen wrote:
IIRC, the goal of PNG is lossless output and it outputs that exactly
with PHP. What you send is what you get out. When you're using GD, I
suggest you make an 8 bit GD image resource, then make that into PNG.
There are several functions dealing with converting bit depth and
such, poke around the GD image reference section in the PHP manual.
Sorry if this is too vague, it's all off the top of my head but I
think it will give you enough to go on.
-Galen
On May 14, 2004, at 3:05 PM, Sam Joseph wrote:
Hi all,
I've recently got the GD libraries set up and working with php and I
have been resizing and reformating images to my hearts content.
One thing I notice however is that when I output png images they
seem by default to come out in the larger size PNG32 format, as
opposed to the lightweight PNG8 format that I would prefer.
I've checked the archives and googled and found no direct reference
to this issue.
If anybody can tell me how to adjust the png output format php I'd
be very grateful. Although I have the feeling that this might well
require hacking away at the gd source ....
Thanks in advance.
CHEERS> SAM
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi Galen,
Thanks for that - all sorted now. I had looked at
imagetruecolortopalette, but had not taken it on board. I'm now using
it as follows to get a balance between image quality and file size (for
png output):
imagetruecolortopalette ( $myImage, true, 64);
It's just remarkable how much better quality I can get for a given size
with jpeg as opposed to png - but then I'm unable to use jpeg for my
current application.
Many, many thanks for your help.
CHEERS> SAM
Galen wrote:
Sam,
OK, sorry, I only had a few moments before. Let's see if this points
you in the right direction.
Basically, you can have "standard" 8-bit images ("color") and then
"true" color images (24 bit). When you "create" the GD image
resource, you use a function to do that. One such function is
imagecreate() - this generates a palette based image that (IIRC, 8
bit or less) will compress to that smaller PNG 8 file.
imagecreatetruecolor() typically makes full-depth ("true color")
images that become PNG 24/32 and support transparency and everything.
You may find imagetruecolortopalette() also of interest as it
transforms a true color image into a palette based image.
So the distinction is this: true color = 32 bit (24 bit + alpha
channel), palette based = exact number of colors + no alpha channel
I may be subtly wrong on a few of these smaller points, and please
accept my apologies if I am, but the gist is that you need a
palette-based image to get 8-bit PNGs!
-Galen
On May 14, 2004, at 4:27 PM, Sam Joseph wrote:
Hi Galen,
Many thanks for your reply. I tried to find things in the php
manual relating to bit depth, but I didn't find anything relevant:
http://www.google.co.jp/search?sourceid=navclient&hl=ja&ie=UTF
-8&oe=UTF-8&q=site:www%2Ephp%2Enet+bit+depth
I haven't read every single one of the image functions in detail,
but I did look through them all, and at the moment I can't see
anything that allows me to manipulate the bit depth. The closest
thing I can see is the imagecolorstotal function which returns the
number of colors in the specified image's palette.
Apologies if I'm missing something obvious, but if anybody knows
about a specific function that does this I'd be very interested to
hear about it.
Many thanks in advance.
CHEERS> SAM
Galen wrote:
IIRC, the goal of PNG is lossless output and it outputs that
exactly with PHP. What you send is what you get out. When you're
using GD, I suggest you make an 8 bit GD image resource, then make
that into PNG. There are several functions dealing with converting
bit depth and such, poke around the GD image reference section in
the PHP manual.
Sorry if this is too vague, it's all off the top of my head but I
think it will give you enough to go on.
-Galen
On May 14, 2004, at 3:05 PM, Sam Joseph wrote:
Hi all,
I've recently got the GD libraries set up and working with php and
I have been resizing and reformating images to my hearts content.
One thing I notice however is that when I output png images they
seem by default to come out in the larger size PNG32 format, as
opposed to the lightweight PNG8 format that I would prefer.
I've checked the archives and googled and found no direct
reference to this issue.
If anybody can tell me how to adjust the png output format php I'd
be very grateful. Although I have the feeling that this might
well require hacking away at the gd source ....
Thanks in advance.
CHEERS> SAM
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi,
I just visited a popular swedish based site that is mostly powered via ASP,
they have one little piece of functionality this is really puzzling me and I
would like to add it to one of my working apps (a shopping cart)...
Its a bit hard to explain so will give you the steps so you can go to the
site and see for yourself...Its all pretty much written in swedish but will
try to explain.
1. go to http://www.blocket.se/
2. on the right side of the screen there are some numbers (1 to 23) and next
to each number is a Swedish city...click on any one of them.
3. You should be presented by a lot of "text ads"...click on any one of them
to open them (the ones with teh little camera symbol at the side will also
display a pic of the product)
4.Scroll to the bottom of any ad and you should see " Spara i
Annonsbevakningen " which roughly translates to "save this ad"...click it.
It will save the ad for you (via cookies most probably..dont know for
sure...but I visited much later and even after I closed->reopened my browser
and revisited the site,it was still there)
5.Click the back button a few times so that you can save a bunch of
ads...then
This is the part I like, when you click on "Ta bort" next to any of your
saved ads ("Ta bort" means "Remove")...it just goes from the page...very
smooth and does not need for the page to be "script processed" again or
anything...HOW? What is it? Javascript..? DHTML? what?
Thanks,
-Ryan
--- End Message ---
--- Begin Message ---
On Fri, 2004-05-14 at 21:23, Ryan A wrote:
> Hi,
> I just visited a popular swedish based site that is mostly powered via ASP,
> they have one little piece of functionality this is really puzzling me and I
> would like to add it to one of my working apps (a shopping cart)...
>
> Its a bit hard to explain so will give you the steps so you can go to the
> site and see for yourself...Its all pretty much written in swedish but will
> try to explain.
>
> 1. go to http://www.blocket.se/
> 2. on the right side of the screen there are some numbers (1 to 23) and next
> to each number is a Swedish city...click on any one of them.
> 3. You should be presented by a lot of "text ads"...click on any one of them
> to open them (the ones with teh little camera symbol at the side will also
> display a pic of the product)
> 4.Scroll to the bottom of any ad and you should see " Spara i
> Annonsbevakningen " which roughly translates to "save this ad"...click it.
> It will save the ad for you (via cookies most probably..dont know for
> sure...but I visited much later and even after I closed->reopened my browser
> and revisited the site,it was still there)
> 5.Click the back button a few times so that you can save a bunch of
> ads...then
>
> This is the part I like, when you click on "Ta bort" next to any of your
> saved ads ("Ta bort" means "Remove")...it just goes from the page...very
> smooth and does not need for the page to be "script processed" again or
> anything...HOW? What is it? Javascript..? DHTML? what?
In linux under Netscape 7 and Opera 7.2 it reloaded the page :/ That
said looking at the URL when the mouse is over the link:
http://www.blocket.se/new?caller=ogl_s&l=0&rm_id=2595475&city=0
The rm_id is being set as a GET variable with an appropriate ID to
remove the entry. So when the page reloads it first deletes the entry.
This is standard functionality in many websites.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
Hey Rob
<snip>
In linux under Netscape 7 and Opera 7.2 it reloaded the page :/ That
said looking at the URL when the mouse is over the link:
http://www.blocket.se/new?caller=ogl_s&l=0&rm_id=2595475&city=0
The rm_id is being set as a GET variable with an appropriate ID to
remove the entry. So when the page reloads it first deletes the entry.
This is standard functionality in many websites.
</snip>
Hmmm..for IE it didnt reload the page...or reloaded the page so fast that I
couldnt make out the reload and the product just seemed to
"disappear"...very smoothly...thats why I was impressed...
I did make a note of the rm_id and saw that everything was a GET
string....but didnt know how it was deleteing the text from the page so
fast...
Thanks,
-Ryan
--- End Message ---
--- Begin Message ---
It's fairly simple: at the top of your script, have a block of code similar
to the following, and have the link point to
--
$_SERVER['PHP_SELF']."?rm_id=".$id_to_be_deleted
--
I'll leave out all but the essential elements.
<code>
<?php
if (isset($_GET['rm_id']))
{
$query = "REMOVE FROM whatever WHERE id = ".$_GET['rm_id']." LIMIT 1";
mysql_query($query);
}
?>
</code>
Will Collins
-----Original Message-----
From: Robert Cummings [mailto:[EMAIL PROTECTED]
Sent: Friday, May 14, 2004 8:49 PM
To: Ryan A
Cc: PHP-General
Subject: Re: [PHP] How to duplicate this functionality?
On Fri, 2004-05-14 at 21:23, Ryan A wrote:
> Hi,
> I just visited a popular swedish based site that is mostly powered via
ASP,
> they have one little piece of functionality this is really puzzling me and
I
> would like to add it to one of my working apps (a shopping cart)...
>
> Its a bit hard to explain so will give you the steps so you can go to the
> site and see for yourself...Its all pretty much written in swedish but
will
> try to explain.
>
> 1. go to http://www.blocket.se/
> 2. on the right side of the screen there are some numbers (1 to 23) and
next
> to each number is a Swedish city...click on any one of them.
> 3. You should be presented by a lot of "text ads"...click on any one of
them
> to open them (the ones with teh little camera symbol at the side will also
> display a pic of the product)
> 4.Scroll to the bottom of any ad and you should see " Spara i
> Annonsbevakningen " which roughly translates to "save this ad"...click it.
> It will save the ad for you (via cookies most probably..dont know for
> sure...but I visited much later and even after I closed->reopened my
browser
> and revisited the site,it was still there)
> 5.Click the back button a few times so that you can save a bunch of
> ads...then
>
> This is the part I like, when you click on "Ta bort" next to any of your
> saved ads ("Ta bort" means "Remove")...it just goes from the page...very
> smooth and does not need for the page to be "script processed" again or
> anything...HOW? What is it? Javascript..? DHTML? what?
In linux under Netscape 7 and Opera 7.2 it reloaded the page :/ That
said looking at the URL when the mouse is over the link:
http://www.blocket.se/new?caller=ogl_s&l=0&rm_id=2595475&city=0
The rm_id is being set as a GET variable with an appropriate ID to
remove the entry. So when the page reloads it first deletes the entry.
This is standard functionality in many websites.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
* Thus wrote Ryan A ([EMAIL PROTECTED]):
> Hey Rob
>
> <snip>
> In linux under Netscape 7 and Opera 7.2 it reloaded the page :/ That
> said looking at the URL when the mouse is over the link:
>
> http://www.blocket.se/new?caller=ogl_s&l=0&rm_id=2595475&city=0
>
> The rm_id is being set as a GET variable with an appropriate ID to
> remove the entry. So when the page reloads it first deletes the entry.
> This is standard functionality in many websites.
> </snip>
>
> Hmmm..for IE it didnt reload the page...or reloaded the page so fast that I
> couldnt make out the reload and the product just seemed to
> "disappear"...very smoothly...thats why I was impressed...
You might want to complain to your ISP that your connection is too
fast :)
>
> I did make a note of the rm_id and saw that everything was a GET
> string....but didnt know how it was deleteing the text from the page so
> fast...
The rendering is fast because its a simple page and utilizes the
browser's cache effeciently (css link, cached small images, etc.)
Curt
--
"I used to think I was indecisive, but now I'm not so sure."
--- End Message ---
--- Begin Message ---
Also, I forgot to mention... another little snippet I like to use for
something like this is this meta tag:
<META HTTP-EQUIV="Page-Enter" Content="blendtrans(duration=.1)">
It makes the pages fade into each other, and for two pages that are very
similar (like your example) it doesn't look like there's any reload at all.
It has a pretty cool effect when you up the "duration" and use it for
totally different pages too... it's just really fun to play with. Just
stick it into the header of your page.
Will Collins
-----Original Message-----
From: Will Collins [mailto:[EMAIL PROTECTED]
Sent: Friday, May 14, 2004 9:17 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] How to duplicate this functionality?
It's fairly simple: at the top of your script, have a block of code similar
to the following, and have the link point to
--
$_SERVER['PHP_SELF']."?rm_id=".$id_to_be_deleted
--
I'll leave out all but the essential elements.
<code>
<?php
if (isset($_GET['rm_id']))
{
$query = "REMOVE FROM whatever WHERE id = ".$_GET['rm_id']." LIMIT 1";
mysql_query($query);
}
?>
</code>
Will Collins
-----Original Message-----
From: Robert Cummings [mailto:[EMAIL PROTECTED]
Sent: Friday, May 14, 2004 8:49 PM
To: Ryan A
Cc: PHP-General
Subject: Re: [PHP] How to duplicate this functionality?
On Fri, 2004-05-14 at 21:23, Ryan A wrote:
> Hi,
> I just visited a popular swedish based site that is mostly powered via
ASP,
> they have one little piece of functionality this is really puzzling me and
I
> would like to add it to one of my working apps (a shopping cart)...
>
> Its a bit hard to explain so will give you the steps so you can go to the
> site and see for yourself...Its all pretty much written in swedish but
will
> try to explain.
>
> 1. go to http://www.blocket.se/
> 2. on the right side of the screen there are some numbers (1 to 23) and
next
> to each number is a Swedish city...click on any one of them.
> 3. You should be presented by a lot of "text ads"...click on any one of
them
> to open them (the ones with teh little camera symbol at the side will also
> display a pic of the product)
> 4.Scroll to the bottom of any ad and you should see " Spara i
> Annonsbevakningen " which roughly translates to "save this ad"...click it.
> It will save the ad for you (via cookies most probably..dont know for
> sure...but I visited much later and even after I closed->reopened my
browser
> and revisited the site,it was still there)
> 5.Click the back button a few times so that you can save a bunch of
> ads...then
>
> This is the part I like, when you click on "Ta bort" next to any of your
> saved ads ("Ta bort" means "Remove")...it just goes from the page...very
> smooth and does not need for the page to be "script processed" again or
> anything...HOW? What is it? Javascript..? DHTML? what?
In linux under Netscape 7 and Opera 7.2 it reloaded the page :/ That
said looking at the URL when the mouse is over the link:
http://www.blocket.se/new?caller=ogl_s&l=0&rm_id=2595475&city=0
The rm_id is being set as a GET variable with an appropriate ID to
remove the entry. So when the page reloads it first deletes the entry.
This is standard functionality in many websites.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
How are you restarting the socket? From memory you can't just reuse a
socket you would need to create a new socket. What does netstat say
about the status of your connection before and after?
-> Periodically, send a Ping_DS to the Server
-> If the Ping_DS transmit fails
-> Clean-up and restart the socket connection
-> If a Ping_DS_Ack is not received from the Server
-> Clean-up and restart the socket connection
---THIS DOESN'T WORK----------------------
Graeme.
--- End Message ---
--- Begin Message ---
Jianping Zhu wrote:
Hi, thank you for your respinse.
It the /etc/php.ini i have something like:
;
; extension=modulename.extension
;
; For example:
;
extension=mysql.so
if you go to
http://coopunit.forestry.uga.edu:8080/test.php
you will find mysql is not installed as an extension.
but i do not know how to fix this problem.
Do i have to recomplie the phd from source code?
Yes.
See http://www.php.net/mysql for details.
--- End Message ---
--- Begin Message ---
Hi,
Saturday, May 15, 2004, 6:13:25 AM, you wrote:
GL> I was just wondering if anyone had any good advice or tutorials on
GL> building a simple template engine system. I am woking on a small project
GL> that I would like to distribute, and I would of course like to separate
GL> logic from html. I really just want to know the basics without caching.
GL> I am familiar with Smarty and PHPLib and FastTemplate and some others.
GL> But since I am going to be distributing the app, I would like it as
GL> portable and small/simple as possible. Those template systems are
GL> overkill for what I need. Really it does not even have to be a "Template
GL> system", I would just like to here your thoughts on how you may have
GL> accomplished separation of logic from output in a simple way.
GL> Thanks,
GL> George
You can take a look at my 'system', its small (I use it in an
auto-prepend file) and pretty fast. You can view the code here
http://kwiktemplates.com/download.php and the syntax is here
http://kwiktemplates.com/ (still working on the site) Anything you
don't understand drop me a line.
--
regards,
Tom
--- End Message ---
--- Begin Message ---
I use one called phemplate, dont be scared of the same its pretty good and
follows the same ideology as the rest although check out the benchmark tool
of other engines which is supplied on the site.
http://pukomuko.esu.lt/phemplate/
I have been thinking of moving to smarty or i just wish there was a
templating standard, like a php equivalant to struts hehe.
> -----Original Message-----
> From: Tom Rogers [mailto:[EMAIL PROTECTED]
> Sent: Saturday, May 15, 2004 6:10 PM
> To: George Lantz
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Template Engine
>
>
> Hi,
>
> Saturday, May 15, 2004, 6:13:25 AM, you wrote:
> GL> I was just wondering if anyone had any good advice or tutorials on
> GL> building a simple template engine system. I am woking on a
> small project
> GL> that I would like to distribute, and I would of course like
> to separate
> GL> logic from html. I really just want to know the basics
> without caching.
> GL> I am familiar with Smarty and PHPLib and FastTemplate and some others.
> GL> But since I am going to be distributing the app, I would like it as
> GL> portable and small/simple as possible. Those template systems are
> GL> overkill for what I need. Really it does not even have to be
> a "Template
> GL> system", I would just like to here your thoughts on how you may have
> GL> accomplished separation of logic from output in a simple way.
>
> GL> Thanks,
> GL> George
>
> You can take a look at my 'system', its small (I use it in an
> auto-prepend file) and pretty fast. You can view the code here
> http://kwiktemplates.com/download.php and the syntax is here
> http://kwiktemplates.com/ (still working on the site) Anything you
> don't understand drop me a line.
>
> --
> regards,
> Tom
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
How would I carry a variable from one page to another
Here is what I mean
I have a send.php page and this is sent to
insert_into_database.php where the values of the previous page are inserted
into the database.
I then use a meta=refresh to go to another page and evaluate the variable.
The problem is that I do remember how to carry the variable. I believed
that I used the meta before to carry it, but unsure. Any help would be
appreciated!
--- End Message ---
--- Begin Message ---
"Ronald "The Newbie" Allen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> How would I carry a variable from one page to another
>
> Here is what I mean
>
> I have a send.php page and this is sent to
> insert_into_database.php where the values of the previous page are
inserted
> into the database.
> I then use a meta=refresh to go to another page and evaluate the variable.
> The problem is that I do remember how to carry the variable. I believed
> that I used the meta before to carry it, but unsure. Any help would be
> appreciated!
This could be done via GET by appending the values to the target URI:
insert_into_database.php?value1=$value1&value2=$value2&value3=$value3
On the next page you acces those values via:
$_GET['value1']
$_GET['value2']
$_GET['value3']
Here's the corresponding manual:
http://de3.php.net/manual/en/reserved.variables.php#reserved.variables.get
Hope this helps.
Regards, Torsten
--- End Message ---