You are here: Re: Getting quantity input for each product in a product/price associative array « PHP Language « IT news, forums, messages
Re: Getting quantity input for each product in a product/price associative array

Posted by Rik on 01/03/07 04:12

Ryan wrote:
> The only problem with that, is I'm trying to stay within the
> guidelines of where I am in the book. It appears I'm having trouble
> just sending data in an array from one site to another. I take it
> using the html 'sumbit' won't work in a php script?

Well, it works wonderfully thank you very much :-)

> I tried using
> regular arrays to store price, names, and the quantity the user
> inputs, but when I try to echo any of that into the process.php
> script, nothing displays.

Hard to say what's wrong without that code, but if the book's that bad you
probaly want to check out register_globals and a lot can become clear. If
not, post the snippet of your receiving code.

> It's not a huge ordeal, I just though I'd
> try update my pages as I go along with the book. Thanks though!

Well, normally one would have some kind of 'id' for the different commics.
If you'd name you input fields 'quantity[{$id}] for instance, you'd have a
perfectly servicable array on the receiving end when posting in
$_POST['quantity']. With thing like array_filter() and the like you can
work on the whole array quite fast, and is often a more efficient and
faster solution then going OO.
--
Rik Wasmus

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация