[PHP] Forms validation and creation- easier solution?

2009-05-20 Thread Angelo Zanetti
Hi all.

 

We have done quite a few projects and we are looking to find better ways to
implementing forms.

 

Forms seem to be quite time consuming and repetitive.

 

Generally are there any classes or libraries that will assist with: 

 

1.  Easy creation of forms (fields and layout)

2. Validation of specific fields within the forms (server side not JS)

3. Decrease in time required to setup the forms pages

any other comments are welcome.

 

Thanks in advance

Angelo


Elemental
http://www.elemental.co.za  

Dynamic Web and Mobile Solutions

 

 



Re: [PHP] Forms validation and creation- easier solution?

2009-05-20 Thread Olexandr Heneralov
Hi!
Zend framework has a wonderful solution to solve this task. You can download
even the demo showing how to do this task
Best regards,
Alex.

2009/5/20 Angelo Zanetti 

> Hi all.
>
>
>
> We have done quite a few projects and we are looking to find better ways to
> implementing forms.
>
>
>
> Forms seem to be quite time consuming and repetitive.
>
>
>
> Generally are there any classes or libraries that will assist with:
>
>
>
> 1.  Easy creation of forms (fields and layout)
>
> 2. Validation of specific fields within the forms (server side not JS)
>
> 3. Decrease in time required to setup the forms pages
>
> any other comments are welcome.
>
>
>
> Thanks in advance
>
> Angelo
>
>
> Elemental
> http://www.elemental.co.za 
>
> Dynamic Web and Mobile Solutions
>
>
>
>
>
>


RE: [PHP] Forms validation and creation- easier solution?

2009-05-20 Thread Angelo Zanetti
 

 

  _  

From: Olexandr Heneralov [mailto:ohenera...@gmail.com] 
Sent: 20 May 2009 09:08
To: Angelo Zanetti
Cc: php-general@lists.php.net
Subject: Re: [PHP] Forms validation and creation- easier solution?

 

Hi!
Zend framework has a wonderful solution to solve this task. You can download
even the demo showing how to do this task
Best regards,
Alex.

 

Thanks Alex. But would that mean that I need to implement the entire
Framework or can I just use the class to incorporate into our new projects
(bespoke applications - custom developed).

Looking forward to your reply!

Angelo

2009/5/20 Angelo Zanetti 

Hi all.



We have done quite a few projects and we are looking to find better ways to
implementing forms.



Forms seem to be quite time consuming and repetitive.



Generally are there any classes or libraries that will assist with:



1.  Easy creation of forms (fields and layout)

2. Validation of specific fields within the forms (server side not JS)

3. Decrease in time required to setup the forms pages

any other comments are welcome.



Thanks in advance

Angelo


Elemental
http://www.elemental.co.za 

Dynamic Web and Mobile Solutions






 



Re: [PHP] Forms validation and creation- easier solution?

2009-05-20 Thread Olexandr Heneralov
Hi!
No, you should not use all the framework.
You can use just a class - Zend_Form (
http://framework.zend.com/manual/en/zend.form.quickstart.html).


2009/5/20 Angelo Zanetti 

>
>
>
>  --
>
> *From:* Olexandr Heneralov [mailto:ohenera...@gmail.com]
> *Sent:* 20 May 2009 09:08
> *To:* Angelo Zanetti
> *Cc:* php-general@lists.php.net
> *Subject:* Re: [PHP] Forms validation and creation- easier solution?
>
>
>
> Hi!
> Zend framework has a wonderful solution to solve this task. You can
> download even the demo showing how to do this task
> Best regards,
> Alex.
>
>
>
> Thanks Alex. But would that mean that I need to implement the entire
> Framework or can I just use the class to incorporate into our new projects
> (bespoke applications – custom developed).
>
> Looking forward to your reply!
>
> Angelo
>
> 2009/5/20 Angelo Zanetti 
>
> Hi all.
>
>
>
> We have done quite a few projects and we are looking to find better ways to
> implementing forms.
>
>
>
> Forms seem to be quite time consuming and repetitive.
>
>
>
> Generally are there any classes or libraries that will assist with:
>
>
>
> 1.  Easy creation of forms (fields and layout)
>
> 2. Validation of specific fields within the forms (server side not JS)
>
> 3. Decrease in time required to setup the forms pages
>
> any other comments are welcome.
>
>
>
> Thanks in advance
>
> Angelo
>
>
> Elemental
> http://www.elemental.co.za 
>
> Dynamic Web and Mobile Solutions
>
>
>
>
>
>


Re: [PHP] Posting values to a URL

2009-05-20 Thread dele454

Thanks Nathan,

But that wont work effectively because the response header could change
depending on the outcome of the transaction or if file is not found on the
seller's website etc.



Nathan Rixham wrote:
> 
> dele454 wrote:
>> hi,
>> 
>> I am working on integrating a credit payment service from setcom. on
>> completion of transaction setcom sends bunch of post variables that my
>> script has to send back to setcom to get the details of the transaction
>> as
>> an xml file.
>> 
>> I am using the pecl_http extension(http_post_fields) for posting these
>> variables but i have this reponse header info with the xml file that i
>> can't
>> get rid of. And the php doc isnt explicit enough on the use of this
>> function:
>> 
>> Code:
>> 
>> HTTP/1.1 200 OK Connection: close Date: Tue, 19 May 2009 21:56:02 GMT
>> Content-Type: text/html; charset=UTF-8 Server: Microsoft-IIS/6.0 P3P:
>> CP="IDC DSP CURa ADMa DEVa IVAa IVDa OUR DELa NOR LEG UNI PUR NAV INT
>> DEM"
>> X-Powered-By: ASP.NET Set-Cookie: CFID=142013;expires=Thu, 12-May-2039
>> 21:56:02 GMT;path=/ Set-Cookie: CFTOKEN=99801499;expires=Thu, 12-May-2039
>> 21:56:02 GMT;path=/ > encoding='UTF-8'?>Complete
>> 
>> 
>> i need to work with the xml file but the response header with the xml
>> file
>> is really not allowing me to.
>> 
>> How can i set the http_post_field function not to return response
>> headers?
>> 
>> 
>> Help needed thanks in advance!
>> 
>> -
>> dee
> 
> $content = 'the http response';
> $parts = explode(' $content = ' 
> i guess.. if you removed the new lines in that chunk of response then 
> explode/split on \r\n\r\n as that's how http messages are formatted and 
> split up :)
> 
> regards
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 


-
dee
-- 
View this message in context: 
http://www.nabble.com/Posting-values-to-a-URL-tp23625856p23630473.html
Sent from the PHP - General mailing list archive at Nabble.com.


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



Re: [PHP] Posting values to a URL

2009-05-20 Thread dele454

Great stuff!! :) thanks Shawn. the http_parse_message does exactly what i
want. thanks a mil :)

Shawn McKenzie wrote:
> 
> dele454 wrote:
>> hi,
>> 
>> I am working on integrating a credit payment service from setcom. on
>> completion of transaction setcom sends bunch of post variables that my
>> script has to send back to setcom to get the details of the transaction
>> as
>> an xml file.
>> 
>> I am using the pecl_http extension(http_post_fields) for posting these
>> variables but i have this reponse header info with the xml file that i
>> can't
>> get rid of. And the php doc isnt explicit enough on the use of this
>> function:
>> 
>> Code:
>> 
>> HTTP/1.1 200 OK Connection: close Date: Tue, 19 May 2009 21:56:02 GMT
>> Content-Type: text/html; charset=UTF-8 Server: Microsoft-IIS/6.0 P3P:
>> CP="IDC DSP CURa ADMa DEVa IVAa IVDa OUR DELa NOR LEG UNI PUR NAV INT
>> DEM"
>> X-Powered-By: ASP.NET Set-Cookie: CFID=142013;expires=Thu, 12-May-2039
>> 21:56:02 GMT;path=/ Set-Cookie: CFTOKEN=99801499;expires=Thu, 12-May-2039
>> 21:56:02 GMT;path=/ > encoding='UTF-8'?>Complete
>> 
>> 
>> i need to work with the xml file but the response header with the xml
>> file
>> is really not allowing me to.
>> 
>> How can i set the http_post_field function not to return response
>> headers?
>> 
>> 
>> Help needed thanks in advance!
>> 
>> -
>> dee
> 
> $response = http_parse_message(http_post_fields($url, $fields));
> $body = $response->body;
> 
> -- 
> Thanks!
> -Shawn
> http://www.spidean.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 


-
dee
-- 
View this message in context: 
http://www.nabble.com/Posting-values-to-a-URL-tp23625856p23630494.html
Sent from the PHP - General mailing list archive at Nabble.com.


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



[PHP] re[PHP] moving data from old users (session_set_save_handler ??)

2009-05-20 Thread pere roca

hi all,
I need to remove data when user leaves my webapplication. I fire an unload
event (that calls a php script) but sometimes fails, so I need a more secure
option.
I wonder if session_set_save_handler is what I need. I think so but not
sure.

So, EVEN if  the user leaves my webapplication, will his session be
destroyed (after reaching $maxlifetime) and, as consequence, the associated
functions will be executed (functions like deleting from database, user
folders...)?

In PHP documentation, it's said:"session.gc_maxlifetime specifies the number
of seconds after which data will be seen as 'garbage' and cleaned up.
Garbage collection occurs during session start. "

And..."session.gc_probability in conjunction with session.gc_divisor is used
to manage probability that the gc (garbage collection) routine is
started.Defaults to 1"   > does it mean that only 1% of the old sessions
(and associated actions) are deleted each time?

Some idea?

thanks alot, 
Pere
-- 
View this message in context: 
http://www.nabble.com/removing-data-from-old-users-%28session_set_save_handler---%29-tp23631194p23631194.html
Sent from the PHP - General mailing list archive at Nabble.com.


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



Re: [PHP] Re: Parsing of forms

2009-05-20 Thread Daniele Grillenzoni

On 20/05/2009 2.45, Nathan Rixham wrote:

Daniele Grillenzoni wrote:

On 19/05/2009 18.09, Andrew Ballard wrote:

On Tue, May 19, 2009 at 10:11 AM, Ford, Mike
wrote:

On 19 May 2009 14:37, Daniele Grillenzoni advised:



My complaint is this: a I can have a select multiple with a
normal name,
which is allowed by every spec, but PHP requires me to use []
in order
to properly retrieve the values.


I really don't understand the problem with this -- in fact, I find it
quite useful to distinguish inputs which may have only 1 value from
those which may be multi-valued. And it all depends on what you mean by
a "normal" name, of course -- no current (X)HTML spec disallows [] as
part of a name attribute, so in that sense a name containing them could
be seen as perfectly normal...!! ;) ;)

Can you explain why this is such a hang-up for you, as I haven't seen
anything in what you've posted so far to convince me it's any kind of
problem?

Cheers!

Mike



I can't speak for the OP, but I've always thought it somewhat odd. An
HTML form should be able to work correctly without modification
regardless of the language that receives the input. As it is, it makes
the HTML for a form implementation specific. You might be able to use
ASP correctly process a form originally targeted toward PHP, but you
could not similarly take a form designed for ASP and process it with
PHP without modification.

It also impacts the use of client-side JavaScript. Consider a simple
page like this:

sundae.html
==



function countToppings() {
var totalToppings = 0;

var toppings = document.sundae.toppings;
// To work with PHP, the above line would have to be changed:
// var toppings = document.sundae.elements['toppings[]'];

if (toppings.length> 1) {
for (var i = 0; i< toppings.length; i++) {
if (toppings[i].checked) totalToppings++;
}
} else {
if (toppings.checked) totalToppings++
}

if (totalToppings == 0) {
confirm("Are you sure you don't want any toppings on your sundae?");
} else if (totalToppings> 3) {
alert("Wow! That's a lot of toppings!");
} else if (totalToppings == 1) {
alert("You only want one topping.");
} else {
alert("You have selected " + totalToppings + " toppings! Yummy!");
}
}






Toppings
 sprinkles
 nuts
 fudge
 caramel
 strawberries








The above form, if submitted, could build a perfectly valid query
string of
"?toppings=sprinkles&toppings=nuts&toppings=fudge&toppings=caramel&toppings=strawberries".


In the grand scheme of things, these are just subtleties that can
easily be handled. Since my first major experience with a web language
was PHP (after a very brief dabble in PERL) before I took a turn at
ASP/VBScript, I'm used to it and it isn't a "hang-up" for me. But
something about it never seemed quite "right" to me either. :-)

Andrew


Andrew captured perfectly what I meant.

"?toppings=sprinkles&toppings=nuts&toppings=fudge&toppings=caramel&toppings=strawberries"
is a valid querystring that php sort of fail at understanding.

I have nothing against supplying a string/array clarification system
based on the name with/without the square brackets, but short of
manually parsing the querystring/request headers, I have no
alternative to that.

Also my original problem came when I had to parse the results of a
form I did NOT originally create, not to mention forms from external
sources...

I don't hate PHP and I don't want to throw off people who like the []
system, just give me an alternative with a small overhead. :P


quick work around :) (could be improved)

 $pair ) {
$pair = explode( '=' , $pair , 2 );
if( !isset( $newGet[$pair[0]] ) ) {
$newGet[$pair[0]] = $pair[1];
} else {
if( !is_array($newGet[$pair[0]]) ) {
$newGet[$pair[0]] = array( $newGet[$pair[0]] );
}
$newGet[$pair[0]][] = $pair[1];
}
}
$_GET = $newGet;
}


print_r( $_GET );
fixGet();
print_r( $_GET );

?>

outputs:

Array
(
[toppings] => caramel
[order] => Order
)
Array
(
[toppings] => Array
(
[0] => nuts
[1] => fudge
[2] => caramel
)

[order] => Order
)


Yeah, and php://input should be able to handle $_POST, but custom 
functions ftl, the idea of having useless overhead for simple stuff like 
this makes me angry.


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



Re: [PHP] Re: Parsing of forms

2009-05-20 Thread Nathan Rixham

Daniele Grillenzoni wrote:

On 20/05/2009 2.45, Nathan Rixham wrote:

Daniele Grillenzoni wrote:

On 19/05/2009 18.09, Andrew Ballard wrote:

On Tue, May 19, 2009 at 10:11 AM, Ford, Mike
wrote:

On 19 May 2009 14:37, Daniele Grillenzoni advised:



My complaint is this: a I can have a select multiple with a
normal name,
which is allowed by every spec, but PHP requires me to use []
in order
to properly retrieve the values.


I really don't understand the problem with this -- in fact, I find it
quite useful to distinguish inputs which may have only 1 value from
those which may be multi-valued. And it all depends on what you 
mean by

a "normal" name, of course -- no current (X)HTML spec disallows [] as
part of a name attribute, so in that sense a name containing them 
could

be seen as perfectly normal...!! ;) ;)

Can you explain why this is such a hang-up for you, as I haven't seen
anything in what you've posted so far to convince me it's any kind of
problem?

Cheers!

Mike



I can't speak for the OP, but I've always thought it somewhat odd. An
HTML form should be able to work correctly without modification
regardless of the language that receives the input. As it is, it makes
the HTML for a form implementation specific. You might be able to use
ASP correctly process a form originally targeted toward PHP, but you
could not similarly take a form designed for ASP and process it with
PHP without modification.

It also impacts the use of client-side JavaScript. Consider a simple
page like this:

sundae.html
==



function countToppings() {
var totalToppings = 0;

var toppings = document.sundae.toppings;
// To work with PHP, the above line would have to be changed:
// var toppings = document.sundae.elements['toppings[]'];

if (toppings.length> 1) {
for (var i = 0; i< toppings.length; i++) {
if (toppings[i].checked) totalToppings++;
}
} else {
if (toppings.checked) totalToppings++
}

if (totalToppings == 0) {
confirm("Are you sure you don't want any toppings on your sundae?");
} else if (totalToppings> 3) {
alert("Wow! That's a lot of toppings!");
} else if (totalToppings == 1) {
alert("You only want one topping.");
} else {
alert("You have selected " + totalToppings + " toppings! Yummy!");
}
}






Toppings
 sprinkles
 nuts
 fudge
 caramel
 strawberries








The above form, if submitted, could build a perfectly valid query
string of
"?toppings=sprinkles&toppings=nuts&toppings=fudge&toppings=caramel&toppings=strawberries". 




In the grand scheme of things, these are just subtleties that can
easily be handled. Since my first major experience with a web language
was PHP (after a very brief dabble in PERL) before I took a turn at
ASP/VBScript, I'm used to it and it isn't a "hang-up" for me. But
something about it never seemed quite "right" to me either. :-)

Andrew


Andrew captured perfectly what I meant.

"?toppings=sprinkles&toppings=nuts&toppings=fudge&toppings=caramel&toppings=strawberries" 


is a valid querystring that php sort of fail at understanding.

I have nothing against supplying a string/array clarification system
based on the name with/without the square brackets, but short of
manually parsing the querystring/request headers, I have no
alternative to that.

Also my original problem came when I had to parse the results of a
form I did NOT originally create, not to mention forms from external
sources...

I don't hate PHP and I don't want to throw off people who like the []
system, just give me an alternative with a small overhead. :P


quick work around :) (could be improved)

 $pair ) {
$pair = explode( '=' , $pair , 2 );
if( !isset( $newGet[$pair[0]] ) ) {
$newGet[$pair[0]] = $pair[1];
} else {
if( !is_array($newGet[$pair[0]]) ) {
$newGet[$pair[0]] = array( $newGet[$pair[0]] );
}
$newGet[$pair[0]][] = $pair[1];
}
}
$_GET = $newGet;
}


print_r( $_GET );
fixGet();
print_r( $_GET );

?>

outputs:

Array
(
[toppings] => caramel
[order] => Order
)
Array
(
[toppings] => Array
(
[0] => nuts
[1] => fudge
[2] => caramel
)

[order] => Order
)


Yeah, and php://input should be able to handle $_POST, but custom 
functions ftl, the idea of having useless overhead for simple stuff like 
this makes me angry.


aye, at least it is possible to implement / work around quickly in 
userland - not sure if it makes me angry but things like this could be 
implemented easily internally I'm sure - wonder how a change like this 
would affect bc though, last thing you'd want is a tonne of sites 
breaking down because of a change like that - regardless that's not for 
my thought or debate.


btw as pointed out that chunk of code certainly isn't optimised or 
sanity checked for production use, and could easily (+should) be 
improved, but then that's what you get in a quick response on a mailing 
list - something to point you in the right direction and work with.


I do have to point out though that overhead with things like this aren't 
exactly problematic or noticeable - in-fact unless you have a massively 

RE: [PHP] Re: Parsing of forms

2009-05-20 Thread Ford, Mike
On 19 May 2009 17:10, Andrew Ballard advised:

> On Tue, May 19, 2009 at 10:11 AM, Ford, Mike
>  wrote:
>> On 19 May 2009 14:37, Daniele Grillenzoni advised:
>> 
>>> 
>>> My complaint is this: a I can have a select multiple with a normal
name,
>>> which is allowed by every spec, but PHP requires me to use [] in
order
>>> to properly retrieve the values.
>> 
>> I really don't understand the problem with this -- in fact, I find it
>> quite useful to distinguish inputs which may have only 1 value from
>> those which may be multi-valued. And it all depends on what you mean
by
>> a "normal" name, of course -- no current (X)HTML spec disallows [] as
>> part of a name attribute, so in that sense a name containing them
could
>> be seen as perfectly normal...!! ;) ;)
>> 
>> Can you explain why this is such a hang-up for you, as I haven't seen
>> anything in what you've posted so far to convince me it's any kind of
>> problem? 
>> 
>> Cheers!
>> 
>> Mike
>> 
> 
> I can't speak for the OP, but I've always thought it somewhat odd. An
> HTML form should be able to work correctly without modification
> regardless of the language that receives the input. As it is, it makes
> the HTML for a form implementation specific. You might be able to use
> ASP correctly process a form originally targeted toward PHP, but you
> could not similarly take a form designed for ASP and process it with
PHP
> without modification.

Humph! Yes, ok, I concede this point. I also bow to Daniele's need to
process forms designed by someone else with (not-PHP) in mind. Actually,
I can see the validity of both sides of the argument, and I teeter on
the fence as to whether  the [] method is "right" or not!! ;)

>   var toppings = document.sundae.toppings;
> // To work with PHP, the above line would
> have to be changed:
> // var toppings =
> document.sundae.elements['toppings[]'];

Actually, document.sundae['toppings[]'] is sufficient (because it is
defined in JavaScript that a['b'] is always exactly equivalent to a.b).

Cheers!

Mike

 --
Mike Ford,  Electronic Information Developer,
C507, Leeds Metropolitan University, Civic Quarter Campus, 
Woodhouse Lane, LEEDS,  LS1 3HE,  United Kingdom
Email: m.f...@leedsmet.ac.uk
Tel: +44 113 812 4730



To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm

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



RE: [PHP] Forms validation and creation- easier solution?

2009-05-20 Thread Jay Blanchard
[snip]
1.  Easy creation of forms (fields and layout)
[/snip]

I posted a form function several months ago that will help you with
this. Just search the list archives 

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



[PHP] Shopping Cart

2009-05-20 Thread Gary
Not sure this is a direct PHP question, however I know I will get some 
answers here.  I have a customer that I am bidding a small project for. 
They want to be able to accept credit card payments for enrollment into a 
class. Their customer will fill out a form and pay via CC on the site.  Is 
this something that I should just look to the host for whatever shopping 
cart they have or is there an easy to administer software package that I 
should look into. Or since it is a one item cart, is this something that I 
could code?

Thanks for your help.

Gary




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



Re: [PHP] Re: Parsing of forms

2009-05-20 Thread Tom Worster
On 5/20/09 6:50 AM, "Ford, Mike"  wrote:

> Humph! Yes, ok, I concede this point. I also bow to Daniele's need to
> process forms designed by someone else with (not-PHP) in mind. Actually,
> I can see the validity of both sides of the argument, and I teeter on
> the fence as to whether  the [] method is "right" or not!! ;)

think of it this way: as it stands, php requires that php language elements
be placed in html documents.



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



[PHP] path in document root / absolute path

2009-05-20 Thread Felix Siglreithmaier
Hi,

is there a way to check if a path is within the document_root?


and is there a function to check if a path is absolute or not?


thanks

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



Re: [PHP] path in document root / absolute path

2009-05-20 Thread Stuart
2009/5/20 Felix Siglreithmaier :
> is there a way to check if a path is within the document_root?

Compare it to $_SERVER['DOCUMENT_ROOT'].

> and is there a function to check if a path is absolute or not?

http://php.net/realpath

-Stuart

-- 
http://stut.net/

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



[PHP] Shopping Cart

2009-05-20 Thread Gary
Sorry, the first post was put in the wrong place...

Not sure this is a direct PHP question, however I know I will get some
answers here.  I have a customer that I am bidding a small project for.
They want to be able to accept credit card payments for enrollment into a
class. Their customer will fill out a form and pay via CC on the site.  Is
this something that I should just look to the host for whatever shopping
cart they have or is there an easy to administer software package that I
should look into. Or since it is a one item cart, is this something that I
could code?

Thanks for your help.

Gary



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



[PHP] Shopping Cart

2009-05-20 Thread Gary
Sorry, the first two  posts was put in the wrong place...

Not sure this is a direct PHP question, however I know I will get some
answers here.  I have a customer that I am bidding a small project for.
They want to be able to accept credit card payments for enrollment into a
class. Their customer will fill out a form and pay via CC on the site.  Is
this something that I should just look to the host for whatever shopping
cart they have or is there an easy to administer software package that I
should look into. Or since it is a one item cart, is this something that I
could code?

Thanks for your help.

Gary




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



[PHP] Shopping Cart

2009-05-20 Thread Gary
Sorry, the first three post was put in the wrong place...

Not sure this is a direct PHP question, however I know I will get some
answers here.  I have a customer that I am bidding a small project for.
They want to be able to accept credit card payments for enrollment into a
class. Their customer will fill out a form and pay via CC on the site.  Is
this something that I should just look to the host for whatever shopping
cart they have or is there an easy to administer software package that I
should look into. Or since it is a one item cart, is this something that I
could code?

Thanks for your help.

Gary




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



[PHP] Re: Shopping Cart

2009-05-20 Thread Gary
Sorry, I dont know what is going wrong here...this is sopposed to be a new 
subject...



""Gary""  wrote in message 
news:6b.85.16801.e5bf3...@pb1.pair.com...
> Sorry, the first three post was put in the wrong place...
>
> Not sure this is a direct PHP question, however I know I will get some
> answers here.  I have a customer that I am bidding a small project for.
> They want to be able to accept credit card payments for enrollment into a
> class. Their customer will fill out a form and pay via CC on the site.  Is
> this something that I should just look to the host for whatever shopping
> cart they have or is there an easy to administer software package that I
> should look into. Or since it is a one item cart, is this something that I
> could code?
>
> Thanks for your help.
>
> Gary
>
>
> 



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



[PHP] Accepting Credit Card Payments

2009-05-20 Thread Gary
Sorry, the first post were put in the wrong place...

Not sure this is a direct PHP question, however I know I will get some
answers here.  I have a customer that I am bidding a small project for.
They want to be able to accept credit card payments for enrollment into a
class. Their customer will fill out a form and pay via CC on the site.  Is
this something that I should just look to the host for whatever shopping
cart they have or is there an easy to administer software package that I
should look into. Or since it is a one item cart, is this something that I
could code?

Thanks for your help.

Gary




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



RE: [PHP] Shopping Cart

2009-05-20 Thread Bob McConnell
They are all going to the same place, so what is wrong?

To address your question, credit cards are not easy. As soon as you set
up a site to accept them you must conform to a number of security and
interface requirements. If you have never done it before, either hire
someone that knows what they are doing, or hire someone to train you how
to do it. The other option is to find a hosting site that provides both
secure servers and credit card authorization services and put your web
site on their servers.

It took us nearly two years to get certification that our servers and
software comply with all of the relevant PCI standards. We have two
projects that are still being evaluated and don't expect final approval
on them until August. There are four people here that are tasked with
monitoring and managing that process.

Bob McConnell

-Original Message-
From: Gary [mailto:gwp...@ptd.net] 
Sent: Wednesday, May 20, 2009 8:44 AM
To: php-general@lists.php.net
Subject: [PHP] Shopping Cart

Sorry, the first three post was put in the wrong place...

Not sure this is a direct PHP question, however I know I will get some
answers here.  I have a customer that I am bidding a small project for.
They want to be able to accept credit card payments for enrollment into
a
class. Their customer will fill out a form and pay via CC on the site.
Is
this something that I should just look to the host for whatever shopping
cart they have or is there an easy to administer software package that I
should look into. Or since it is a one item cart, is this something that
I
could code?

Thanks for your help.

Gary




-- 
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



Re: [PHP] Re: Shopping Cart

2009-05-20 Thread Stuart
2009/5/20 Gary :
> Sorry, I dont know what is going wrong here...this is sopposed to be a new
> subject...

For the love of $DEITY, give up! ;-)

To answer your question you're probably best looking at what their
chosen CC handler offers. If you needed to track multiple items on the
site then it's worth looking into shopping carts, but if it's always
just gonna be the one then there's no need for a "cart" at all.

-Stuart

-- 
http://stut.net/

> ""Gary""  wrote in message
> news:6b.85.16801.e5bf3...@pb1.pair.com...
>> Sorry, the first three post was put in the wrong place...
>>
>> Not sure this is a direct PHP question, however I know I will get some
>> answers here.  I have a customer that I am bidding a small project for.
>> They want to be able to accept credit card payments for enrollment into a
>> class. Their customer will fill out a form and pay via CC on the site.  Is
>> this something that I should just look to the host for whatever shopping
>> cart they have or is there an easy to administer software package that I
>> should look into. Or since it is a one item cart, is this something that I
>> could code?
>>
>> Thanks for your help.
>>
>> Gary
>>
>>
>>
>
>
>
> --
> 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



[PHP] Re: Accepting Credit Card Payments

2009-05-20 Thread Nathan Rixham

Gary wrote:

Sorry, the first post were put in the wrong place...

Not sure this is a direct PHP question, however I know I will get some
answers here.  I have a customer that I am bidding a small project for.
They want to be able to accept credit card payments for enrollment into a
class. Their customer will fill out a form and pay via CC on the site.  Is
this something that I should just look to the host for whatever shopping
cart they have or is there an easy to administer software package that I
should look into. Or since it is a one item cart, is this something that I
could code?

Thanks for your help.




1: all your posts came through almost identical, you only need to do it 
once then give it a few minutes to come through - it isn't instant


2: some are easy, paypal basically, the rest not so, although if you 
search php classes you may find some api integrations for 3rd parties.


3: if you can't do it don't bid mate, you'll just get headaches, stick 
to something you can do or atleast think you can do - there are plenty 
of people who specialise in things like this and could do it far quicker 
(and possibly cheaper / better) - no offence indented - my honest advise 
is to skip this project and do something else, if you're having to ask 
before you've even got the project you know..


4: all of that is unless you go paypal, a simple paypal buynow button 
would be a piece of cake and just the ticket


regards

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



Re: [PHP] Re: Parsing of forms

2009-05-20 Thread Raymond Irving
Hello,

Here's another quick solution that shouldn't add much overhead:

// get input 
$qry = 
'toppings=sprinkles&toppings=nuts&toppings=fudge&toppings=caramel&toppings=strawberries';
//$qry = $_SERVER['QUERY_STRING'];

// parser input
$qry = str_replace('&toppings=','&toppings[]=',$qry);
parse_str($qry,$get);

print_r($get);


__
Raymond Irving
Create Rich Ajax/PHP Web Apps Today!
Raxan PDI - http://raxanpdi.com/



--- On Wed, 5/20/09, Daniele Grillenzoni  wrote:

Yeah, and php://input should be able to handle $_POST, but custom 
functions ftl, the idea of having useless overhead for simple stuff like 
this makes me angry.




Re: [PHP] Accepting Credit Card Payments

2009-05-20 Thread Richard Heyes
Hi,

> ...

If you're in the US or UK then you could look at using Google Checkout
- it's very easy to setup. Plus your punters (/Customers) may feel a
little better about giving their CC details to a recognized brand like
Google. Or if they're in Switzerland, maybe not... :-/

-- 
Richard Heyes
HTML5 graphing: RGraph (www.rgraph.net)
PHP mail: RMail (www.phpguru.org/rmail)
PHP datagrid: RGrid (www.phpguru.org/rgrid)
PHP Template: RTemplate (www.phpguru.org/rtemplate)
PHP SMTP: http://www.phpguru.org/smtp

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



RE: [PHP] Accepting Credit Card Payments

2009-05-20 Thread HallMarc Websites


-Original Message-
From: Gary [mailto:gwp...@ptd.net] 
Sent: Wednesday, May 20, 2009 8:48 AM
To: php-general@lists.php.net
Subject: [PHP] Accepting Credit Card Payments

Sorry, the first post were put in the wrong place...

Not sure this is a direct PHP question, however I know I will get some
answers here.  I have a customer that I am bidding a small project for.
They want to be able to accept credit card payments for enrollment into a
class. Their customer will fill out a form and pay via CC on the site.  Is
this something that I should just look to the host for whatever shopping
cart they have or is there an easy to administer software package that I
should look into. Or since it is a one item cart, is this something that I
could code?

Thanks for your help.

Gary



Your choices in the US are either use a service like PayPal or to call
around and find a merchant service that will approve an account for this
activity. The second requires transaction records for the past x years or
possibly they may ask for your tax returns for the same period. They also
will want to know what your average monthly sales are using CC's and how
many charge backs you have. Charge backs are bad.  The second MAY be had
through the clients bank and they should start there. Since this is a
virtual product, nothing tangible is being sold, it is considered high risk
and this will limit the companies you can get a merchant account from.

The first requires the client to register with PayPal and to go through
their verification process. PayPal bought Verisign's PayFlow Pro years ago
and as such now offers a more professional option than just the old
standard. 

If the client doesn't have a huge revenue stream yet then PayPal may be
their best bet to get started. 

Once you have settled on the merchant account you then need to determine if
you need an SSL, normally if you are applying for a "regular" merchant
account they will want to see an active SSL on the site they are approving
the account for BEFORE they approve you.

Lastly, even though I find PCI compliance to be just this side of worthless,
you still should look into it and do your best to make sure the site will at
least pass the test. Let me clarify my negative statement by saying that
everything that is required in the PCI compliance and DSS I was already
doing as a matter of what I considered to be common sense. 

Marc Hall 


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


__ Information from ESET Smart Security, version of virus signature
database 4089 (20090519) __

The message was checked by ESET Smart Security.

http://www.eset.com




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



Re: [PHP] Accepting Credit Card Payments

2009-05-20 Thread tedd

At 8:48 AM -0400 5/20/09, Gary wrote:

Sorry, the first post were put in the wrong place...

Not sure this is a direct PHP question, however I know I will get some
answers here.  I have a customer that I am bidding a small project for.
They want to be able to accept credit card payments for enrollment into a
class. Their customer will fill out a form and pay via CC on the site.  Is
this something that I should just look to the host for whatever shopping
cart they have or is there an easy to administer software package that I
should look into. Or since it is a one item cart, is this something that I
could code?

Thanks for your help.

Gary


Gary:

Are they wanting to collect the credit card information and then 
process that data in their shop OR are do they want the complete 
transaction to be completed online?


In both cases you should have your script(s) work in the https directory.

If they want to process the cc information themselves in their shop, 
then that information has to be provided to them in some secure 
fashion. If they want to use email, then that's a problem because 
email is not secure. You will have to work out a way for them to log 
on to a secure area and review the cc information themselves -- this 
is a clumsy way to do things.


The more acceptable approach is to use a credit card clearing company 
like PayPal.com. They have different types of merchant accounts which 
offer different types of processing and features and fees. Go to 
PayPal.com and check it out.


Basically there are two types of collection systems. [1] One where 
you direct the user to PayPal with the item(s) they want to purchase 
and then PayPal does everything (i.e., collects the cc information 
and approves the transaction -- the simplest); [2] Two, where you 
collect all the information and then contact PayPal for authorization 
(the more complex). While [1] is simpler [2] allows you to have full 
control over the user -- IOW, they never leave your site.


In both cases, after the user has been approved, you are notified of 
the purchase, you are are credited with the purchase AND the user is 
[1] or [2] should be directed to a "Thank you" page.


While customers like to say "This is a small project" it really isn't 
and does come with an element of liability on your part. For example, 
if you somehow make user cc information public, then you have 
big-time problems. That's something you should consider in your 
bidding.


Good luck,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



[PHP] Re: Accepting Credit Card Payments

2009-05-20 Thread Nathan Rixham

Nathan Rixham wrote:
4: all of that is unless you go paypal, a simple paypal buynow button 
would be a piece of cake and just the ticket


also as mentioned google checkout - or you could go with e-junkie.com 
who offer a cart with either paypal or google checkout and its a nice 
robust solution that's easy to implement even without coding skills


regards

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



RE: [PHP] Accepting Credit Card Payments

2009-05-20 Thread HallMarc Websites


-Original Message-
From: tedd [mailto:tedd.sperl...@gmail.com] 
Sent: Wednesday, May 20, 2009 9:28 AM
To: Gary; php-general@lists.php.net
Subject: Re: [PHP] Accepting Credit Card Payments

At 8:48 AM -0400 5/20/09, Gary wrote:
>Sorry, the first post were put in the wrong place...
>
>Not sure this is a direct PHP question, however I know I will get some
>answers here.  I have a customer that I am bidding a small project for.
>They want to be able to accept credit card payments for enrollment into a
>class. Their customer will fill out a form and pay via CC on the site.  Is
>this something that I should just look to the host for whatever shopping
>cart they have or is there an easy to administer software package that I
>should look into. Or since it is a one item cart, is this something that I
>could code?
>
>Thanks for your help.
>
>Gary

Gary:

Are they wanting to collect the credit card information and then 
process that data in their shop OR are do they want the complete 
transaction to be completed online?

In both cases you should have your script(s) work in the https directory.

If they want to process the cc information themselves in their shop, 
then that information has to be provided to them in some secure 
fashion. If they want to use email, then that's a problem because 
email is not secure. You will have to work out a way for them to log 
on to a secure area and review the cc information themselves -- this 
is a clumsy way to do things.

The more acceptable approach is to use a credit card clearing company 
like PayPal.com. They have different types of merchant accounts which 
offer different types of processing and features and fees. Go to 
PayPal.com and check it out.

Basically there are two types of collection systems. [1] One where 
you direct the user to PayPal with the item(s) they want to purchase 
and then PayPal does everything (i.e., collects the cc information 
and approves the transaction -- the simplest); [2] Two, where you 
collect all the information and then contact PayPal for authorization 
(the more complex). While [1] is simpler [2] allows you to have full 
control over the user -- IOW, they never leave your site.

In both cases, after the user has been approved, you are notified of 
the purchase, you are are credited with the purchase AND the user is 
[1] or [2] should be directed to a "Thank you" page.

While customers like to say "This is a small project" it really isn't 
and does come with an element of liability on your part. For example, 
if you somehow make user cc information public, then you have 
big-time problems. That's something you should consider in your 
bidding.

Good luck,

tedd

-- 
---
http://sperling.com  http://ancientstones.com  http://earthstones.com



Amending my previous reply, I have to agree with those that recommend you
hand this over to someone that has experience doing this. I oversimplified
the process I feel due to the fact that I have done this so many times, I
even helped debug a few premade API's, it is second nature to me. 

Before you decide to dive into this yourself, consider this: you are asking
normal folks to trust that you will protect their CC and personal
information in you and your client. When they commit to making the payment
they trust their info won't be subject to identity theft and/or CC fraud.

Also, I know what you mean about getting your servers certified. It is a
lengthy process. 


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


__ Information from ESET Smart Security, version of virus signature
database 4091 (20090520) __

The message was checked by ESET Smart Security.

http://www.eset.com




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



Re: [PHP] Shopping Cart

2009-05-20 Thread Lists

Bob McConnell wrote:

They are all going to the same place, so what is wrong?

To address your question, credit cards are not easy. As soon as you set
up a site to accept them you must conform to a number of security and
interface requirements. If you have never done it before, either hire
someone that knows what they are doing, or hire someone to train you how
to do it. The other option is to find a hosting site that provides both
secure servers and credit card authorization services and put your web
site on their servers.

It took us nearly two years to get certification that our servers and
software comply with all of the relevant PCI standards. We have two
projects that are still being evaluated and don't expect final approval
on them until August. There are four people here that are tasked with
monitoring and managing that process.

Bob McConnell




Holy duplicates batman. ;-)

Just some comments regarding 'Shopping Carts' and commerce, and it
being 'scary' :-).

I agree that this is ideally a realm for professionals and maybe
even a realm for niche professionals in many cases.
However, there are 'levels'.
When I hear people say that e-commerce requires multiple
people in multiple rolls, and is 'brain surgery' (as tedd said),
I have to disagree in some respect. I just don't think it is
unattainable for a new passionate developer/WebSite owner
to take on the goal of commerce.

As tedd mentioned, there are canned PHP solutions that may
make a good first effort. In fact, we have a canned product
(not PHP, but WebDNA) that a new user need only spend an
afternoon using a 'Wizzard' of sorts that both creates a site,
and takes care of connecting to your Merchant Account/Payment Gateway to 
take payments. One afternoon! I'm sure there are similar PHP apps.


Just my ¢.02

Donovan




--
  =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o
  D. BROOKE   EUCA Design Center
   WebDNA Software Corp.
  WEB:> http://www.euca.us  |   http://www.webdna.us
  =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o
  WebDNA: [** Square Bracket Utopia **]

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



Re: [PHP] Forms validation and creation- easier solution?

2009-05-20 Thread Paul M Foster
On Wed, May 20, 2009 at 10:08:12AM +0300, Olexandr Heneralov wrote:

> 
> 2009/5/20 Angelo Zanetti 
> 
> > Hi all.
> >
> > We have done quite a few projects and we are looking to find better ways to
> > implementing forms.
> >
> > Forms seem to be quite time consuming and repetitive.
> >
> > Generally are there any classes or libraries that will assist with:
> >
> > 1.  Easy creation of forms (fields and layout)
> >
> > 2. Validation of specific fields within the forms (server side not JS)
> >
> > 3. Decrease in time required to setup the forms pages
> > any other comments are welcome.
> >
> Hi!
> Zend framework has a wonderful solution to solve this task. You can download
> even the demo showing how to do this task
> Best regards,
> Alex.

Both this class and Manuel Lemos' form generation class (from
phpclasses.org) will create beautiful forms for you. However, you may
find that the amount of [repetitive] typing you do will be equivalent or
greater than simply creating the form by hand.

The best solution would probably be a form you fill out which asks you
about all the fields you want, and then generates the code to paint the
form. There are commercial solutions which do this, and some (not that
great) free solutions. I'm working on one myself, which will eventually
be a sourceforge/freshmeat project.

Paul

-- 
Paul M. Foster

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



RE: [PHP] Forms validation and creation- easier solution?

2009-05-20 Thread Angelo Zanetti


-Original Message-
From: Paul M Foster [mailto:pa...@quillandmouse.com] 
Sent: 20 May 2009 16:09
To: php-general@lists.php.net
Subject: Re: [PHP] Forms validation and creation- easier solution?

On Wed, May 20, 2009 at 10:08:12AM +0300, Olexandr Heneralov wrote:

> 
> 2009/5/20 Angelo Zanetti 
> 
> > Hi all.
> >
> > We have done quite a few projects and we are looking to find better ways
to
> > implementing forms.
> >
> > Forms seem to be quite time consuming and repetitive.
> >
> > Generally are there any classes or libraries that will assist with:
> >
> > 1.  Easy creation of forms (fields and layout)
> >
> > 2. Validation of specific fields within the forms (server side not JS)
> >
> > 3. Decrease in time required to setup the forms pages
> > any other comments are welcome.
> >
> Hi!
> Zend framework has a wonderful solution to solve this task. You can
download
> even the demo showing how to do this task
> Best regards,
> Alex.

Both this class and Manuel Lemos' form generation class (from
phpclasses.org) will create beautiful forms for you. However, you may
find that the amount of [repetitive] typing you do will be equivalent or
greater than simply creating the form by hand.

The best solution would probably be a form you fill out which asks you
about all the fields you want, and then generates the code to paint the
form. There are commercial solutions which do this, and some (not that
great) free solutions. I'm working on one myself, which will eventually
be a sourceforge/freshmeat project.

Hi Paul.

This sounds Great. Thanks for the advise. Just as a matter of interest do
you know the location / path to Jay's class? I tried searching the archives
but couldn't find it/

Thanks
Angelo



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



Re: [PHP] Forms validation and creation- easier solution?

2009-05-20 Thread Paul M Foster
On Wed, May 20, 2009 at 05:10:57PM +0200, Angelo Zanetti wrote:

> 
> 
> -Original Message-
> From: Paul M Foster [mailto:pa...@quillandmouse.com]
> Sent: 20 May 2009 16:09
> To: php-general@lists.php.net
> Subject: Re: [PHP] Forms validation and creation- easier solution?
> 
> On Wed, May 20, 2009 at 10:08:12AM +0300, Olexandr Heneralov wrote:
> 
> >
> > 2009/5/20 Angelo Zanetti 
> >
> > > Hi all.
> > >
> > > We have done quite a few projects and we are looking to find better ways
> to
> > > implementing forms.
> > >
> > > Forms seem to be quite time consuming and repetitive.
> > >
> > > Generally are there any classes or libraries that will assist with:
> > >
> > > 1.  Easy creation of forms (fields and layout)
> > >
> > > 2. Validation of specific fields within the forms (server side not JS)
> > >
> > > 3. Decrease in time required to setup the forms pages
> > > any other comments are welcome.
> > >
> > Hi!
> > Zend framework has a wonderful solution to solve this task. You can
> download
> > even the demo showing how to do this task
> > Best regards,
> > Alex.
> 
> Both this class and Manuel Lemos' form generation class (from
> phpclasses.org) will create beautiful forms for you. However, you may
> find that the amount of [repetitive] typing you do will be equivalent or
> greater than simply creating the form by hand.
> 
> The best solution would probably be a form you fill out which asks you
> about all the fields you want, and then generates the code to paint the
> form. There are commercial solutions which do this, and some (not that
> great) free solutions. I'm working on one myself, which will eventually
> be a sourceforge/freshmeat project.
> 
> Hi Paul.
> 
> This sounds Great. Thanks for the advise. Just as a matter of interest do
> you know the location / path to Jay's class? I tried searching the archives
> but couldn't find it/
> 
> Thanks
> Angelo
> 

You can search the archives by author, but I found it here:

http://marc.info/?l=php-general&m=123003593813003&w=2

Paul

-- 
Paul M. Foster

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



Re: [PHP] PHP Print, PDF (w/FPDF), JavaScript

2009-05-20 Thread Dan Shirah
>
>  I can't find anything like this in FPDF 1.53 or in the documentation for
> version 1.60. I'd be interested if you can pinpoint it.
>
> Paul
>

Sorry, you need to load a class extension, see the website below:

http://www.fpdf.de/downloads/addons/36/


Re: [PHP] PHP Print, PDF (w/FPDF), JavaScript

2009-05-20 Thread Paul M Foster
On Wed, May 20, 2009 at 11:31:49AM -0400, Dan Shirah wrote:

> >
> >  > How can I click a button using JavaScript print function and have it
> > > generate a PDF with FPDF and get the PDF printed automagically? It seems
> > > I have done this before but I cannot recall what I did.
> > >
> > > TVMIA!
> >
> If I remember correctly there is an FPDF command **autoprint()** you can put
> in at the end of your output to automatically bring up the print
> dialog...BUT, if you have Adobe Reader 7.0 or newer, you will ALWAYS get a
> popup security message from Adobe about the application trying to
> automatically print.
> 
> >From the searches I did, you cannot disable or bypass this warning
> notification.

I can't find anything like this in FPDF 1.53 or in the documentation for
version 1.60. I'd be interested if you can pinpoint it.

Paul

-- 
Paul M. Foster

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



Re: [PHP] Re: Parsing of forms

2009-05-20 Thread Andrew Ballard
On Wed, May 20, 2009 at 6:50 AM, Ford, Mike  wrote:
> On 19 May 2009 17:10, Andrew Ballard advised:
>>               var toppings = document.sundae.toppings;
>>                 // To work with PHP, the above line would
>> have to be changed:
>>                 // var toppings =
>> document.sundae.elements['toppings[]'];
>
> Actually, document.sundae['toppings[]'] is sufficient (because it is
> defined in JavaScript that a['b'] is always exactly equivalent to a.b).
>
> Cheers!
>
> Mike
>

True enough. I suppose it makes sense to just use the JavaScript array
notation syntax for accessing form elements all the time and not worry
about it any more.

I'll admit that when I first learned PHP3, it even seemed cool that
you could add elements to arrays (even nested or multi-dimensional
arrays) automatically by placing the appropriate square brackets in
the field name. At the time, having the language automatically create
variables for each of my form fields compared with what I had to do in
PERL seemed pretty cool too. ;-) I just thought it ridiculous the
first time I migrated a simple form processing script from PERL to PHP
that I had to change the HTML and the related JavaScript to be
compatible with PHP.

Andrew

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



Re: [PHP] Re: Parsing of forms

2009-05-20 Thread Daniele Grillenzoni

On 20/05/2009 12.50, Ford, Mike wrote:

Humph! Yes, ok, I concede this point. I also bow to Daniele's need to
process forms designed by someone else with (not-PHP) in mind. Actually,
I can see the validity of both sides of the argument, and I teeter on
the fence as to whether  the [] method is "right" or not!! ;)



Teeter not, as I am not pushing for a retool of how $_POST and $_GET 
work, just maybe a new core function/global array that gets me the 
"pure" alternative.


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



Re: [PHP] Really basic PHP questions -- newbie here!

2009-05-20 Thread Paul M Foster
On Wed, May 20, 2009 at 10:45:07AM -0500, Ellen Heitman wrote:

> Hello! I would really appreciate some answers to a few basic questions. I
> have done some research online, but it would greatly help me to get direct
> answers.
> 1. If my site needs to be available to many browsers, including those that
> may not be entirely up-to-date, is PHP a safe option? I mean, I know that
> Flash is something people have to have enabled on their browsers, but I
> thought I read that PHP is available to all recent browsers as long as the
> server the site is hosted on supports PHP. Is this true?

PHP is *server-side* technology, so the browser doesn't matter. The web
server interprets the PHP and sends the result to the browser. That's
why, when you do "Show Page Source" or "Display Page Source" on a PHP
page, you won't see any PHP code, even if it's there.

> 
> 2. How can I preview my PHP while I'm coding? I'm using TextWrangler. I have
> already followed the installation tutorial here:
> http://foundationphp.com/tutorials/php_leopard.php. The test PHP file does
> work in my Safari browser. However, when I try to preview my .php files
> created in TextWrangler with Safari it doesn't work.

TextWrangler is a text *editor*, not a PHP *executor*. The tutorial you
mentioned just sets up your computer so that the Apache web server on it
recognizes PHP code, so as to interpret it.

If you're creating PHP files with TextWrangler, and they're not
displaying properly in Safari, there are a variety of reasons. Are you
putting the files in the right place, according to the tutorial? Are the
permissions on the file correct? Are you putting anything in the files
which would actually echo to the screen? When you say "it doesn't work",
what exactly do you mean?


> 
> 3. I need something that functions as an iframe. I've been reading that
> include() serves this purpose. However, I've found that I have the make the
> content in the "iframe" the main content and call the things around it. I
> want to do the reverse. I want the other content on the main html page in
> place, and just want to call the text in the frame box. Is this doable?

Frames are a creature of HTML, not PHP. So setting this up is as easy as
configuring your HTML page properly. PHP is generally interspersed with
HTML to do the things that PHP can do and HTML can't.

Your questions indicate you don't understand how PHP works, and the way
PHP integrates with HTML. If you don't have a background in programming
in general, you've got quite a bit of work in front of you. I'd suggest
perusing the shelves of the best bookstore in your area for a PHP book
suitable for your level of understanding.

Paul

-- 
Paul M. Foster

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



Re: [PHP] Really basic PHP questions -- newbie here!

2009-05-20 Thread Lists

Ellen Heitman wrote:

Hello! I would really appreciate some answers to a few basic questions. I
have done some research online, but it would greatly help me to get direct
answers.
1. If my site needs to be available to many browsers, including those that
may not be entirely up-to-date, is PHP a safe option? I mean, I know that
Flash is something people have to have enabled on their browsers, but I
thought I read that PHP is available to all recent browsers as long as the
server the site is hosted on supports PHP. Is this true?

2. How can I preview my PHP while I'm coding? I'm using TextWrangler. I have
already followed the installation tutorial here:
http://foundationphp.com/tutorials/php_leopard.php. The test PHP file does
work in my Safari browser. However, when I try to preview my .php files
created in TextWrangler with Safari it doesn't work.

3. I need something that functions as an iframe. I've been reading that
include() serves this purpose. However, I've found that I have the make the
content in the "iframe" the main content and call the things around it. I
want to do the reverse. I want the other content on the main html page in
place, and just want to call the text in the frame box. Is this doable?

Any suggestions?

Thanks!



Oh my. :-)

Ellen, respectfully, maybe it is best if you take a class of
some sort?  I think that would give you a great start on
how client-side vs. server-side, and Web Development in general
works. Do have that kind of resource in your area?

Donovan



--
  =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o
  D. BROOKE   EUCA Design Center
   WebDNA Software Corp.
  WEB:> http://www.euca.us  |   http://www.webdna.us
  =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o
  WebDNA: [** Square Bracket Utopia **]

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



Re: [PHP] PHP Print, PDF (w/FPDF), JavaScript

2009-05-20 Thread Dan Shirah
>
>  > How can I click a button using JavaScript print function and have it
> > generate a PDF with FPDF and get the PDF printed automagically? It seems
> > I have done this before but I cannot recall what I did.
> >
> > TVMIA!
>
If I remember correctly there is an FPDF command **autoprint()** you can put
in at the end of your output to automatically bring up the print
dialog...BUT, if you have Adobe Reader 7.0 or newer, you will ALWAYS get a
popup security message from Adobe about the application trying to
automatically print.

>From the searches I did, you cannot disable or bypass this warning
notification.

HTH

Dan


[PHP] Really basic PHP questions -- newbie here!

2009-05-20 Thread Ellen Heitman
Hello! I would really appreciate some answers to a few basic questions. I
have done some research online, but it would greatly help me to get direct
answers.
1. If my site needs to be available to many browsers, including those that
may not be entirely up-to-date, is PHP a safe option? I mean, I know that
Flash is something people have to have enabled on their browsers, but I
thought I read that PHP is available to all recent browsers as long as the
server the site is hosted on supports PHP. Is this true?

2. How can I preview my PHP while I'm coding? I'm using TextWrangler. I have
already followed the installation tutorial here:
http://foundationphp.com/tutorials/php_leopard.php. The test PHP file does
work in my Safari browser. However, when I try to preview my .php files
created in TextWrangler with Safari it doesn't work.

3. I need something that functions as an iframe. I've been reading that
include() serves this purpose. However, I've found that I have the make the
content in the "iframe" the main content and call the things around it. I
want to do the reverse. I want the other content on the main html page in
place, and just want to call the text in the frame box. Is this doable?

Any suggestions?

Thanks!


Re: [PHP] Really basic PHP questions -- newbie here!

2009-05-20 Thread Raymond Irving
Hello Ellen,

I can see that you're new to PHP. You might want to check out this link to get 
some more information on how PHP works and what you need to get started:

http://www.php.net/getting-started
See also http://www.dailybits.com/getting-started-with-php-part-1-hello-world/

__
Raymond Irving
Create Rich Ajax/PHP Web Apps Today!
Raxan PDI - http://raxanpdi.com/



--- On Wed, 5/20/09, Ellen Heitman  wrote:

From: Ellen Heitman 
Subject: [PHP] Really basic PHP questions -- newbie here!
To: php-general@lists.php.net
Date: Wednesday, May 20, 2009, 11:45 AM

Hello! I would really appreciate some answers to a few basic questions. I
have done some research online, but it would greatly help me to get direct
answers.
1. If my site needs to be available to many browsers, including those that
may not be entirely up-to-date, is PHP a safe option? I mean, I know that
Flash is something people have to have enabled on their browsers, but I
thought I read that PHP is available to all recent browsers as long as the
server the site is hosted on supports PHP. Is this true?

2. How can I preview my PHP while I'm coding? I'm using TextWrangler. I have
already followed the installation tutorial here:
http://foundationphp.com/tutorials/php_leopard.php. The test PHP file does
work in my Safari browser. However, when I try to preview my .php files
created in TextWrangler with Safari it doesn't work.

3. I need something that functions as an iframe. I've been reading that
include() serves this purpose. However, I've found that I have the make the
content in the "iframe" the main content and call the things around it. I
want to do the reverse. I want the other content on the main html page in
place, and just want to call the text in the frame box. Is this doable?

Any suggestions?

Thanks!


Re: [PHP] Really basic PHP questions -- newbie here!

2009-05-20 Thread Lenin
If not following some classes. I'd suggest Ellen to watch the videos for a
quick overview from NETTUTS and KillerPHP.

www.killerphp.com also google for some vidoes.

And you need to understand the facts of  ServerSide, ClientSide, HTML,
WebServer, Permission of Files etc.


[PHP] product listing columns

2009-05-20 Thread PJ
I am about to bust my donkey again trying to set up a dynamic product
listing for a web page using mysql, php & CSS (the donkey ride).
What better place to ask than here in guru heaven:
1. What's a good list/forum to ask for help on CSS - it just is too
illogical.
2. With mysql, is the best way to populate list columns with ul and li
or would just a simple column work fine? I have done this with a left
navigation column and could repeat such columns next to each other with
the final column with input fields for quantities ordered. Background
could just be an image to fill the container div.
Does that sound about right?
Thanks for any suggestions.

-- 
Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
-
Phil Jourdan --- p...@ptahhotep.com
   http://www.ptahhotep.com
   http://www.chiccantine.com/andypantry.php


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



[PHP] product listing columns

2009-05-20 Thread PJ
Forgot: you can get an idea of what I'm trying to do at
http://www.chiccantine.com/preview.html
-- 
Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
-
Phil Jourdan --- p...@ptahhotep.com
   http://www.ptahhotep.com
   http://www.chiccantine.com/andypantry.php



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



Re: [PHP] product listing columns

2009-05-20 Thread Ashley Sheridan
On Wed, 2009-05-20 at 17:47 -0400, PJ wrote:
> Forgot: you can get an idea of what I'm trying to do at
> http://www.chiccantine.com/preview.html
> -- 
> Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
> -
> Phil Jourdan --- p...@ptahhotep.com
>http://www.ptahhotep.com
>http://www.chiccantine.com/andypantry.php
> 
> 
> 
The link you gave doesn't exist online, I'm getting a 404. What do you
mean by a list in columns? Do you want a mysql select to be output as
several columns of data, or one column per select?


Ash
www.ashleysheridan.co.uk


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



Re: [PHP] product listing columns

2009-05-20 Thread Stephen

PJ wrote:

I am about to bust my donkey again trying to set up a dynamic product
listing for a web page using mysql, php & CSS (the donkey ride).
What better place to ask than here in guru heaven:
1. What's a good list/forum to ask for help on CSS - it just is too
illogical.
  
I suggest you take a look at sitepoint.com, for all aspects of web 
building and design.

2. With mysql, is the best way to populate list columns with ul and li
or would just a simple column work fine? I have done this with a left
navigation column and could repeat such columns next to each other with
the final column with input fields for quantities ordered. Background
could just be an image to fill the container div.
Does that sound about right?
Thanks for any suggestions.
  
It seems to me that you are actually building a table and should use 
html tables. With css for the

layout and formatting, of course. :)


Stephen

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



Re: [PHP] product listing columns

2009-05-20 Thread PJ
Ashley Sheridan wrote:
> On Wed, 2009-05-20 at 17:47 -0400, PJ wrote:
>   
>> Forgot: you can get an idea of what I'm trying to do at
>> http://www.chiccantine.com/preview.html
>> -- 
>> Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
>> -
>> Phil Jourdan --- p...@ptahhotep.com
>>http://www.ptahhotep.com
>>http://www.chiccantine.com/andypantry.php
>>
>>
>>
>> 
> The link you gave doesn't exist online, I'm getting a 404. What do you
> mean by a list in columns? Do you want a mysql select to be output as
> several columns of data, or one column per select?
>   
:-[  sorry bout that... should have checked - was working with my mouth
& not my brain.

It works now. I forgot to upload.
hadn't thought about how many columns per select... ???

-- 
Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
-
Phil Jourdan --- p...@ptahhotep.com
   http://www.ptahhotep.com
   http://www.chiccantine.com/andypantry.php


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



Re: [PHP] product listing columns

2009-05-20 Thread PJ
Stephen wrote:
> PJ wrote:
>> I am about to bust my donkey again trying to set up a dynamic product
>> listing for a web page using mysql, php & CSS (the donkey ride).
>> What better place to ask than here in guru heaven:
>> 1. What's a good list/forum to ask for help on CSS - it just is too
>> illogical.
>>   
> I suggest you take a look at sitepoint.com, for all aspects of web
> building and design.
Oh, I stumble across it from time to time... but I've got a rather large
collection of bookmarks to looks for help. Thanks for that.
>> 2. With mysql, is the best way to populate list columns with ul and li
>> or would just a simple column work fine? I have done this with a left
>> navigation column and could repeat such columns next to each other with
>> the final column with input fields for quantities ordered. Background
>> could just be an image to fill the container div.
>> Does that sound about right?
>> Thanks for any suggestions.
>>   
> It seems to me that you are actually building a table and should use
> html tables. With css for the
> layout and formatting, of course. :)
Well, I just read most of the debate on css & tables... and I think it
can be done.  I am already stumbling on some design issues which are
absolutely ridiculous in css... for example, I haven't understood or
figured out why a  refuses to shrink the bottom
boundary no matter what directions it is given without any apparent
reason.  I have checkd inheritance, !important, nesting, clear, inline,
etc. and nothing does it. But I have already filled columns from mysql
wich css and it looks and works just fine.
Besides, it's a challenge. ;-)
>
>
> Stephen
>


-- 
Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
-
Phil Jourdan --- p...@ptahhotep.com
   http://www.ptahhotep.com
   http://www.chiccantine.com/andypantry.php


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



Re: [PHP] product listing columns

2009-05-20 Thread Ashley Sheridan
On Wed, 2009-05-20 at 19:20 -0400, PJ wrote:
> Ashley Sheridan wrote:
> > On Wed, 2009-05-20 at 17:47 -0400, PJ wrote:
> >   
> >> Forgot: you can get an idea of what I'm trying to do at
> >> http://www.chiccantine.com/preview.html
> >> -- 
> >> Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
> >> -
> >> Phil Jourdan --- p...@ptahhotep.com
> >>http://www.ptahhotep.com
> >>http://www.chiccantine.com/andypantry.php
> >>
> >>
> >>
> >> 
> > The link you gave doesn't exist online, I'm getting a 404. What do you
> > mean by a list in columns? Do you want a mysql select to be output as
> > several columns of data, or one column per select?
> >   
> :-[  sorry bout that... should have checked - was working with my mouth
> & not my brain.
> 
> It works now. I forgot to upload.
> hadn't thought about how many columns per select... ???
> 
> -- 
> Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
> -
> Phil Jourdan --- p...@ptahhotep.com
>http://www.ptahhotep.com
>http://www.chiccantine.com/andypantry.php
> 
> 
So you want the sql select to be dumped into a table as it exists in the
database?

There is  a simple way to do this, if you know which fields are in your
table, and that is just to use a while loop to iterate your records, and
then explicitly output each field as you want it. This is the preferred
way, and how I'd do it if I were you.

print '';
// put column headers here
$query = "query here";
$result = mysql_query($query);
while($row = mysql_fetch_array($result))
{
print  '';
print "{$row['field1'])";
print "{$row['field2'])";
print "{$row['field3'])";
// etc
print '';
}
print '';


Ash
www.ashleysheridan.co.uk


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



Re: [PHP] product listing columns

2009-05-20 Thread Michael A. Peters

PJ wrote:

I am about to bust my donkey again trying to set up a dynamic product
listing for a web page using mysql, php & CSS (the donkey ride).
What better place to ask than here in guru heaven:
1. What's a good list/forum to ask for help on CSS - it just is too
illogical.


I don't think I've ever asked anything here, but I've found answers via 
google at http://forums.devshed.com/css-help-116/ quite often.


I don't do a lot with CSS though.


2. With mysql, is the best way to populate list columns with ul and li
or would just a simple column work fine? I have done this with a left
navigation column and could repeat such columns next to each other with
the final column with input fields for quantities ordered. Background
could just be an image to fill the container div.
Does that sound about right?
Thanks for any suggestions.



For navigation columns I always use a list.
You can do some need stuff with list via CSS to make either a top - down 
navigation bar or a horizontal navigation bar - and they still work well 
in non-graphical browsers, where they simply display as a list.


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



Re: [PHP] product listing columns

2009-05-20 Thread PJ
Ashley Sheridan wrote:
> On Wed, 2009-05-20 at 19:20 -0400, PJ wrote:
>   
>> Ashley Sheridan wrote:
>> 
>>> On Wed, 2009-05-20 at 17:47 -0400, PJ wrote:
>>>   
>>>   
 Forgot: you can get an idea of what I'm trying to do at
 http://www.chiccantine.com/preview.html
 -- 
 Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
 -
 Phil Jourdan --- p...@ptahhotep.com
http://www.ptahhotep.com
http://www.chiccantine.com/andypantry.php



 
 
>>> The link you gave doesn't exist online, I'm getting a 404. What do you
>>> mean by a list in columns? Do you want a mysql select to be output as
>>> several columns of data, or one column per select?
>>>   
>>>   
>> :-[  sorry bout that... should have checked - was working with my mouth
>> & not my brain.
>>
>> It works now. I forgot to upload.
>> hadn't thought about how many columns per select... ???
>>
>> -- 
>> Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
>> -
>> Phil Jourdan --- p...@ptahhotep.com
>>http://www.ptahhotep.com
>>http://www.chiccantine.com/andypantry.php
>>
>>
>> 
> So you want the sql select to be dumped into a table as it exists in the
> database?
>
> There is  a simple way to do this, if you know which fields are in your
> table, and that is just to use a while loop to iterate your records, and
> then explicitly output each field as you want it. This is the preferred
> way, and how I'd do it if I were you.
>
> print '';
> // put column headers here
> $query = "query here";
> $result = mysql_query($query);
> while($row = mysql_fetch_array($result))
> {
> print  '';
> print "{$row['field1'])";
> print "{$row['field2'])";
> print "{$row['field3'])";
> // etc
> print '';
> }
> print '';
>
>   
Thanks, Ashley,
So, you're advocating using tables...
I thought it might be interesting to do the columns with  inline
and then populate them with the query results. It worked marvellously
for the navigation layout and I was able to add background and color to
the product page, regardless which product page we're showing. Quite
neat, really, and very simple. Anyway, I'm going to try.
I must be nuts or something like glutton for punishment, but when you
get it working, it's quite a satisfaction. :-) Thanks again.

-- 
Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
-
Phil Jourdan --- p...@ptahhotep.com
   http://www.ptahhotep.com
   http://www.chiccantine.com/andypantry.php


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



Re: [PHP] product listing columns

2009-05-20 Thread PJ
Michael A. Peters wrote:
> PJ wrote:
>> I am about to bust my donkey again trying to set up a dynamic product
>> listing for a web page using mysql, php & CSS (the donkey ride).
>> What better place to ask than here in guru heaven:
>> 1. What's a good list/forum to ask for help on CSS - it just is too
>> illogical.
>
> I don't think I've ever asked anything here, but I've found answers
> via google at http://forums.devshed.com/css-help-116/ quite often.
>
> I don't do a lot with CSS though.
>
>> 2. With mysql, is the best way to populate list columns with ul and li
>> or would just a simple column work fine? I have done this with a left
>> navigation column and could repeat such columns next to each other with
>> the final column with input fields for quantities ordered. Background
>> could just be an image to fill the container div.
>> Does that sound about right?
>> Thanks for any suggestions.
>>
>
> For navigation columns I always use a list.
> You can do some need stuff with list via CSS to make either a top -
> down navigation bar or a horizontal navigation bar - and they still
> work well in non-graphical browsers, where they simply display as a list.
>
Hmmm I first thought of using the ul & li stuff... but I'm not sure
it will populate from a query too easily... ?? especially as I am rather
determined to try for a css approach.

-- 
Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
-
Phil Jourdan --- p...@ptahhotep.com
   http://www.ptahhotep.com
   http://www.chiccantine.com/andypantry.php


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



Re: [PHP] product listing columns

2009-05-20 Thread Michael A. Peters

PJ wrote:

Michael A. Peters wrote:

PJ wrote:

I am about to bust my donkey again trying to set up a dynamic product
listing for a web page using mysql, php & CSS (the donkey ride).
What better place to ask than here in guru heaven:
1. What's a good list/forum to ask for help on CSS - it just is too
illogical.

I don't think I've ever asked anything here, but I've found answers
via google at http://forums.devshed.com/css-help-116/ quite often.

I don't do a lot with CSS though.


2. With mysql, is the best way to populate list columns with ul and li
or would just a simple column work fine? I have done this with a left
navigation column and could repeat such columns next to each other with
the final column with input fields for quantities ordered. Background
could just be an image to fill the container div.
Does that sound about right?
Thanks for any suggestions.


For navigation columns I always use a list.
You can do some need stuff with list via CSS to make either a top -
down navigation bar or a horizontal navigation bar - and they still
work well in non-graphical browsers, where they simply display as a list.


Hmmm I first thought of using the ul & li stuff... but I'm not sure
it will populate from a query too easily... ?? especially as I am rather
determined to try for a css approach.





?>


You can style a list with css. And the list still displays nicely in non 
graphical browsers that ignore style.


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



Re: [PHP] product listing columns

2009-05-20 Thread Ashley Sheridan
On Wed, 2009-05-20 at 20:23 -0400, PJ wrote:
> Ashley Sheridan wrote:
> > On Wed, 2009-05-20 at 19:20 -0400, PJ wrote:
> >   
> >> Ashley Sheridan wrote:
> >> 
> >>> On Wed, 2009-05-20 at 17:47 -0400, PJ wrote:
> >>>   
> >>>   
>  Forgot: you can get an idea of what I'm trying to do at
>  http://www.chiccantine.com/preview.html
>  -- 
>  Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
>  -
>  Phil Jourdan --- p...@ptahhotep.com
> http://www.ptahhotep.com
> http://www.chiccantine.com/andypantry.php
> 
> 
> 
>  
>  
> >>> The link you gave doesn't exist online, I'm getting a 404. What do you
> >>> mean by a list in columns? Do you want a mysql select to be output as
> >>> several columns of data, or one column per select?
> >>>   
> >>>   
> >> :-[  sorry bout that... should have checked - was working with my mouth
> >> & not my brain.
> >>
> >> It works now. I forgot to upload.
> >> hadn't thought about how many columns per select... ???
> >>
> >> -- 
> >> Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
> >> -
> >> Phil Jourdan --- p...@ptahhotep.com
> >>http://www.ptahhotep.com
> >>http://www.chiccantine.com/andypantry.php
> >>
> >>
> >> 
> > So you want the sql select to be dumped into a table as it exists in the
> > database?
> >
> > There is  a simple way to do this, if you know which fields are in your
> > table, and that is just to use a while loop to iterate your records, and
> > then explicitly output each field as you want it. This is the preferred
> > way, and how I'd do it if I were you.
> >
> > print '';
> > // put column headers here
> > $query = "query here";
> > $result = mysql_query($query);
> > while($row = mysql_fetch_array($result))
> > {
> > print  '';
> > print "{$row['field1'])";
> > print "{$row['field2'])";
> > print "{$row['field3'])";
> > // etc
> > print '';
> > }
> > print '';
> >
> >   
> Thanks, Ashley,
> So, you're advocating using tables...
> I thought it might be interesting to do the columns with  inline
> and then populate them with the query results. It worked marvellously
> for the navigation layout and I was able to add background and color to
> the product page, regardless which product page we're showing. Quite
> neat, really, and very simple. Anyway, I'm going to try.
> I must be nuts or something like glutton for punishment, but when you
> get it working, it's quite a satisfaction. :-) Thanks again.
> 
> -- 
> Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
> -
> Phil Jourdan --- p...@ptahhotep.com
>http://www.ptahhotep.com
>http://www.chiccantine.com/andypantry.php
> 
> 
I'm advocating tables on this one, as it is pretty much tabular data.
Use  tags for your column headers and product names, and s for
the rest. It will be easier to display, but with actually give your
content meaning, especially if you add a table legend, etc.


Ash
www.ashleysheridan.co.uk


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