[PHP] Re: ICQ interface?

2002-08-19 Thread lallous

I feel like the request being sent is erroneous.

it was:
fputs($fp,"GET/scripts/online.dll?icq=$uin&img=5HTTP/1.0\n\n");

It should be:
fputs($fp,"GET /scripts/online.dll?icq=$uin&img=5 HTTP/1.0\n\n");


And beside that it seems it is an outdated URL


Elias

"Justin French" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Has anyone built, or partially built an interface to ICQ?

I'm not necessarily looking for full IM thru a web/PHP interface, but maybe
some small stuff, like finding out if a certain user is online?

I did a google and found this on Zend.com, but can't get it working (it
returns "unknown" everytime, with any number):

\n";
}
else
{
fputs($fp,"GET/scripts/online.dll?icq=$uin&img=5HTTP/1.0\n\n");
$do='no';
while(!feof($fp))
{
$line=fgets($fp,128);
$do=($do=='yes')?'yes':(eregi("^GIF89",$line))?'yes':'no';;
if($do=='yes')
{
if(ereg("á7@ ±40",$line))
{
return 'online';
}
elseif(ereg("áw` ±40",$line))
{
return 'offline';
}
elseif(ereg("S3IѱèJ",$line))
{
return 'disabled';
}
}
}
fclose($fp);
}
return 'unknown';
}

/*  usage --
include('icq_status.php');
$uin=51362125;
echoget_status($uin);
*/
?>


... and this, which spits out an error:
"Warning: file("http://wwp.icq.com/scripts/online.dll?icq=&img=1";) -
Undefined error: 0 in /usr/local/apache/htdocs/hinge/viewmember.php on line
13"

http://wwp.icq.com/scripts/online.dll?icq=$uin&img=1";);
 $len = strlen($arr[1]);
 if ($len == "") return "ICQ: Local
Server";
 if ($len == 96) return "ICQ: Online";
 if ($len == 83) return "ICQ: Offline";
 if ($len == 1) return "ICQ: Disabled";
}
echo ICQ_Status($uin);

?>


My guess is that these both DID work at one point, but if ICQ keeps changing
their methods, then the scripts become redundant.


Any links / guidance would be great!


Justin French




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




Re: [PHP] sorting multiple-dimensional arrays

2002-08-19 Thread Vehbi Sinan Tunalioglu

Have you ever heard data structures and algorithms? :o)

I recommend you to learn how people sort things in arrays. If you learn 
to sort things in a single dimensional array you will be able to learn 
how to sort the multi-dimensional array. People who have developed PHP 
do nothing more than this.

Try to start with buble-sort algorithm.
Search in google and you'll find lots of web sites which teach sort 
algorithms in C, which is very similar to PHP syntax, you know...

Sometimes, it is better to find custom solutions...
:o)

Have a nice day...

Vehbi Sinan Tunalioglu

Evan Nemerson wrote:

>I have an array that looks like
>
>$array = Array(
>   Array($var1, $var2, $var3),
>   Array($var1, $var2, $var3),
>   Array($var1, $var2, $var3)
>);
>
>I want to sort the arrays within $array by $var3 (although if it helps i can 
>easily change that to $var1). $var1 and $var2 are strings, $var3 is a number 
>(in form of ([0-9]{3}\.[0-9]) )
>
>I know i could put something together that would make a new, 
>single-dimensional array that looks like Array(var3, var3, var3...), sort 
>that, then use that as a reference point, but that's a really sloppy 
>approach, and I'm thinking probably not the best way.
>
>I have a feeling someone is just going to reply with only 
>"php.net/somefunction" in the body of their message, and I'll feel stupid, 
>but oh well. I can't find anything in the man.
>
>Any input would be appreciated.
>
>
>-Evan
>



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




Re: [PHP] PHP License Agreement

2002-08-19 Thread Rasmus Lerdorf

Did your legal department read the PHP license at all?  There is nothing
in the PHP license that states this.

The clauses of the PHP license are, with my embedded comments in []'s:

  1. Redistributions of source code must retain the above copyright
 notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright
 notice, this list of conditions and the following disclaimer in
 the documentation and/or other materials provided with the
 distribution.

[So, so far your only requirement, if you are actually redistributing PHP
 itself, which it sounds like you are, is that somewhere you need to put
 the PHP copyright found in the LICENSE file.]

  3. The name "PHP" must not be used to endorse or promote products
 derived from this software without prior written permission. For
 written permission, please contact [EMAIL PROTECTED]

  4. Products derived from this software may not be called "PHP", nor
 may "PHP" appear in their name, without prior written permission
 from [EMAIL PROTECTED]  You may indicate that your software works in
 conjunction with PHP by saying "Foo for PHP" instead of calling
 it "PHP Foo" or "phpfoo"

[Don't call your product PHP 5.0 or Super PHP]

  5. The PHP Group may publish revised and/or new versions of the
 license from time to time. Each version will be given a
 distinguishing version number.
 Once covered code has been published under a particular version
 of the license, you may always continue to use it under the terms
 of that version. You may also choose to use such covered code
 under the terms of any subsequent version of the license
 published by the PHP Group. No one other than the PHP Group has
 the right to modify the terms applicable to covered code created
 under this License.

  6. Redistributions of any form whatsoever must retain the following
 acknowledgment:
 "This product includes PHP, freely available from
 ".

[Finally say where you got PHP from so people can go fetch it themselves.
 The only other thing in the LICENSE file is the warranty disclaimer and
 some contact info.  So, no mention of html source code, compiler source
 code or anything similar.  Now, one of the other licenses of the various
 bits you are using, such as perhaps MySQL's may place further restrictions
 on you.]

-Rasmus

On Mon, 19 Aug 2002, daniel cozzolino wrote:

> Hello all,
>
> I have an issue with an application I have developed that has Macromedia
> Director interfacing with MySql via PHP.  I am told by our legal
> representation that under the PHP license agreement, the PHP html source
> code must be available.  It was my understanding that only the compiler
> source code need be made available.  Am i way off track or should I out
> asking for PHP website source code?? ;-)
>
> The product is for sale and uses php/mysql for administration.  I have a
> software licence for Director and have just purchased the MySql license.
>
> Is there anyone else who has experienced the same situation or could refer
> me to an appropriate information source.
>
> thanks
> Daniel Cozzolino
>
>
>
> --
> 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] mail and attachments

2002-08-19 Thread Pafo

i got a script that the user signs up on and send a profile to the owners
email address
but i want to implement a file upland and that the uploaded file should be
submitted with the mail..

is this possible in php?
i know its possible in cg..

regards
patrick



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




Re: [PHP] mail and attachments

2002-08-19 Thread Vehbi Sinan Tunalioglu

If you mean that you want to add attachments to emails it is possible of 
course...
Try Phpmailer...
I recommend you to print out a copy of this script and its helper class 
SMTP so that you can read it and modify (it is not required, guys have 
done everything well enough) and reuse it. You can do more than attach 
things into the mail...

http://phpmailer.sourceforge.net/

Have a nice day...
Vehbi Sinan Tunalioglu

Pafo wrote:

>i got a script that the user signs up on and send a profile to the owners
>email address
>but i want to implement a file upland and that the uploaded file should be
>submitted with the mail..
>
>is this possible in php?
>i know its possible in cg..
>
>regards
>patrick
>
>
>



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




Re: [PHP] mail and attachments

2002-08-19 Thread @ Edwin
Also, somebody has already posted (2 weeks ago?) a similar or related 
question. I think, the answers given also apply to this question as well.

- E

>
>If you mean that you want to add attachments to emails it is 
>possible of course...
>Try Phpmailer...
>I recommend you to print out a copy of this script and its helper 
>class SMTP so that you can read it and modify (it is not required, 
>guys have done everything well enough) and reuse it. You can do more 
>than attach things into the mail...
>
>http://phpmailer.sourceforge.net/
>
>Have a nice day...
>Vehbi Sinan Tunalioglu
>
>Pafo wrote:
>
>>i got a script that the user signs up on and send a profile to the 
>>owners
>>email address
>>but i want to implement a file upland and that the uploaded file 
>>should be
>>submitted with the mail..
>>
>>is this possible in php?
>>i know its possible in cg..
>>
>>regards
>>patrick
>>
>>
>>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>




_
$B%-%c%j%"%"%C%W$rL\;X$9$"$J$?$N%J%S%2!<%?!<(B MSN $B="?&!&E>?&(B 
http://career.msn.co.jp/


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


[PHP] Apache 2.0.40 and php as module

2002-08-19 Thread George E. Papadakis

Hi ,

I am trying to install Apache 2.0.40 with the latest php build as  a module
(windows xp) yet it just wont work.
Though I tried all the tricks and possible scenarios no luck.
Does anyone have anyidea why I am getthing this frustrating "Cannot load
D:/Apache/php/sapi/php4apache2.dll into server: The specified procedure
could not be found." message?
Thanks in advance.

-- georgep


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




[PHP] Apache 2.0 and PHP

2002-08-19 Thread John Wards

Guys and Girls got a question for you.

Is Apache 2.0 any good and is there any advantages to installing it?

Does it work fine enough with PHP and MySQL?

Would I be able to install it along side 1.3 and run it on a separate port?

Cheers
John Wards
SportNetwork.net


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




[PHP] Inquiry on sql query class.

2002-08-19 Thread Henrik Johansson

Hi.

I am constructing a somewhat generic class to contain all queries needed to
make a self sustaining base to
conform for a larger purpose.

Basically I am quite new to the concept of writing classes, which doesn´t
have much to do with this inquiry though.
One of the issues I ran into was how to handle possible multiple selections
from an sql query without putting
in a lot of if statements or switches to accomodate this. Instead I´ve taken
the approach of using the "explode/implode" array handler to overcome this. 
Consider a very simple query: "SELECT foo,bar FROM table ORDER BY foo asc;".
Suppose the "foo" and "bar" was assigned to the array "fields" in the HTML
form (the fields would of course be checked against the table and that
sufficient privileges existed for the logged in user, before trying to
perform the query.), would the "$selected_fields = implode(",",$fields);"
followed by "$sql_query = "SELECT $selected_fields FROM table ORDER BY foo
asc;";" be a proper way of handling this issue or am I in over my head?

Cheers,
Henrik J.




[PHP] Re: mail and attachments

2002-08-19 Thread Manuel Lemos

Hello,

On 08/19/2002 04:52 AM, Pafo wrote:
> i got a script that the user signs up on and send a profile to the owners
> email address
> but i want to implement a file upland and that the uploaded file should be
> submitted with the mail..
> 
> is this possible in php?
> i know its possible in cg..

You may want to try this class that lets you compose message with 
attachments and also lets you have HTML messages with embedded images 
and alternative text versions if you need it.

http://www.phpclasses.org/mimemessage

-- 

Regards,
Manuel Lemos


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




[PHP] upload video

2002-08-19 Thread Jamie Ingram


Any one come across this one:
I am trying to write the php code to upload a video file. The code works
fine for images, text etc, but video comes out twice the size and
unreadable.
Any ideas?

--

-
Jamie Ingram



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




Re: [PHP] Apache 2.0 and PHP

2002-08-19 Thread Aaron Gould

Wait until PHP 4.3.0 before considering Apache 2.0.  Rasmus has indicated
they *may* play better together at that point.  Currently, PHP 4.2.x with
Apache 2 is experimental and should not be used in a production environment.

We use it on our development server without trouble, but that server is not
exposed to a lot of traffic and abuse.

--
Aaron Gould
[EMAIL PROTECTED]
Web Developer


- Original Message -
From: "John Wards" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 19, 2002 7:27 AM
Subject: [PHP] Apache 2.0 and PHP


> Guys and Girls got a question for you.
>
> Is Apache 2.0 any good and is there any advantages to installing it?
>
> Does it work fine enough with PHP and MySQL?
>
> Would I be able to install it along side 1.3 and run it on a separate
port?
>
> Cheers
> John Wards
> SportNetwork.net
>
>
> --
> 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] Passing a PHP variable to javascript

2002-08-19 Thread Michael

Hello everyone,

This may seem a newbie question...

I have a PHP variable containing the text of the alert I want to display
($text) and I want to have it displayed in a javascript alert box
(something like alert($text) ).
I couldn't find out how to sort this out...

Regards,
Michael


__
Pour mieux recevoir vos emails, utilisez un PC plus performant !
Découvrez la nouvelle gamme DELL en exclusivité sur i (france)
http://www.ifrance.com/_reloc/signhdell


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




Re: [PHP] Passing a PHP variable to javascript

2002-08-19 Thread John Wards

alert()
- Original Message -
From: "Michael" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 19, 2002 1:54 PM
Subject: [PHP] Passing a PHP variable to javascript


> Hello everyone,
>
> This may seem a newbie question...
>
> I have a PHP variable containing the text of the alert I want to display
> ($text) and I want to have it displayed in a javascript alert box
> (something like alert($text) ).
> I couldn't find out how to sort this out...
>
> Regards,
> Michael
>
>
>

__
> Pour mieux recevoir vos emails, utilisez un PC plus performant !
> Découvrez la nouvelle gamme DELL en exclusivité sur i (france)
> http://www.ifrance.com/_reloc/signhdell
>
>
> --
> 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] Passing a PHP variable to javascript

2002-08-19 Thread Scott Houseman

Hi Michael.

Use:


alert( '' );


If this page is parsed by php i.e. its a .php file rather than .html or .js
file,
then the variable will be output as a string constant in the javascript
code.

Cheers!

Scott
- Original Message -
From: "Michael" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 19, 2002 2:54 PM
Subject: [PHP] Passing a PHP variable to javascript


> Hello everyone,
>
> This may seem a newbie question...
>
> I have a PHP variable containing the text of the alert I want to display
> ($text) and I want to have it displayed in a javascript alert box
> (something like alert($text) ).
> I couldn't find out how to sort this out...
>
> Regards,
> Michael
>
>
>

__
> Pour mieux recevoir vos emails, utilisez un PC plus performant !
> Découvrez la nouvelle gamme DELL en exclusivité sur i (france)
> http://www.ifrance.com/_reloc/signhdell
>
>
> --
> 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] Passing a PHP variable to javascript

2002-08-19 Thread Justin French

The trick is that javascript has to be triggered somehow -- an onLoad,
onClick, onChange, onMouseOver, etc etc.

When/how do you want to trigger this?


Justin French




on 19/08/02 10:54 PM, Michael ([EMAIL PROTECTED]) wrote:

> Hello everyone,
> 
> This may seem a newbie question...
> 
> I have a PHP variable containing the text of the alert I want to display
> ($text) and I want to have it displayed in a javascript alert box
> (something like alert($text) ).
> I couldn't find out how to sort this out...
> 
> Regards,
> Michael
> 
> 
> __
> Pour mieux recevoir vos emails, utilisez un PC plus performant !
> Découvrez la nouvelle gamme DELL en exclusivité sur i (france)
> http://www.ifrance.com/_reloc/signhdell
> 
> 
> --
> 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] Problem about rpm package of php

2002-08-19 Thread Adam Williams

If I haven't responded too late, Install the SRPM package with rpm -ivh
file.srpm or file.src.rpm and then do to the SPECS directory.  In RedHat's
case it is /usr/src/redhat/SPECS and look for something like mod_php.spec
or php.spec and edit it.  That file has a paramaters it passes to
configure script, so add to it a --with-imap and then save the file, and
then run rpm -bb mod_php.spec (or whatever the name of it is) and then it
will build the binary rpm in /usr/src/redhat/RPMS/i386 and you simply rpm
-Uvh it.

Adam

On Sat, 17 Aug 2002 [EMAIL PROTECTED] wrote:

> Dear All,
>
> How can I enable --with-imap with rpm / SPRMS packages of php ?
>
> Thank for your help !
>
> Edward.
>
>
>
>
>
>


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




[PHP] Re: Passing a PHP variable to javascript

2002-08-19 Thread Chris Schoeman

This is one way to do it

\n";
echo "\n";
echo "\n";
?>

Chris

On Mon, 19 Aug 2002 12:54:57 GMT, [EMAIL PROTECTED] (Michael) wrote:

>Hello everyone,
>
>This may seem a newbie question...
>
>I have a PHP variable containing the text of the alert I want to display
>($text) and I want to have it displayed in a javascript alert box
>(something like alert($text) ).
>I couldn't find out how to sort this out...
>
>Regards,
>Michael
>
>
>__
>Pour mieux recevoir vos emails, utilisez un PC plus performant !
>Découvrez la nouvelle gamme DELL en exclusivité sur i (france)
>http://www.ifrance.com/_reloc/signhdell


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




php-general Digest 19 Aug 2002 13:41:26 -0000 Issue 1534

2002-08-19 Thread php-general-digest-help


php-general Digest 19 Aug 2002 13:41:26 - Issue 1534

Topics (messages 113169 through 113199):

Resetting the timeout
113169 by: Mike Mannakee
113170 by: Jason Wong
113171 by: Martin Towell

Re: mail/variable help needed..
113172 by: Jason Wong

Re: How Can I Generate an Email List from a MySQL Table
113173 by: Roger Lewis

max_execute_time does not work on infinitely loop
113174 by: NoWhErEMan

Re: html parser
113175 by: Justin French

php string match problem
113176 by: Pafo
113177 by: Martin Towell
113178 by: Martin Towell
113179 by: Martin Towell
113180 by: Brad Bulger

PHP License Agreement
113181 by: daniel cozzolino
113184 by: Rasmus Lerdorf

Re: ICQ interface?
113182 by: lallous

Re: sorting multiple-dimensional arrays
113183 by: Vehbi Sinan Tunalioglu

mail and attachments
113185 by: Pafo
113186 by: Vehbi Sinan Tunalioglu
113187 by: . Edwin
113191 by: Manuel Lemos

Apache 2.0.40 and php as module
113188 by: George E. Papadakis

Apache 2.0 and PHP
113189 by: John Wards
113193 by: Aaron Gould

Inquiry on sql query class.
113190 by: Henrik Johansson

upload video
113192 by: Jamie Ingram

Passing a PHP variable to javascript
113194 by: Michael
113195 by: John Wards
113196 by: Scott Houseman
113197 by: Justin French
113199 by: Chris Schoeman

Re: Problem about rpm package of php
113198 by: Adam Williams

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

Is there any way to set the timeout (max length of time the script has to
execute) from within a script, just for its own execution?

Mike



--- End Message ---
--- Begin Message ---

On Monday 19 August 2002 10:06, Mike Mannakee wrote:
> Is there any way to set the timeout (max length of time the script has to
> execute) from within a script, just for its own execution?

ini_set()

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Sometimes love ain't nothing but a misunderstanding between two fools.
*/


--- End Message ---
--- Begin Message ---

set_time_limit()

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 12:05 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Resetting the timeout


On Monday 19 August 2002 10:06, Mike Mannakee wrote:
> Is there any way to set the timeout (max length of time the script has to
> execute) from within a script, just for its own execution?

ini_set()

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Sometimes love ain't nothing but a misunderstanding between two fools.
*/


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

--- End Message ---
--- Begin Message ---

On Monday 19 August 2002 07:23, eriol wrote:

> I understand that PHP will retain the file in a temporary directory (/tmp/)
> until it is stored to the path I've specified (/uploaded/), but I don't
> understand how to get it to print the new file name within the email it
> sends to me.. Currently, it only prints the temporary file name as shown
> above..

That's because at the point that you're assigning $body that is what $file 
contains ...

> As you can see, to the last $body variable, I've added both $info & $file
> as a test, but $info returns null and $file returns the temp path/name
> only.. However, within the returned php/html page, the $file variable
> actually does echo the actual file name the user chose to upload..

..., move it to after you have redefined $file and $info.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
They're only trying to make me LOOK paranoid!
*/


--- End Message ---
--- Begin Message ---

On Sat, 17 Aug 2002 20:10:02 -0700
"Roger Lewis" <[EMAIL PROTECTED]> wrote:

> My problem is how do you create the variable, $to, from the MySQL table so
> that it contains all of the addresses separated by commas.


Daren Cotter [mailto:[EMAIL PROTECTED]] responded
Saturday, August 17, 2002 8:42 PM

> // Query database
> $result = mysql_query("SELECT email_address FROM users
> WHERE is_subscribed = 'Y'", $link);
> while ($row = mysql_fetch_array($result)) {
>   mail($row["email_address"], $SUBJECT, $BODY,
> $HEADER);
> }
> mysql_free_result($result);

Darren,

[PHP] A quick question - Help Please !

2002-08-19 Thread Dan McCullough

Hello everyone,

I have a quick question.

I am trying to do two seperate things on one submission, it would be easy if I was 
submitting to
my own page, but I am submitting to a payment processor company, and so several things 
will occur
off-site, and there is nothing that comes back from the payment processor when then 
payment is
made so I can't handle it on the return.  And so what I am doing now is when you land 
on the page
to confirm that you want to place the order an email is created and sent to the owner, 
I would
like that to only get sent when the submit button is clicked .. and yes I have tried 
onSubmit with
it calling my php function.  

Any thoughts?

thanks,

dan

__
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

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




Re: [PHP] Apache 2.0 and PHP

2002-08-19 Thread Rasmus Lerdorf

If you run Apache2 in prefork mode, it should mostly work with PHP.  Don't
try to use one of the threaded mpms yet.  The Apache 2 prefork mpm makes
it operate exactly like Apache 1.3 in the way it pre-forks processes and
handles one request per process.

-Rasmus

On Mon, 19 Aug 2002, John Wards wrote:

> Guys and Girls got a question for you.
>
> Is Apache 2.0 any good and is there any advantages to installing it?
>
> Does it work fine enough with PHP and MySQL?
>
> Would I be able to install it along side 1.3 and run it on a separate port?
>
> Cheers
> John Wards
> SportNetwork.net
>
>
> --
> 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] A quick question - Help Please !

2002-08-19 Thread Justin French

That's REALLY strange that the payment site doesn't return anything...  So
the user just hits a dead-end or what?  Can we see a test site?

And the fact that it all needs to be secure makes it a little more
challenging.

Essentially, what you need is for one form to POST to two separate
scripts... one local, and one on another server.  My thoughts are that you'd
need to POST to a local script which produces the email AND THEN submits
info to the merchant.

But the fact that this probably needs to be done:
a) with POST
b) with SSL

Will prolly make it very tricky.  Search the archives for "emulating POST"
or "faking POST", because I know it's been discussed before.


Yes, you probably CAN do it with javascript, but I'm not sure I'd be
comfortable relying on it AT ALL -- if it doesn't exist, then your site
breaks -- either the email or the merchant stuff will break if you rely on
JS.


Justin French


on 19/08/02 11:54 PM, Dan McCullough ([EMAIL PROTECTED]) wrote:

> Hello everyone,
> 
> I have a quick question.
> 
> I am trying to do two seperate things on one submission, it would be easy if I
> was submitting to
> my own page, but I am submitting to a payment processor company, and so
> several things will occur
> off-site, and there is nothing that comes back from the payment processor when
> then payment is
> made so I can't handle it on the return.  And so what I am doing now is when
> you land on the page
> to confirm that you want to place the order an email is created and sent to
> the owner, I would
> like that to only get sent when the submit button is clicked .. and yes I have
> tried onSubmit with
> it calling my php function.
> 
> Any thoughts?
> 
> thanks,
> 
> dan
> 
> __
> Do You Yahoo!?
> HotJobs - Search Thousands of New Jobs
> http://www.hotjobs.com


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




[PHP] Rep:[PHP] Re: Passing a PHP variable to javascript

2002-08-19 Thread regardepas Sanete

Nice,

Thank you
-Message d'origine-
De: Chris Schoeman <[EMAIL PROTECTED]>
A: [EMAIL PROTECTED]
Date: 19/08/02
Objet: [PHP] Re: Passing a PHP variable to javascript

This is one way to do it 
 
 \n";
 echo "\n";
 echo "\n";
 ?>

Chris

On Mon, 19 Aug 2002 12:54:57 GMT, [EMAIL PROTECTED] (Michael) wrote:

>Hello everyone,
>
>This may seem a newbie question...
>
>I have a PHP variable containing the text of the alert I want to
display
>($text) and I want to have it displayed in a javascript alert box
>(something like alert($text) ).
>I couldn't find out how to sort this out...
>
>Regards,
>Michael
>
>
>___
___
>Pour mieux recevoir vos emails, utilisez un PC plus performant !
>Découvrez la nouvelle gamme DELL en exclusivité sur i (france)
>http://www.ifrance.com/_reloc/signhdell


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


__
Pour mieux recevoir vos emails, utilisez un PC plus performant !
Découvrez la nouvelle gamme DELL en exclusivité sur i (france)
http://www.ifrance.com/_reloc/signhdell


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




[PHP] HTML - iframe

2002-08-19 Thread David Buerer

Yes I know it's a PHP list, but I thought someone might have an idea on how
to fixt this problem anyway.

I have a page with (2) iframes.  While the source file for the iframes is
being loaded, the iframe shows up as a big white area, similar to a
.  How do I make it so this doesn't happen?



RE: [PHP] HTML - iframe

2002-08-19 Thread Jay Blanchard

[snip]
Yes I know it's a PHP list, but I thought someone might have an idea on how
to fixt this problem anyway.

I have a page with (2) iframes.  While the source file for the iframes is
being loaded, the iframe shows up as a big white area, similar to a
.  How do I make it so this doesn't happen?
[/snip]

You might want to set the background color of the page to something
different, other than that there is not much that you can do. IFRAMEs load
last in most browsers. You can apply CSS to the IFRAME
http://www.w3.org/TR/REC-html40/present/frames.html#h-16.5 , but I don't
know what else you could do.

HTH!

Jay

I haven’t lost my mind. It’s backed up on disk somewhere

***
* Texas PHP Developers Conf  Spring 2003  *
* T Bar M Resort & Conference Center  *
* New Braunfels, Texas*
* San Antonio Area PHP Developers Group   *
* Interested? Contact [EMAIL PROTECTED] *
***



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




Re: [PHP] Apache 2.0 and PHP

2002-08-19 Thread @ Edwin

>
>Would I be able to install it along side 1.3 and run it on a separate 
port?

I know some who installed two 1.3s in two different folders, run two 
different daemons, in two different ports. I think it should work with 1.3 
and 2.0 as well...

- E

>
>Cheers
>John Wards
>SportNetwork.net
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>




_
$B2q0wEPO?$OL5NA!&=

Re: [PHP] HTML - iframe

2002-08-19 Thread Milan Reznicek

You may try,

to make the IFRAME invisible. I think it is done with this:

document.all.name.visibility = "hidden";

And when the page is loaded then change it to

 document.all.name.visibility = "visible";


Not sure if it will be working but you can try it.

Hi Milan
- Original Message -
From: "David Buerer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 19, 2002 7:10 AM
Subject: [PHP] HTML - iframe


> Yes I know it's a PHP list, but I thought someone might have an idea on
how
> to fixt this problem anyway.
>
> I have a page with (2) iframes.  While the source file for the iframes is
> being loaded, the iframe shows up as a big white area, similar to a
> .  How do I make it so this doesn't happen?
>


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




Re: [PHP] HTML - iframe

2002-08-19 Thread Adam Williams

Have you tried putting the IFRAME in a table and setting the background
color of that table to the background of the rest of the page?

Adam

On Mon, 19 Aug 2002, David Buerer wrote:

> Yes I know it's a PHP list, but I thought someone might have an idea on how
> to fixt this problem anyway.
>
> I have a page with (2) iframes.  While the source file for the iframes is
> being loaded, the iframe shows up as a big white area, similar to a
> .  How do I make it so this doesn't happen?
>


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




[PHP] Re: Apache 2.0.40 and php as module

2002-08-19 Thread Seairth Jacobs

I have had the same problem under Win2K.  My understanding is that PHP does
not yet work well (at all, in this case) with Apache2.  Instead, install
Apache 1.3.  The console window is a bit annoying (would have liked to run
it as a service), but it does work.  :)

---
Seairth Jacobs
[EMAIL PROTECTED]


"George E. Papadakis" <[EMAIL PROTECTED]> wrote in message
08f401c24772$3e5fe130$07dbdbc2@phaistonian">news:08f401c24772$3e5fe130$07dbdbc2@phaistonian...
> Hi ,
>
> I am trying to install Apache 2.0.40 with the latest php build as  a
module
> (windows xp) yet it just wont work.
> Though I tried all the tricks and possible scenarios no luck.
> Does anyone have anyidea why I am getthing this frustrating "Cannot load
> D:/Apache/php/sapi/php4apache2.dll into server: The specified procedure
> could not be found." message?
> Thanks in advance.
>
> -- georgep
>



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




[PHP] compile error

2002-08-19 Thread Adam Williams

I'm trying to compile PHP 4.2.2.  I am running Apache 2.0.40 (yes I know
support is experimental).  I am compiling on Redhat 7.3 Linux 2.4.18.  I
did my PHP configure line:

./configure --enable-track-vars --with-mysql --with-mail 
--with-apxs2=/usr/local/apache2/bin/apxs

and then I do a make, and it errors out with:

make[3]: Entering directory `/root/php-4.2.2/sapi/apache2filter'
/bin/sh /root/php-4.2.2/libtool --silent --mode=compile gcc  -I.
-I/root/php-4.2.2/sapi/apache2filter -I/root/php-4.2.2/main
-I/root/php-4.2.2 -I/usr/local/apache2/include -I/root/php-4.2.2/Zend
-I/root/php-4.2.2/ext/mysql/libmysql -I/root/php-4.2.2/ext/xml/expat
-D_REENTRANT -I/root/php-4.2.2/TSRM -DTHREAD=1 -g -O2 -pthread -DZTS
-prefer-pic  -c sapi_apache2.c
sapi_apache2.c: In function `php_register_hook':
sapi_apache2.c:534: warning: passing arg 3 of `ap_register_output_filter'
makes
pointer from integer without a cast
sapi_apache2.c:534: too few arguments to function
`ap_register_output_filter'
sapi_apache2.c:535: warning: passing arg 3 of `ap_register_input_filter'
makes pointer from integer without a cast
sapi_apache2.c:535: too few arguments to function
`ap_register_input_filter'
make[3]: *** [sapi_apache2.lo] Error 1
make[3]: Leaving directory `/root/php-4.2.2/sapi/apache2filter'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/php-4.2.2/sapi/apache2filter'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/php-4.2.2/sapi'
make: *** [all-recursive] Error 1

Has anyone else had similar errors and found a solution?

Adam


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




[PHP] Old PHP files not working

2002-08-19 Thread Trout, Travis
Title: Old PHP files not working





I am having a very weird problem and am not sure if it is the files or the php parser it self. I currently have a server running Apache 1.3.23, MySQL 3.23.47, and PHP 4.1.1 on Red Hat 7.2. I have another test server that I have just set up with the latest of the three packages above on RH 7.3.

My problem is that when I copy the files from the old server to this one it doesn't seem to want to parse all of the .php files. It is a very simple site. There is a header.php, footer.php, config.php, and a index.php file. All of the files except for the index.php parse correctly. Although, the index.php file doesn't want to do anything with the database. It connects and chooses the database that I want, but when I try to query the db it doesn't do anything. It doesn't give a warning or an error at all. What is weird is if I rewrite the code from scratch on the new PC and then run it, it works fine. I have checked permissions and everything is same between the two files. Both of the files have been edited and created using either gedit or vi. 

Some of you may be saying that if I can re-type it and it works fine for such a small site then just re-type it and let it go. The problem is this site is small, but there are several others and one being 400+ php files with over 1,000 lines of code and many of the files. 

I have attached a copy of the index.php file to see if any of you may be able to see what is wrong with it.


 <> 
Thank you,


Travis Trout




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


RE: [PHP] Old PHP files not working

2002-08-19 Thread Trout, Travis

Here is the code since it doesn't look like attachments work here...
 
 
You must enter a last name, first name or select a
department
Home";
   include ("footer.php");
   exit;
   
 } //end if
  
  if ($fname != '' && $lname == '' && $dept_pulldown != '' && $dept_pulldown
!= 'all') {  // First name only query
 
$sql = "Select * from emp_numbers where fname = '$fname' && dept =
'$dept_pulldown' order by $sort";  // with dept
break;
} elseif ($fname != '' && $lname == '' && $dept_pulldown == '') {
 $sql = "Select * from emp_numbers where fname = '$fname' order by
$sort";  // without dept break;
 } elseif ($fname != '' && $lname == '' && $dept_pulldown == 'all') {
  $sql = "Select * from emp_numbers where fname = '$fname' order by
$sort";  // with all depts
  break;
  } // end if
 
   if ($fname == '' && $lname != '' && $dept_pulldown != '' &&
$dept_pulldown != 'all') {  // Last name only query
 
$sql = "Select * from emp_numbers where lname = '$lname' && dept =
'$dept_pulldown' order by $sort";  // with dept
break;
} elseif ($fname == '' && $lname != '' && $dept_pulldown == '') {
 $sql = "Select * from emp_numbers where lname = '$lname' order by
$sort";  // without dept
 break;
 } elseif ($fname == '' && $lname != '' && $dept_pulldown == 'all') {
  $sql = "Select * from emp_numbers where lname = '$lname' order by
$sort";  // with all depts
  break;
   } // end if
 
if ($fname != '' && $lname != '' && $dept_pulldown != '' &&
$dept_pulldown != 'all') {  // Both names query
 $sql = "Select * from emp_numbers where fname = '$fname' && lname =
'$lname' && dept = '$dept_pulldown' order by $sort";  // with dept
 break;
 } elseif ($fname != '' && $lname != '' && $dept_pulldown == '') {
  $sql = "Select * from emp_numbers where fname = '$fname' && lname =
'$lname' order by $sort";  // without dept
  break;
  } elseif ($fname != '' && $lname != '' && $dept_pulldown == 'all') {
   $sql = "Select * from emp_numbers where fname = '$fname' && lname =
'$lname' order by $sort";  // with all depts
   break;
} // end if
   
 if ($fname == '' && $lname == '' && $dept_pulldown != '' &&
$dept_pulldown != 'all') {  // Deptartment only query
  $sql = "Select * from emp_numbers where dept = '$dept_pulldown' order
by $sort";
  break;
 } // end if
  
  if ($fname == '' && $lname == '' && $dept_pulldown == 'all') {
   $sql = "Select * from emp_numbers order by $sort";  // Query everyone
   break;
  } //end if
 

} while(0);
 
 
 
 // Query results
 
 $db = mysql_connect($dbhost, $dbuname, $dbpass) or die("Can't connect to
server.");
 mysql_select_db("$dbname", $db) or die("Can't select database.");
 
 $result = mysql_query($sql) or die("Bad SQL Statement!$sql");
 $nrows  = mysql_num_rows($result);
 
 if ($nrows == 0) {
  echo "Sorry, no records found.Home";
 } else{
 
 
 
 // Display results
 
 echo "
  Total Found: $nrows
  Home
  
  
  
 
  Name
  Work
  Home
  Cell
  Pager
  Department

";

 
  while ($myrow = mysql_fetch_row($result)) {
   if ($sort == "lname" || $sort == "dept"){
   
   printf("%s, %s
   %s
   %s
   %s
   %s
   %s
   \n", $myrow[2], $myrow[3], $myrow[4], $myrow[5], $myrow[6],
$myrow[7], $myrow[1]);
   
   
 } else {
  
   printf("%s %s
   %s
   %s
   %s
   %s
   %s
   \n", $myrow[3], $myrow[2], $myrow[4], $myrow[5], $myrow[6],
$myrow[7], $myrow[1]);
   
   } //end if
  } //end while
 
 echo "
  

   Home";
 
 } // End if
 

} else{
 
 
 
 
 
  // display form
 
 
 
?>


  

  
 
  Search 
Phone Numbers


   http://192.9.201.104/index.php
 "> 
  First Name:
  

 
  Last Name:
  


  Department:
  

   Departments
   All Departments
   Accounting
  Ad Services
  Admin HR
  Advertising
  Building
  Circulation
  Classified
  East Shore
  Editorial
  IT
  Marketing
  Production
  Reception
   
 

  
Sort by: First  Last  Dept.
  
  
  

  

  

 
  

Note: You MUST type entire first or last name, 
there are no boolean or wildcard functions available.

 


 

Travis Trout 
   Production Support 

The Mobile Press Register 
401 North Water Street 
Mobile Alabama 36602 

Phone: (251) 219-5263 
Email:  [EMAIL PROTECTED] 

-Original Message-
From: Trout, Travis [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 10:44 AM
To: 'PHP Mailing list'
Subject: [PHP] Old PHP files not working



I am having a very weird problem and am not sure if it is the files or the
php parser it self. I currently have a server running Apache 1.3.23, MySQL
3.23.47, and PHP 4.1.1 on Red Hat 7.2. I have another test server th

Re: [PHP] compile error

2002-08-19 Thread Rasmus Lerdorf

You need current PHP CVS to work with Apache 2.0.40.  See snaps.php.net

On Mon, 19 Aug 2002, Adam Williams wrote:

> I'm trying to compile PHP 4.2.2.  I am running Apache 2.0.40 (yes I know
> support is experimental).  I am compiling on Redhat 7.3 Linux 2.4.18.  I
> did my PHP configure line:
>
> ./configure --enable-track-vars --with-mysql --with-mail 
>--with-apxs2=/usr/local/apache2/bin/apxs
>
> and then I do a make, and it errors out with:
>
> make[3]: Entering directory `/root/php-4.2.2/sapi/apache2filter'
> /bin/sh /root/php-4.2.2/libtool --silent --mode=compile gcc  -I.
> -I/root/php-4.2.2/sapi/apache2filter -I/root/php-4.2.2/main
> -I/root/php-4.2.2 -I/usr/local/apache2/include -I/root/php-4.2.2/Zend
> -I/root/php-4.2.2/ext/mysql/libmysql -I/root/php-4.2.2/ext/xml/expat
> -D_REENTRANT -I/root/php-4.2.2/TSRM -DTHREAD=1 -g -O2 -pthread -DZTS
> -prefer-pic  -c sapi_apache2.c
> sapi_apache2.c: In function `php_register_hook':
> sapi_apache2.c:534: warning: passing arg 3 of `ap_register_output_filter'
> makes
> pointer from integer without a cast
> sapi_apache2.c:534: too few arguments to function
> `ap_register_output_filter'
> sapi_apache2.c:535: warning: passing arg 3 of `ap_register_input_filter'
> makes pointer from integer without a cast
> sapi_apache2.c:535: too few arguments to function
> `ap_register_input_filter'
> make[3]: *** [sapi_apache2.lo] Error 1
> make[3]: Leaving directory `/root/php-4.2.2/sapi/apache2filter'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/root/php-4.2.2/sapi/apache2filter'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/root/php-4.2.2/sapi'
> make: *** [all-recursive] Error 1
>
> Has anyone else had similar errors and found a solution?
>
>   Adam
>
>
> --
> 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] A quick question - Help Please !

2002-08-19 Thread Adrian Murphy

to do it with javascript u could post the form to
another local page with a form with hidden fields -
send the mail and use onload="" to post the second form.
would be a messy way to do it but would work.

adrian murphy
- Original Message -
From: "Justin French" <[EMAIL PROTECTED]>
To: "Dan McCullough" <[EMAIL PROTECTED]>; "PHP General List"
<[EMAIL PROTECTED]>
Sent: Monday, August 19, 2002 3:09 PM
Subject: Re: [PHP] A quick question - Help Please !


> That's REALLY strange that the payment site doesn't return anything...  So
> the user just hits a dead-end or what?  Can we see a test site?
>
> And the fact that it all needs to be secure makes it a little more
> challenging.
>
> Essentially, what you need is for one form to POST to two separate
> scripts... one local, and one on another server.  My thoughts are that
you'd
> need to POST to a local script which produces the email AND THEN submits
> info to the merchant.
>
> But the fact that this probably needs to be done:
> a) with POST
> b) with SSL
>
> Will prolly make it very tricky.  Search the archives for "emulating POST"
> or "faking POST", because I know it's been discussed before.
>
>
> Yes, you probably CAN do it with javascript, but I'm not sure I'd be
> comfortable relying on it AT ALL -- if it doesn't exist, then your site
> breaks -- either the email or the merchant stuff will break if you rely on
> JS.
>
>
> Justin French
>
>
> on 19/08/02 11:54 PM, Dan McCullough ([EMAIL PROTECTED]) wrote:
>
> > Hello everyone,
> >
> > I have a quick question.
> >
> > I am trying to do two seperate things on one submission, it would be
easy if I
> > was submitting to
> > my own page, but I am submitting to a payment processor company, and so
> > several things will occur
> > off-site, and there is nothing that comes back from the payment
processor when
> > then payment is
> > made so I can't handle it on the return.  And so what I am doing now is
when
> > you land on the page
> > to confirm that you want to place the order an email is created and sent
to
> > the owner, I would
> > like that to only get sent when the submit button is clicked .. and yes
I have
> > tried onSubmit with
> > it calling my php function.
> >
> > Any thoughts?
> >
> > thanks,
> >
> > dan
> >
> > __
> > Do You Yahoo!?
> > HotJobs - Search Thousands of New Jobs
> > http://www.hotjobs.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: [PHP] Problem about rpm package of php

2002-08-19 Thread EdwardSPL

Adam Williams wrote:

> If I haven't responded too late, Install the SRPM package with rpm -ivh
> file.srpm or file.src.rpm and then do to the SPECS directory.  In RedHat's
> case it is /usr/src/redhat/SPECS and look for something like mod_php.spec
> or php.spec and edit it.  That file has a paramaters it passes to
> configure script, so add to it a --with-imap and then save the file, and
> then run rpm -bb mod_php.spec (or whatever the name of it is) and then it
> will build the binary rpm in /usr/src/redhat/RPMS/i386 and you simply rpm
> -Uvh it.
>
> Adam

What different between rpm -bb file.spec and rpm -ba file.spec ?
Because some of users told me to run -ba file.spec...

Thank a lots.




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




RE: [PHP] Old PHP files not working

2002-08-19 Thread Jay Blanchard

[snip]
Some of you may be saying that if I can re-type it and it works fine for
such a small site then just re-type it and let it go. The problem is this
site is small, but there are several others and one being 400+ php files
with over 1,000 lines of code and many of the files.
[/snip]

Check the register_globals statement in your php.ini, and see if it is set
to "Off". If it is, set it to "On" (damn the security for now) and restart
your web server.

HTH!

Jay

If you want breakfast in bed, sleep in the kitchen

***
* Texas PHP Developers Conf  Spring 2003  *
* T Bar M Resort & Conference Center  *
* New Braunfels, Texas*
* San Antonio Area PHP Developers Group   *
* Interested? Contact [EMAIL PROTECTED] *
***



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




RE: [PHP] A quick question - Help Please !

2002-08-19 Thread Trout, Travis

When you submit, does the form call a php self function or are you calling a
file on the remote server? If you are doing either, why not just call
another php file on you local server to where you can FIRST send your email
and THEN send your info to the remote server? What options do you have for
sending the information to the remote server?

Travis Trout



-Original Message-
From: Adrian Murphy [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 10:48 AM
To: Dan McCullough; PHP General List
Subject: Re: [PHP] A quick question - Help Please !


to do it with javascript u could post the form to
another local page with a form with hidden fields -
send the mail and use onload="" to post the second form.
would be a messy way to do it but would work.

adrian murphy
- Original Message -
From: "Justin French" <[EMAIL PROTECTED]>
To: "Dan McCullough" <[EMAIL PROTECTED]>; "PHP General List"
<[EMAIL PROTECTED]>
Sent: Monday, August 19, 2002 3:09 PM
Subject: Re: [PHP] A quick question - Help Please !


> That's REALLY strange that the payment site doesn't return anything...  So
> the user just hits a dead-end or what?  Can we see a test site?
>
> And the fact that it all needs to be secure makes it a little more
> challenging.
>
> Essentially, what you need is for one form to POST to two separate
> scripts... one local, and one on another server.  My thoughts are that
you'd
> need to POST to a local script which produces the email AND THEN submits
> info to the merchant.
>
> But the fact that this probably needs to be done:
> a) with POST
> b) with SSL
>
> Will prolly make it very tricky.  Search the archives for "emulating POST"
> or "faking POST", because I know it's been discussed before.
>
>
> Yes, you probably CAN do it with javascript, but I'm not sure I'd be
> comfortable relying on it AT ALL -- if it doesn't exist, then your site
> breaks -- either the email or the merchant stuff will break if you rely on
> JS.
>
>
> Justin French
>
>
> on 19/08/02 11:54 PM, Dan McCullough ([EMAIL PROTECTED]) wrote:
>
> > Hello everyone,
> >
> > I have a quick question.
> >
> > I am trying to do two seperate things on one submission, it would be
easy if I
> > was submitting to
> > my own page, but I am submitting to a payment processor company, and so
> > several things will occur
> > off-site, and there is nothing that comes back from the payment
processor when
> > then payment is
> > made so I can't handle it on the return.  And so what I am doing now is
when
> > you land on the page
> > to confirm that you want to place the order an email is created and sent
to
> > the owner, I would
> > like that to only get sent when the submit button is clicked .. and yes
I have
> > tried onSubmit with
> > it calling my php function.
> >
> > Any thoughts?
> >
> > thanks,
> >
> > dan
> >
> > __
> > Do You Yahoo!?
> > HotJobs - Search Thousands of New Jobs
> > http://www.hotjobs.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: [PHP] Problem about rpm package of php

2002-08-19 Thread Adam Williams

If memory serves me right, -ba builds the binary and source rpms, and -bb
only builds the binary rpm.

Adam

On Mon, 19 Aug 2002 [EMAIL PROTECTED] wrote:

> Adam Williams wrote:
>
> > If I haven't responded too late, Install the SRPM package with rpm -ivh
> > file.srpm or file.src.rpm and then do to the SPECS directory.  In RedHat's
> > case it is /usr/src/redhat/SPECS and look for something like mod_php.spec
> > or php.spec and edit it.  That file has a paramaters it passes to
> > configure script, so add to it a --with-imap and then save the file, and
> > then run rpm -bb mod_php.spec (or whatever the name of it is) and then it
> > will build the binary rpm in /usr/src/redhat/RPMS/i386 and you simply rpm
> > -Uvh it.
> >
> > Adam
>
> What different between rpm -bb file.spec and rpm -ba file.spec ?
> Because some of users told me to run -ba file.spec...
>
> Thank a lots.
>
>
>
>
>


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




[PHP] Multidimensional arrays

2002-08-19 Thread Richard Fox

Hi,

Given the array $array initialized by:

  $query =  "SELECT id,name FROM MYTABLE";
  $result = mysql_query($query);
  $nrows = mysql_num_rows($result);
  for ($i=0; $i<$nrows; $i++) {
 $arr = mysql_fetch_array($result);
 $array[$i]['id']   = $arr['id'];
 $array[$i]['name'] = $arr['name'];
 }

I know I can have a similar 'for' loop to step through the array, from 0 to 
count($array)
But I would like to do something more elegant, with a foreach loop. But I have been 
unsuccessful as a foreach seems appropriate only with a single dimensional array. Can 
someone suggest a more elegant solution? Thanks, Rich
P.S. yes, I am fairly new to PHP, less than 6 months. Probably my array loading method 
could be improved also!





Re: [PHP] Problem about rpm package of php

2002-08-19 Thread EdwardSPL

So, which command that you recommend to run ?

Adam Williams wrote:

> If memory serves me right, -ba builds the binary and source rpms, and -bb
> only builds the binary rpm.
>
> Adam
>
> On Mon, 19 Aug 2002 [EMAIL PROTECTED] wrote:
>
> > Adam Williams wrote:
> >
> > > If I haven't responded too late, Install the SRPM package with rpm -ivh
> > > file.srpm or file.src.rpm and then do to the SPECS directory.  In RedHat's
> > > case it is /usr/src/redhat/SPECS and look for something like mod_php.spec
> > > or php.spec and edit it.  That file has a paramaters it passes to
> > > configure script, so add to it a --with-imap and then save the file, and
> > > then run rpm -bb mod_php.spec (or whatever the name of it is) and then it
> > > will build the binary rpm in /usr/src/redhat/RPMS/i386 and you simply rpm
> > > -Uvh it.
> > >
> > > Adam
> >
> > What different between rpm -bb file.spec and rpm -ba file.spec ?
> > Because some of users told me to run -ba file.spec...
> >
> > Thank a lots.



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




RE: [PHP] Multidimensional arrays

2002-08-19 Thread Jay Blanchard

[snip]
  $query =  "SELECT id,name FROM MYTABLE";
  $result = mysql_query($query);
  $nrows = mysql_num_rows($result);
  for ($i=0; $i<$nrows; $i++) {
 $arr = mysql_fetch_array($result);
 $array[$i]['id']   = $arr['id'];
 $array[$i]['name'] = $arr['name'];
 }

I know I can have a similar 'for' loop to step through the array, from 0 to
count($array)
But I would like to do something more elegant, with a foreach loop. But I
have been unsuccessful as a foreach seems appropriate only with a single
dimensional array. Can someone suggest a more elegant solution? Thanks, Rich
[/snip]

That is kind of an ambiguos question there Rich. What needs to be more
elegant, the method? the output? You could use a foreach key/value pairing
if your values are such. See
http://www.php.net/manual/en/control-structures.foreach.php

HTH!

Jay

If you must choose between two evils, pick the one you’ve never tried
before!

***
* Texas PHP Developers Conf  Spring 2003  *
* T Bar M Resort & Conference Center  *
* New Braunfels, Texas*
* San Antonio Area PHP Developers Group   *
* Interested? Contact [EMAIL PROTECTED] *
***



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




Re: [PHP] Multidimensional arrays

2002-08-19 Thread Rasmus Lerdorf

foreach($array as $i=>$values) {
  echo $values['id'],$values['name']
}

On Mon, 19 Aug 2002, Richard Fox wrote:

> Hi,
>
> Given the array $array initialized by:
>
>   $query =  "SELECT id,name FROM MYTABLE";
>   $result = mysql_query($query);
>   $nrows = mysql_num_rows($result);
>   for ($i=0; $i<$nrows; $i++) {
>  $arr = mysql_fetch_array($result);
>  $array[$i]['id']   = $arr['id'];
>  $array[$i]['name'] = $arr['name'];
>  }
>
> I know I can have a similar 'for' loop to step through the array, from 0 to 
>count($array)
> But I would like to do something more elegant, with a foreach loop. But I have been 
>unsuccessful as a foreach seems appropriate only with a single dimensional array. Can 
>someone suggest a more elegant solution? Thanks, Rich
> P.S. yes, I am fairly new to PHP, less than 6 months. Probably my array loading 
>method could be improved also!
>
>
>


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




RE: [PHP] A quick question - Help Please !

2002-08-19 Thread Dan McCullough

I have to send a form with a whole bunch of hidden fields and form fields to the 
remote server.  I
have tried sending via CURL, until I remembered that they still have to input the cc 
information,
so that was out, and then I tried doing PHP_SELF and then if the $submit then send 
email and do a
header("Location :  redirect to the payment process with name value pairs");  for some 
reason it
either didnt like the name value or it couldnt see that the form was being submitted 
from
order.php.

--- "Trout, Travis" <[EMAIL PROTECTED]> wrote:
> When you submit, does the form call a php self function or are you calling a
> file on the remote server? If you are doing either, why not just call
> another php file on you local server to where you can FIRST send your email
> and THEN send your info to the remote server? What options do you have for
> sending the information to the remote server?
> 
> Travis Trout
> 
> 
> 
> -Original Message-
> From: Adrian Murphy [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 19, 2002 10:48 AM
> To: Dan McCullough; PHP General List
> Subject: Re: [PHP] A quick question - Help Please !
> 
> 
> to do it with javascript u could post the form to
> another local page with a form with hidden fields -
> send the mail and use onload="" to post the second form.
> would be a messy way to do it but would work.
> 
> adrian murphy
> - Original Message -
> From: "Justin French" <[EMAIL PROTECTED]>
> To: "Dan McCullough" <[EMAIL PROTECTED]>; "PHP General List"
> <[EMAIL PROTECTED]>
> Sent: Monday, August 19, 2002 3:09 PM
> Subject: Re: [PHP] A quick question - Help Please !
> 
> 
> > That's REALLY strange that the payment site doesn't return anything...  So
> > the user just hits a dead-end or what?  Can we see a test site?
> >
> > And the fact that it all needs to be secure makes it a little more
> > challenging.
> >
> > Essentially, what you need is for one form to POST to two separate
> > scripts... one local, and one on another server.  My thoughts are that
> you'd
> > need to POST to a local script which produces the email AND THEN submits
> > info to the merchant.
> >
> > But the fact that this probably needs to be done:
> > a) with POST
> > b) with SSL
> >
> > Will prolly make it very tricky.  Search the archives for "emulating POST"
> > or "faking POST", because I know it's been discussed before.
> >
> >
> > Yes, you probably CAN do it with javascript, but I'm not sure I'd be
> > comfortable relying on it AT ALL -- if it doesn't exist, then your site
> > breaks -- either the email or the merchant stuff will break if you rely on
> > JS.
> >
> >
> > Justin French
> >
> >
> > on 19/08/02 11:54 PM, Dan McCullough ([EMAIL PROTECTED]) wrote:
> >
> > > Hello everyone,
> > >
> > > I have a quick question.
> > >
> > > I am trying to do two seperate things on one submission, it would be
> easy if I
> > > was submitting to
> > > my own page, but I am submitting to a payment processor company, and so
> > > several things will occur
> > > off-site, and there is nothing that comes back from the payment
> processor when
> > > then payment is
> > > made so I can't handle it on the return.  And so what I am doing now is
> when
> > > you land on the page
> > > to confirm that you want to place the order an email is created and sent
> to
> > > the owner, I would
> > > like that to only get sent when the submit button is clicked .. and yes
> I have
> > > tried onSubmit with
> > > it calling my php function.
> > >
> > > Any thoughts?
> > >
> > > thanks,
> > >
> > > dan
> > >
> > > __
> > > Do You Yahoo!?
> > > HotJobs - Search Thousands of New Jobs
> > > http://www.hotjobs.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
> 


=

"Theres no such thing as a problem unless the servers are on fire!"


__
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

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




RE: [PHP] Old PHP files not working

2002-08-19 Thread @ Edwin
It seems like if you "turn on" register_globals in php.ini, everything 
might just work... but, it's strange because you said that if you type 
everything exactly as they were in the new server everything works! 
Strange...

Anyway, why not try it this way. Don't turn register_globals on (you 
shouldn't anyway). Then, edit your scripts to comply with the "new way of 
doing things". For example, instead of 

  if ($var){
  }

You'll write

  if ($_GET['var']){
  }

or,

  if ($_POST['var']){
  }

Well, if I think that's how it should be--if I'm not mistaken...

- E

>
>Here is the code since it doesn't look like attachments work here...
>
>
>include ("header.php");
>include ("config.php");
>
>if ($search) {
>
>
>
>   // process form
>
>
>
>
>if ($sort == ""){
>  $sort = "lname";
>}
>
>do {
>
>  if ($fname == '' && $lname == '' && $dept_pulldown == '') {
>echo "You must enter a last name, first name or select a
>department
> Home";
>include ("footer.php");
>exit;
>
>  } //end if
>
>   if ($fname != '' && $lname == '' && $dept_pulldown != '' && 
$dept_pulldown
>!= 'all') {  // First name only query
>
> $sql = "Select * from emp_numbers where fname = '$fname' && dept =
>'$dept_pulldown' order by $sort";  // with dept
> break;
> } elseif ($fname != '' && $lname == '' && $dept_pulldown == '') {
>  $sql = "Select * from emp_numbers where fname = '$fname' order by
>$sort";  // without dept break;
>  } elseif ($fname != '' && $lname == '' && $dept_pulldown == 'all') {
>   $sql = "Select * from emp_numbers where fname = '$fname' order by
>$sort";  // with all depts
>   break;
>   } // end if
>
>if ($fname == '' && $lname != '' && $dept_pulldown != '' &&
>$dept_pulldown != 'all') {  // Last name only query
>
> $sql = "Select * from emp_numbers where lname = '$lname' && dept =
>'$dept_pulldown' order by $sort";  // with dept
> break;
> } elseif ($fname == '' && $lname != '' && $dept_pulldown == '') {
>  $sql = "Select * from emp_numbers where lname = '$lname' order by
>$sort";  // without dept
>  break;
>  } elseif ($fname == '' && $lname != '' && $dept_pulldown == 'all') {
>   $sql = "Select * from emp_numbers where lname = '$lname' order by
>$sort";  // with all depts
>   break;
>} // end if
>
> if ($fname != '' && $lname != '' && $dept_pulldown != '' &&
>$dept_pulldown != 'all') {  // Both names query
>  $sql = "Select * from emp_numbers where fname = '$fname' && lname =
>'$lname' && dept = '$dept_pulldown' order by $sort";  // with dept
>  break;
>  } elseif ($fname != '' && $lname != '' && $dept_pulldown == '') {
>   $sql = "Select * from emp_numbers where fname = '$fname' && lname =
>'$lname' order by $sort";  // without dept
>   break;
>   } elseif ($fname != '' && $lname != '' && $dept_pulldown == 'all') 
{
>$sql = "Select * from emp_numbers where fname = '$fname' && lname 
=
>'$lname' order by $sort";  // with all depts
>break;
> } // end if
>
>  if ($fname == '' && $lname == '' && $dept_pulldown != '' &&
>$dept_pulldown != 'all') {  // Deptartment only query
>   $sql = "Select * from emp_numbers where dept = '$dept_pulldown' 
order
>by $sort";
>   break;
>  } // end if
>
>   if ($fname == '' && $lname == '' && $dept_pulldown == 'all') {
>$sql = "Select * from emp_numbers order by $sort";  // Query 
everyone
>break;
>   } //end if
>
>
>} while(0);
>
>
>
>  // Query results
>
>  $db = mysql_connect($dbhost, $dbuname, $dbpass) or die("Can't connect to
>server.");
>  mysql_select_db("$dbname", $db) or die("Can't select database.");
>
>  $result = mysql_query($sql) or die("Bad SQL Statement!$sql");
>  $nrows  = mysql_num_rows($result);
>
>  if ($nrows == 0) {
>   echo "Sorry, no records found.href=\"/\">Home";
>  } else{
>
>
>
>  // Display results
>
>  echo "
>   Total Found: $nrows
>   Home
>   
>   bgcolor=00>
>   
> 
>   Name
>   Work
>   Home
>   Cell
>   Pager
>   Department
> 
> ";
>
>
>   while ($myrow = mysql_fetch_row($result)) {
>if ($sort == "lname" || $sort == "dept"){
>
>printf("%s, %s
>%s
>%s
>%s
>%s
>%s
>\n", $myrow[2], $myrow[3], $myrow[4], $myrow[5], $myrow[6],
>$myrow[7], $myrow[1]);
>
>
>  } else {
>
>printf("%s %s
>%s
>%s
>%s
>%s
>%s
>\n", $myrow[3], $myrow[2], $myrow[4], $myrow[5], $myrow[6],
>$myrow[7], $myrow[1]);
>
>} //end if
>   } //end while
>
>  echo "
>   
> 
>Home";
>
>  } // End if
>
>
>} else{
>
>
>
>
>
>   // display form
>
>
>
>?>
>
>
>   
> 
>   
> 
>   size="+1">Search
> Phone Numbers
> 
> 
>http://192.9.201.104/index.php
> ">
>   First Name:
>   name="fname">
> 
> 
>   Last Name:
>   name="lname">
> 
>   

[PHP] FUNCTIONS

2002-08-19 Thread Georgie Casey

i wrote a function do write a file for me on info taken from a db, and wrote
a script with a for loop going through every row in the db, and calling the
function. so the function is called about 200 times. but i'm getting weird
results, the files are corrupted. its grand when i just go one at a time. so
i'm assuming variable values must have been left set from the las for loop.
so how do i clear ALL variables in the function??

TANX



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




Re: [PHP] Problem about rpm package of php

2002-08-19 Thread Adam Williams

I'd run -bb but the -ba will work just fine, you'll just delete the
src.rpm it builds because you won't need it.

Adam

On Tue, 20 Aug 2002 [EMAIL PROTECTED] wrote:

> So, which command that you recommend to run ?
>
> Adam Williams wrote:
>
> > If memory serves me right, -ba builds the binary and source rpms, and -bb
> > only builds the binary rpm.
> >
> > Adam
> >
> > On Mon, 19 Aug 2002 [EMAIL PROTECTED] wrote:
> >
> > > Adam Williams wrote:
> > >
> > > > If I haven't responded too late, Install the SRPM package with rpm -ivh
> > > > file.srpm or file.src.rpm and then do to the SPECS directory.  In RedHat's
> > > > case it is /usr/src/redhat/SPECS and look for something like mod_php.spec
> > > > or php.spec and edit it.  That file has a paramaters it passes to
> > > > configure script, so add to it a --with-imap and then save the file, and
> > > > then run rpm -bb mod_php.spec (or whatever the name of it is) and then it
> > > > will build the binary rpm in /usr/src/redhat/RPMS/i386 and you simply rpm
> > > > -Uvh it.
> > > >
> > > > Adam
> > >
> > > What different between rpm -bb file.spec and rpm -ba file.spec ?
> > > Because some of users told me to run -ba file.spec...
> > >
> > > Thank a lots.
>
>
>
>


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




RE: [PHP] FUNCTIONS

2002-08-19 Thread Jay Blanchard

[snip]
i wrote a function do write a file for me on info taken from a db, and wrote
a script with a for loop going through every row in the db, and calling the
function. so the function is called about 200 times. but i'm getting weird
results, the files are corrupted. its grand when i just go one at a time. so
i'm assuming variable values must have been left set from the las for loop.
so how do i clear ALL variables in the function??
[/snip]

What do you mean by "corrupted"? It should be simple;

Open the file
  while file open
read a record from the database into the file
  when no more records
close file

Maybe you need to place a proper newline character at the end of each record
or something like that. Can we have some more information to go on?

Thanks!

Jay

***
* Texas PHP Developers Conf  Spring 2003  *
* T Bar M Resort & Conference Center  *
* New Braunfels, Texas*
* San Antonio Area PHP Developers Group   *
* Interested? Contact [EMAIL PROTECTED] *
***



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




RE: [PHP] FUNCTIONS

2002-08-19 Thread MET

In the top of the loop, before you set the variables from the database
do this.

unset($variable);

OR

$variable = "";

Either will do.

~ Matthew

-Original Message-
From: Georgie Casey [mailto:[EMAIL PROTECTED]] 
Sent: Monday, August 19, 2002 10:30 AM
To: [EMAIL PROTECTED]
Subject: [PHP] FUNCTIONS


i wrote a function do write a file for me on info taken from a db, and
wrote a script with a for loop going through every row in the db, and
calling the function. so the function is called about 200 times. but i'm
getting weird results, the files are corrupted. its grand when i just go
one at a time. so i'm assuming variable values must have been left set
from the las for loop. so how do i clear ALL variables in the function??

TANX



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

2002-08-19 Thread Georgie Casey

yea, but what about varibales in the actual function??
"Met" <[EMAIL PROTECTED]> wrote in message
003c01c2479f$ee948c40$6901a8c0@SURVIVAL">news:003c01c2479f$ee948c40$6901a8c0@SURVIVAL...
> In the top of the loop, before you set the variables from the database
> do this.
>
> unset($variable);
>
> OR
>
> $variable = "";
>
> Either will do.
>
> ~ Matthew
>
> -Original Message-
> From: Georgie Casey [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 19, 2002 10:30 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] FUNCTIONS
>
>
> i wrote a function do write a file for me on info taken from a db, and
> wrote a script with a for loop going through every row in the db, and
> calling the function. so the function is called about 200 times. but i'm
> getting weird results, the files are corrupted. its grand when i just go
> one at a time. so i'm assuming variable values must have been left set
> from the las for loop. so how do i clear ALL variables in the function??
>
> TANX
>
>
>
> --
> 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] FUNCTIONS

2002-08-19 Thread Georgie Casey

its supposed to write a MIDI file from some music notes, the start of the
MIDI file is grand but the end has some of the MIDI from the next database
record!



"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
002e01c2479f$1dbf6590$8102a8c0@000347D72515">news:002e01c2479f$1dbf6590$8102a8c0@000347D72515...
> [snip]
> i wrote a function do write a file for me on info taken from a db, and
wrote
> a script with a for loop going through every row in the db, and calling
the
> function. so the function is called about 200 times. but i'm getting weird
> results, the files are corrupted. its grand when i just go one at a time.
so
> i'm assuming variable values must have been left set from the las for
loop.
> so how do i clear ALL variables in the function??
> [/snip]
>
> What do you mean by "corrupted"? It should be simple;
>
> Open the file
>   while file open
> read a record from the database into the file
>   when no more records
> close file
>
> Maybe you need to place a proper newline character at the end of each
record
> or something like that. Can we have some more information to go on?
>
> Thanks!
>
> Jay
>
> ***
> * Texas PHP Developers Conf  Spring 2003  *
> * T Bar M Resort & Conference Center  *
> * New Braunfels, Texas*
> * San Antonio Area PHP Developers Group   *
> * Interested? Contact [EMAIL PROTECTED] *
> ***
>
>



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




Re: [PHP] Re: Passing a PHP variable to javascript

2002-08-19 Thread Pag


Hi, i am coding a news manager backend for a client and i ran into a 
little problem.

I have two tables, one with the news and one with the comments on each news.

How can i count how many comments there are for each news entry? Simply 
put, is there some sort of Mysql command query that can count how many 
records exist with a given field content?
Example:

Count on a database how many "peter"s there are in there?

Is there a specific SQL select or something, or i have to make a loop just 
to count them?

Thanks.

/Pag



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




Re: [PHP] FUNCTIONS

2002-08-19 Thread Jason Wong

On Monday 19 August 2002 22:51, Georgie Casey wrote:
> its supposed to write a MIDI file from some music notes, the start of the
> MIDI file is grand but the end has some of the MIDI from the next database
> record!

Instead of keeping us guessing and indulging in idle speculation as to what 
your problem might be, please post your code.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
If you can't get your work done in the first 24 hours, work nights.
*/


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




Re: [PHP] Re: Passing a PHP variable to javascript

2002-08-19 Thread Adam Williams

Look up on www.mysql.com documentation, you can do a count within a select
statement

SELECT whatever COUNT(whatever) AS COUNT FROM table GROUP BY 'something'
HAVING something = 'something'

--
| whatever   | count |
--
| stuff selected |50 |
--

Adam

On Mon, 19 Aug 2002, Pag wrote:

>
>   Hi, i am coding a news manager backend for a client and i ran into a
> little problem.
>
>   I have two tables, one with the news and one with the comments on each news.
>
>   How can i count how many comments there are for each news entry? Simply
> put, is there some sort of Mysql command query that can count how many
> records exist with a given field content?
>   Example:
>
>   Count on a database how many "peter"s there are in there?
>
>   Is there a specific SQL select or something, or i have to make a loop just
> to count them?
>
>   Thanks.
>
>   /Pag
>
>
>
>


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




[PHP] A Doubt!

2002-08-19 Thread Thiruvelraj Pokkishamani



  Sir,
 I am using Windows 2000 server, and i use IIS 4.0 as the 
server and i have done many php scriptings and everything works 
fine and i done have any problem regarding this.

 And i want to send mail to the visitors of this site .
for that purpose i use mail() and if i click send button i receive 
"server error in D:\inetpub\wwwroot\test\sendmail.php" .
i have tried many scripts and i receive this error.

 Some  says that i want to configure the server ,
how to configure and just iam a beginner to this PHP.
if u help me it could b fine for me to finish this project.

Xpecting ur mail.

 Yours Thankingly
  Thiruvelraj





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




[PHP] User data validation

2002-08-19 Thread Steven

After searching Google, reading the PHP manual, PHP mailing list archives,
looking for clues on SANS and Security Focus, I have yet to find an answer
to my question.

I have a section in a form for a user to enter comments and or questions.
What should I be checking for, from a security standpoint, with my PHP
script? The information will be both inserted into a database (MySQL) and
sent via email.

I have found examples for items such as phone numbers, addresses, email,
etc., but nothing in regards to comments.

Any direction would be greatly appreciated.

Thank you,
Steven


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




Re: [PHP] User data validation

2002-08-19 Thread Rasmus Lerdorf

No checks are needed.  PHP automatically escapes single quotes for MySQL
queries assuming you have magic_quotes_gpc on, which means that if you
want to send the same thing by email using PHP's mail() function you just
have to call stripslashes() on the data.  There are no magical characters
that will let someone escape out of either scenario.

-Rasmus

On Mon, 19 Aug 2002, Steven wrote:

> After searching Google, reading the PHP manual, PHP mailing list archives,
> looking for clues on SANS and Security Focus, I have yet to find an answer
> to my question.
>
> I have a section in a form for a user to enter comments and or questions.
> What should I be checking for, from a security standpoint, with my PHP
> script? The information will be both inserted into a database (MySQL) and
> sent via email.
>
> I have found examples for items such as phone numbers, addresses, email,
> etc., but nothing in regards to comments.
>
> Any direction would be greatly appreciated.
>
> Thank you,
> Steven
>
>
> --
> 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] ************ SSL Support *****************

2002-08-19 Thread Ron Stagg

>From within a PHP script, I need to initiate a secure HTTPS form POST
from my Apache server to a separate third party server.  I have yet to
figure out how to accomplish this.  Can PHP even handle something like
this?
 
I welcome any advice.
 
Thanks,
 
Ron



Re: [PHP] ************ SSL Support *****************

2002-08-19 Thread Rasmus Lerdorf

php.net/curl

On Mon, 19 Aug 2002, Ron Stagg wrote:

> >From within a PHP script, I need to initiate a secure HTTPS form POST
> from my Apache server to a separate third party server.  I have yet to
> figure out how to accomplish this.  Can PHP even handle something like
> this?
>
> I welcome any advice.
>
> Thanks,
>
> Ron
>


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




RE: [PHP] A Doubt!

2002-08-19 Thread Brian V Bonini

So formal ;-)

How about posting your sendmail.php file and also have a look at
http://www.php.net/manual/en/ref.mail.php for more information about using
the mail function with windows.

> -Original Message-
> From: Thiruvelraj Pokkishamani [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 19, 2002 12:56 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] A Doubt!
>
>
>
>
>   Sir,
>  I am using Windows 2000 server, and i use IIS 4.0 as the
> server and i have done many php scriptings and everything works
> fine and i done have any problem regarding this.
>
>  And i want to send mail to the visitors of this site .
> for that purpose i use mail() and if i click send button i receive
> "server error in D:\inetpub\wwwroot\test\sendmail.php" .
> i have tried many scripts and i receive this error.
>
>  Some  says that i want to configure the server ,
> how to configure and just iam a beginner to this PHP.
> if u help me it could b fine for me to finish this project.
>
> Xpecting ur mail.
>
>  Yours Thankingly
>   Thiruvelraj
>
>
>
>
>
> --
> 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] variables not behaving as expected

2002-08-19 Thread ROBERT MCPEAK

We've recently upgraded to PHP version 4.2.2 running on SuSE 7.2 with
the 2.4.4 kernel and I'm seeing variables behave in a way I didn't
expect.  With the prior configuration http post variables were freely
available on the receiving page, but now, for some reason, they aren't.
 
This code:

foreach ($_POST as $key => $post)
{
echo "$key = $post";
$key = $post;   
}
echo "";
echo "do = $do";

renders this result:

do = addart
display_date = date
art_time = time
art_url = url
art_link = link
src_link = link
src_url = url

do = 


Why is the $do variable null outside of the for loop?  Shouldn't it
equal "addart?" Shouldn't it be available anywhere on the page?  With
the previous configuration the http post variables were available
anywhere on the page.  Is this a php configuration issue?

Thanks!





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




RE: [PHP] variables not behaving as expected

2002-08-19 Thread MET

Read this.

http://www.php.net/release_4_2_0.php

~ Matthew

-Original Message-
From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]] 
Sent: Monday, August 19, 2002 1:59 PM
To: [EMAIL PROTECTED]
Subject: [PHP] variables not behaving as expected


We've recently upgraded to PHP version 4.2.2 running on SuSE 7.2 with
the 2.4.4 kernel and I'm seeing variables behave in a way I didn't
expect.  With the prior configuration http post variables were freely
available on the receiving page, but now, for some reason, they aren't.
 
This code:

foreach ($_POST as $key => $post)
{
echo "$key = $post";
$key = $post;   
}
echo "";
echo "do = $do";

renders this result:

do = addart
display_date = date
art_time = time
art_url = url
art_link = link
src_link = link
src_url = url


do = 


Why is the $do variable null outside of the for loop?  Shouldn't it
equal "addart?" Shouldn't it be available anywhere on the page?  With
the previous configuration the http post variables were available
anywhere on the page.  Is this a php configuration issue?

Thanks!





-- 
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] variables not behaving as expected

2002-08-19 Thread Joseph W. Goff

You don't actually have a variable named $do at this point.
You can either have php set this variable automatically by turning on
register globals in the php.ini file or you can extract the variable or do
something like this:
foreach ($_POST as $key => $post)
{
echo "$key = $post";
$$key = $post;
 }

- Original Message -
From: "ROBERT MCPEAK" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 19, 2002 12:58 PM
Subject: [PHP] variables not behaving as expected


> We've recently upgraded to PHP version 4.2.2 running on SuSE 7.2 with
> the 2.4.4 kernel and I'm seeing variables behave in a way I didn't
> expect.  With the prior configuration http post variables were freely
> available on the receiving page, but now, for some reason, they aren't.
>
> This code:
>
> foreach ($_POST as $key => $post)
> {
> echo "$key = $post";
> $key = $post;
> }
> echo "";
> echo "do = $do";
>
> renders this result:
>
> do = addart
> display_date = date
> art_time = time
> art_url = url
> art_link = link
> src_link = link
> src_url = url
> --
--
> do =
>
>
> Why is the $do variable null outside of the for loop?  Shouldn't it
> equal "addart?" Shouldn't it be available anywhere on the page?  With
> the previous configuration the http post variables were available
> anywhere on the page.  Is this a php configuration issue?
>
> Thanks!
>
>
>
>
>
> --
> 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] array_unique & multi-dimensional arrays

2002-08-19 Thread sasha

I am trying to clean up some junky code in a journal/news type 
script and redoing the archive navigation.  I am pulling all of 
the dates of the entries and pushing it into a multi-
dimensional array like so:

array_push($archive_nav, array(month => $month, year => $year, 
longmonth => $longmonth));

I assumed I could just use array_unique to filter out all of 
the duplicates in the array.  But it doesn't seem to work that 
way, and the only month/year combo I end up with is the very 
oldest one (according to year/month) in the array.

$archive_nav = array_unique($archive_nav);

If I leave out array_unique, I am getting all of the 
appropriate month/year combos in my script while doing a 
foreach... just one for every single entry in the database for 
that combo (which is a lot in some cases!).

Is there a better way to do this?

sasha



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




[PHP] Re: A Doubt!

2002-08-19 Thread Kondwani Spike Mkandawire


"Thiruvelraj Pokkishamani" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
>
>   Sir,
>  I am using Windows 2000 server, and i use IIS 4.0 as the
> server and i have done many php scriptings and everything works
> fine and i done have any problem regarding this.
>
>  And i want to send mail to the visitors of this site .
> for that purpose i use mail() and if i click send button i receive
> "server error in D:\inetpub\wwwroot\test\sendmail.php" .
> i have tried many scripts and i receive this error.
>
>  Some  says that i want to configure the server ,
> how to configure and just iam a beginner to this PHP.
> if u help me it could b fine for me to finish this project.
>
> Xpecting ur mail.
>
>  Yours Thankingly
>   Thiruvelraj


If you have tested the same script on a different Server it may
just be an issue of the fact that IIS and PHP are not the greatest
of combos...  My scripts tested on my localhost running Apache
usually give me problems when I transfer them to an IIS Server
(particularly 4.0)...  They generate error messages but have
the expected functionality if this is the case with your Script
stick in some @ symbols like so:

echo @"Whatever I want to print out
if variables are returned as undefined within
this echo statement";
$something = @$somethingElse;

If the functionality is not as expected then it could probably be
something else and it would really help if you posted sections of
your script which you suspect to cause the errors...

Spike...



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




Re: [PHP] A Doubt!

2002-08-19 Thread Andrew Brampton

In the php.ini file there is somewhere to set the smtp server to use if you
don't have sendmail... Look for that and that might help

Andrew
- Original Message -
From: "Thiruvelraj Pokkishamani" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 19, 2002 5:55 PM
Subject: [PHP] A Doubt!


>
>
>   Sir,
>  I am using Windows 2000 server, and i use IIS 4.0 as the
> server and i have done many php scriptings and everything works
> fine and i done have any problem regarding this.
>
>  And i want to send mail to the visitors of this site .
> for that purpose i use mail() and if i click send button i receive
> "server error in D:\inetpub\wwwroot\test\sendmail.php" .
> i have tried many scripts and i receive this error.
>
>  Some  says that i want to configure the server ,
> how to configure and just iam a beginner to this PHP.
> if u help me it could b fine for me to finish this project.
>
> Xpecting ur mail.
>
>  Yours Thankingly
>   Thiruvelraj
>
>
>
>
>
> --
> 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] Clear Cache or Ctrl-F5 equivalent

2002-08-19 Thread Syl

How do I refresh the cache -- i.e. send the equivalent of a Cntrl-F5 for MS
IE -- when I use fopen(http ) so that I can get the latest update of the
page I wish to open?

 Syl



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




[PHP] Looking for Calender System

2002-08-19 Thread ST

I am looking to implement a calender for a multi-user system.
I came across one called webcalendar on sourceforge
http://webcalendar.sourceforge.net/

Can anyone recommend any others?

It has to be multiuser and hopefully it can fit into the rest of my
existing system

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




[PHP] +=

2002-08-19 Thread Alexander Ross

Is there a += equivilant for strings??

$string = "Hello";
$string += "world.";

I know that
  $string = $string." world.";
would work, but I keep having to do it.  Is there a shortcut?



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




RE: [PHP] +=

2002-08-19 Thread Jay Blanchard

.=

-Original Message-
From: Alexander Ross [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 2:22 PM
To: [EMAIL PROTECTED]
Subject: [PHP] +=


Is there a += equivilant for strings??

$string = "Hello";
$string += "world.";

I know that
  $string = $string." world.";
would work, but I keep having to do it.  Is there a shortcut?



-- 
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] +=

2002-08-19 Thread Daniel Kushner

$string = 'Hello';
$string .= ' World';

Regards,
Daniel Kushner
_
Need hosting? http://www.thehostingcompany.us




> -Original Message-
> From: Alexander Ross [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 19, 2002 3:22 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] +=
> 
> 
> Is there a += equivilant for strings??
> 
> $string = "Hello";
> $string += "world.";
> 
> I know that
>   $string = $string." world.";
> would work, but I keep having to do it.  Is there a shortcut?
> 
> 
> 
> -- 
> 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] +=

2002-08-19 Thread Adam Williams

$string .= "world.";

Adam

On Mon, 19 Aug 2002, Alexander Ross wrote:

> Is there a += equivilant for strings??
>
> $string = "Hello";
> $string += "world.";
>
> I know that
>   $string = $string." world.";
> would work, but I keep having to do it.  Is there a shortcut?
>
>
>
>


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




[PHP] include() from another sub-domain

2002-08-19 Thread Greg Macek

Hello,

I've searched the list and the manual and am still a bit confused.
Here's what I'd like to do. We have a bunch of internal sites that all
use the same username/password. One is already setup with a function to
authenticate this to a database. However, each login page is coming from
a different sub-domain, such as site1.mydomain.com. The login functions
resides in a PHP file on site2.mydomain.com. So it does this:

http://site2.mydomain.com/functions.php";);

if (loginUser($username,$password)) {
// do stuff here
// redirect
}
else { ... }

?>

Right now my local script doesn't find the function I'm trying to use.
What am I missing here? Is it not possible to include a php file (and
its functions and variables) across domains? 

- Greg



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




Re: [PHP] include() from another sub-domain

2002-08-19 Thread Rasmus Lerdorf

If these domains are on the same physical server, include them directly
via the full filesystem path.  If they are actually on different physical
machines, you will need to configure those other machines to let you get
the non-parsed PHP code through them.  Your problam right now is that the
site2.mydomain.com machine is executing the PHP and only giving you the
parsed result.  You need to configure Apache to not parse the file with
PHP when requested by your script.

-Rasmus

On 19 Aug 2002, Greg Macek wrote:

> Hello,
>
> I've searched the list and the manual and am still a bit confused.
> Here's what I'd like to do. We have a bunch of internal sites that all
> use the same username/password. One is already setup with a function to
> authenticate this to a database. However, each login page is coming from
> a different sub-domain, such as site1.mydomain.com. The login functions
> resides in a PHP file on site2.mydomain.com. So it does this:
>
>  // This page on site1.mydomain.com
>
> include ("http://site2.mydomain.com/functions.php";);
>
> if (loginUser($username,$password)) {
>   // do stuff here
>   // redirect
> }
> else { ... }
>
> ?>
>
> Right now my local script doesn't find the function I'm trying to use.
> What am I missing here? Is it not possible to include a php file (and
> its functions and variables) across domains?
>
> - Greg
>
>
>
> --
> 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] include() from another sub-domain

2002-08-19 Thread Greg Macek

Well, that would make sense. Now is this something I need to configure
in the Apache or the PHP config file? 

On Mon, 2002-08-19 at 14:27, Rasmus Lerdorf wrote:
> If these domains are on the same physical server, include them directly
> via the full filesystem path.  If they are actually on different physical
> machines, you will need to configure those other machines to let you get
> the non-parsed PHP code through them.  Your problam right now is that the
> site2.mydomain.com machine is executing the PHP and only giving you the
> parsed result.  You need to configure Apache to not parse the file with
> PHP when requested by your script.
> 
> -Rasmus
> 
> On 19 Aug 2002, Greg Macek wrote:
> 
> > Hello,
> >
> > I've searched the list and the manual and am still a bit confused.
> > Here's what I'd like to do. We have a bunch of internal sites that all
> > use the same username/password. One is already setup with a function to
> > authenticate this to a database. However, each login page is coming from
> > a different sub-domain, such as site1.mydomain.com. The login functions
> > resides in a PHP file on site2.mydomain.com. So it does this:
> >
> >  > // This page on site1.mydomain.com
> >
> > include ("http://site2.mydomain.com/functions.php";);
> >
> > if (loginUser($username,$password)) {
> > // do stuff here
> > // redirect
> > }
> > else { ... }
> >
> > ?>
> >
> > Right now my local script doesn't find the function I'm trying to use.
> > What am I missing here? Is it not possible to include a php file (and
> > its functions and variables) across domains?
> >
> > - Greg
> >
> >
> >
> > --
> > 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] User data validation

2002-08-19 Thread Randy Johnson

I have a proccess where a user submits the data, data is run through checks,
validation etc , then stored in a session.   then the user goes to
confirmation page where they hit submit to verify the details are correct.
when they hit submit they go to another script that pulls the session
variables.

My question is:  should i run the data through validation again or can i be
assured that the data is a ok because it was already validated ,stored in a
session and then pulled from a session.



Randy



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




Re: [PHP] include() from another sub-domain

2002-08-19 Thread Rasmus Lerdorf

Apache

On 19 Aug 2002, Greg Macek wrote:

> Well, that would make sense. Now is this something I need to configure
> in the Apache or the PHP config file?
>
> On Mon, 2002-08-19 at 14:27, Rasmus Lerdorf wrote:
> > If these domains are on the same physical server, include them directly
> > via the full filesystem path.  If they are actually on different physical
> > machines, you will need to configure those other machines to let you get
> > the non-parsed PHP code through them.  Your problam right now is that the
> > site2.mydomain.com machine is executing the PHP and only giving you the
> > parsed result.  You need to configure Apache to not parse the file with
> > PHP when requested by your script.
> >
> > -Rasmus
> >
> > On 19 Aug 2002, Greg Macek wrote:
> >
> > > Hello,
> > >
> > > I've searched the list and the manual and am still a bit confused.
> > > Here's what I'd like to do. We have a bunch of internal sites that all
> > > use the same username/password. One is already setup with a function to
> > > authenticate this to a database. However, each login page is coming from
> > > a different sub-domain, such as site1.mydomain.com. The login functions
> > > resides in a PHP file on site2.mydomain.com. So it does this:
> > >
> > >  > > // This page on site1.mydomain.com
> > >
> > > include ("http://site2.mydomain.com/functions.php";);
> > >
> > > if (loginUser($username,$password)) {
> > >   // do stuff here
> > >   // redirect
> > > }
> > > else { ... }
> > >
> > > ?>
> > >
> > > Right now my local script doesn't find the function I'm trying to use.
> > > What am I missing here? Is it not possible to include a php file (and
> > > its functions and variables) across domains?
> > >
> > > - Greg
> > >
> > >
> > >
> > > --
> > > 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] User data validation

2002-08-19 Thread Rasmus Lerdorf

You do not need to revalidate.  The data is not coming from the user.

On Mon, 19 Aug 2002, Randy Johnson wrote:

> I have a proccess where a user submits the data, data is run through checks,
> validation etc , then stored in a session.   then the user goes to
> confirmation page where they hit submit to verify the details are correct.
> when they hit submit they go to another script that pulls the session
> variables.
>
> My question is:  should i run the data through validation again or can i be
> assured that the data is a ok because it was already validated ,stored in a
> session and then pulled from a session.
>
>
>
> Randy
>
>


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




[PHP] php/shell/permissions problems....

2002-08-19 Thread Kelly Meeks

Hopefully I can explain this properly

I've got a php form, that gathers certain information, and then passes that info on to 
a couple of shell scripts to move files around, create links, import data into some 
mysql databases via sql files, etc.

The two shell scripts work fine when I'm logged in as root via telnet.  The 
consistently don't work from my website.  I know it must be a permissions problem, but 
I'm still a relative newbie relative to linux/permissions, and would appreciate any 
guidance in resolving it.

Couple of questions:

In running a shell script, is there any way to change the userlevel when executing 
that script?  I've got one website that largely needs to control aspects of another.  
I need to change chmod levels, and change chown levels.

Would one solution be to make the users of the respective sites be part of the same 
user group?

Thanks in advance,

Kelly



RE: [PHP] php/shell/permissions problems....

2002-08-19 Thread David Freeman


 > I've got a php form, that gathers certain information, and 
 > then passes that info on to a couple of shell scripts to 
 > move files around, create links, import data into some mysql 
 > databases via sql files, etc.
 > 
 > The two shell scripts work fine when I'm logged in as root 
 > via telnet.  The consistently don't work from my website.  I 
 > know it must be a permissions problem, but I'm still a 
 > relative newbie relative to linux/permissions, and would 
 > appreciate any guidance in resolving it.

Yep, it's a permissions problem.  For starters, when the scripts are run
through your web site they will run as the user that your web server
runs as (nobody or apache or some such) and that user will typically
have limited permission to do much of anything.

If you're doing stuff that is normally only accessible to root then
you'll have problems.  For starters, the SUID bit usually doesn't work
on shell scripts - this is a security thing.

I've not really considered how to get around this but you might look at
what Webmin does as it does plenty of 'root only' stuff from a web
browser.

Off hand, one solution might be to create the shell script from your web
page but then not try and execute it.  Then have a cron job (running as
root) that will examine the contents of a directory and run the scripts
accordingly.  I can think of a number of security problems with this so
you'd want to be very careful what you let people do in this
environment.

CYA, Dave




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




[PHP] tracking visitors till registration?

2002-08-19 Thread Andy

Hi there,

I am wondering if following scenario would be possible:

- Create a unique referer id to make sure that the visitior has been refered
by a particular person. (e.g. server.com?ref=20)
- The visitor enters the site and browses around, but the ref=20 should not
be stored inside the url, but in a coockie
- If the visitor signs up and there is a referer id assign the person who
refered it some points.

The problem I see, is how to make sure that the refered id does not get lost
and in case the person comes back another day still be able to asign the
person who refered it the points.

Has anybody a good suggestion on that?

Thanx for any hint,

Andy






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




[PHP] installing php with register globals off and on?

2002-08-19 Thread Andy

Hi there,

I am running php 4.2.2 with register globals set to off. Now I am planing to
install oasis (a add tracking sw). Their current version requires a php
build with register globals set to on!?

Is there a way out of this dilema running only one server?

Thanx for any advice,

Andy





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




RE: [PHP] include() from another sub-domain

2002-08-19 Thread Brad Dameron

What I would do is change the include filename to something like
functions.inc like I do. This way the server won't try and run it for you.

---
Brad Dameron
Network Account Executive
TSCNet Inc.
 www.tscnet.com
Silverdale, WA. 
1-888-8TSCNET



> -Original Message-
> From: Greg Macek [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 19, 2002 12:29 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] include() from another sub-domain
>
>
> Hello,
>
> I've searched the list and the manual and am still a bit confused.
> Here's what I'd like to do. We have a bunch of internal sites that all
> use the same username/password. One is already setup with a function to
> authenticate this to a database. However, each login page is coming from
> a different sub-domain, such as site1.mydomain.com. The login functions
> resides in a PHP file on site2.mydomain.com. So it does this:
>
>  // This page on site1.mydomain.com
>
> include ("http://site2.mydomain.com/functions.php";);
>
> if (loginUser($username,$password)) {
>   // do stuff here
>   // redirect
> }
> else { ... }
>
> ?>
>
> Right now my local script doesn't find the function I'm trying to use.
> What am I missing here? Is it not possible to include a php file (and
> its functions and variables) across domains?
>
> - Greg
>
>
>
> --
> 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] installing php with register globals off and on?

2002-08-19 Thread Rasmus Lerdorf

Sure, turn register_globals on only for the oasis directory.  In your
httpd.conf add:


php_value register_globals on


-Rasmus

On Mon, 19 Aug 2002, Andy wrote:

> Hi there,
>
> I am running php 4.2.2 with register globals set to off. Now I am planing to
> install oasis (a add tracking sw). Their current version requires a php
> build with register globals set to on!?
>
> Is there a way out of this dilema running only one server?
>
> Thanx for any advice,
>
> Andy
>
>
>
>
>
> --
> 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] fopen(http:...) problems

2002-08-19 Thread Syl

When I use fopen(http:...) I do not get the latest version of the web page
want to extract some content from. This page is updated at the source once
an hour. How can I issue the equivalent of a Ctrl-F5 to refresh the cache?

Syl


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




[PHP] configure fails with expat

2002-08-19 Thread Geoff

when running ./configure it fails on this:
configure: error: not found. Please reinstall the expat distribution

I am configuring as follows:
./configure --with-sybase=/usr/local/freetds/
--with-apache=../apache_1.3.26 --with-mysql --with-expat-dir=/usr/lib

also if I specify the path of mysql as /usr/bin configure complains it
can't find the headers

I am running Mandrake 8.2 1ghz PIII 384 ram

I appreciate any help as I am new to compiling and have been at this
quite some time with little progress.


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




Re: [PHP] fopen(http:...) problems

2002-08-19 Thread Kevin Stone

Is there a cacheing mechanism involving PHP scripts?  I don't see how it's
possible to fopen() data from the browser's cache.  If you are not getting
the latest version of the web page then perhaps the server you are trying to
scrape is cloaking your spider.  Just a thought.
-Kevin

- Original Message -
From: "Syl" <[EMAIL PROTECTED]>
To: "PHP Windows" <[EMAIL PROTECTED]>; "PHP General"
<[EMAIL PROTECTED]>
Sent: Monday, August 19, 2002 3:13 PM
Subject: [PHP] fopen(http:...) problems


> When I use fopen(http:...) I do not get the latest version of the web page
> want to extract some content from. This page is updated at the source once
> an hour. How can I issue the equivalent of a Ctrl-F5 to refresh the cache?
>
> Syl
>
>
> --
> 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] Undefined index error

2002-08-19 Thread Shu Chow

I'm using the superglobal $_POST array to access URL 
parameters passed to my page. I was getting undefined 
constant errors in my error_log file, and found that I 
needed to quote the variables in the array. 
  $_POST['SortBy'] etc. Now, it appears that I've just 
traded the undefined constant errors for undefined index 
warnings. Everytime a page hits a page with url 
parameters, it triggers a warning in the error_log file. 
What's triggering these undefined index errors? I suppose 
I could lower the logging level in php.ini, but I'd rather 
code properly than to hide the problem. Thanks!

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




Re: [PHP] fopen(http:...) problems

2002-08-19 Thread Syl

> Is there a cacheing mechanism involving PHP scripts?  I don't see how it's
> possible to fopen() data from the browser's cache.  If you are not getting
> the latest version of the web page then perhaps the server you are trying
to
> scrape is cloaking your spider.  Just a thought.


I suspect it is cause by my ISP's cache. The reason I say this is that if I
refresh the page using my browser first and then access the page with the
PHP script I get the most recent update. There has to be away to refresh the
cache (page) before using an fopen. Suggestions?

syl


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




Re: [PHP] fopen(http:...) problems

2002-08-19 Thread Kevin Stone

There is no such thing as ISP cache, only your browser's cache, but I think
I understand what's happening now.  When you put in the request to open the
page (ie "yourscript.php"), instead of executing the script, you're seeing
the associated data from your browsers cache.  The request is never sent to
the server and the script is never executed.  That's why you are confused
about where the cached page is coming from.  :-)

Adding the following lines to the top of your script should do the trick
(note these must be parsed before *any* output)..



What these will do is tell the browser not to cache the page so
"yourscript.php" will never be associated with a cache file.  It's not 100%
effective becuase some browsers do not see these headers but it'll work for
the most part.  Hope this helps.  Good luck.

-Kevin

- Original Message -
From: "Syl" <[EMAIL PROTECTED]>
To: "PHP General" <[EMAIL PROTECTED]>
Sent: Monday, August 19, 2002 4:27 PM
Subject: Re: [PHP] fopen(http:...) problems


> > Is there a cacheing mechanism involving PHP scripts?  I don't see how
it's
> > possible to fopen() data from the browser's cache.  If you are not
getting
> > the latest version of the web page then perhaps the server you are
trying
> to
> > scrape is cloaking your spider.  Just a thought.
>
>
> I suspect it is cause by my ISP's cache. The reason I say this is that if
I
> refresh the page using my browser first and then access the page with the
> PHP script I get the most recent update. There has to be away to refresh
the
> cache (page) before using an fopen. Suggestions?
>
> syl
>
>
> --
> 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] Undefined index error

2002-08-19 Thread Michael Sweeney

If you try to access a form variable that hasn't been set, you get an
undefined index. Try checking with something like 
if(isset($_POST['SortBy'])) {
   // do something with 'SortBy'
}

In any case, you'll get the undefined index warning anytime you try to
read an array index that hasn't been set.

..michael..

On Mon, 2002-08-19 at 14:49, Shu Chow wrote:
> I'm using the superglobal $_POST array to access URL 
> parameters passed to my page. I was getting undefined 
> constant errors in my error_log file, and found that I 
> needed to quote the variables in the array. 
>   $_POST['SortBy'] etc. Now, it appears that I've just 
> traded the undefined constant errors for undefined index 
> warnings. Everytime a page hits a page with url 
> parameters, it triggers a warning in the error_log file. 
> What's triggering these undefined index errors? I suppose 
> I could lower the logging level in php.ini, but I'd rather 
> code properly than to hide the problem. Thanks!




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




[PHP] mssql_query

2002-08-19 Thread Jordan Lee

I'm running PHP 4.1.1 on Win2K server with SQL 2K and my connect and select
db statements are fine, but when I use the mssql_query() statement, PHP just
hangs.

I have no idea on whats going on and I've checked the forums, php's site,
and I do have the MSSQL connectivity installed on the server.  The server
PHP runs on is server A (which has the connectivity) and the actual SQL
server is on server B.  I'm running PHP in the CGI mode, just because these
are production servers and I don't know if the API version will knock out
our current usage of ASP.

HELP! PLEASE!  This is driving me nuts!

please send back to email address and this one [EMAIL PROTECTED]

I'll be travelling and I want to be able check up on the status of your
replies.

Thanks,

Jordan,
CMS

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




Re: [PHP] installing php with register globals off and on?

2002-08-19 Thread David Rice

Hi:

I have a test site where I am trying out a few things in PHP. I started 
off with  register_globals on. Then I read in the docs that it is best 
to turn turn register_globals off. I did so and now I am having a 
marvelous time recoding some session stuff :(
I could not find much info on why "register_globals on" is a bad thing. 
Seems to me that code is much cleaner with them on. What's the down side?

Cheers,
David

On Monday, August 19, 2002, at 05:05 PM, Rasmus Lerdorf wrote:

> Sure, turn register_globals on only for the oasis directory.  In your
> httpd.conf add:
>
> 
> php_value register_globals on
> 
>
> -Rasmus
>
> On Mon, 19 Aug 2002, Andy wrote:
>
>> Hi there,
>>
>> I am running php 4.2.2 with register globals set to off. Now I am 
>> planing to
>> install oasis (a add tracking sw). Their current version requires a php
>> build with register globals set to on!?
>>
>> Is there a way out of this dilema running only one server?
>>
>> Thanx for any advice,
>>
>> Andy
>>
>>
>>
>>
>>
>> --
>> 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] database value count retrieval

2002-08-19 Thread Pag


>SELECT COUNT(x) FROM table;
>
>Make 'x' equal to any column name in the table and add WHERE to the
>clause as needed.

 err...all very well, but how do i retrieve the value afterwards? 
Heres my code:

 $sqlcom="select count(codigo) from comments where codigo=$id";
 $resultadocom = mysql_db_query ("database",$sqlcom);
 $registocom = mysql_fetch_array($resultadocom);
 $contador = $registocom["codigo"];
 print("comentarios= $contador");

 Nothing comes out, although i dont have a clue on how to retrieve 
the result after the fetch_array. :-P


 /Pag



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




Re: [PHP] installing php with register globals off and on?

2002-08-19 Thread Rasmus Lerdorf

If you forget to initialize your internal script variables, then people
could potentially inject bogus values for these variables and change how
your script operates.  eg.

   if($password=='david') $ok=1;

   if($ok) let_them_in();

In the above, assume $password is a user-supplied value and $ok is an
internal script variable.  Now, since $ok was never initialized to 0 then
the user could supply ok=1 and get into let_them_in() regardless of the
value of $password.

Now, if you make your code E_ALL clean and make sure you initialize your
internal variables, you are correct, having register_globals on is cleaner
and easier to deal with.

-Rasmus

On Mon, 19 Aug 2002, David Rice wrote:

> Hi:
>
> I have a test site where I am trying out a few things in PHP. I started
> off with  register_globals on. Then I read in the docs that it is best
> to turn turn register_globals off. I did so and now I am having a
> marvelous time recoding some session stuff :(
> I could not find much info on why "register_globals on" is a bad thing.
> Seems to me that code is much cleaner with them on. What's the down side?
>
> Cheers,
> David
>
> On Monday, August 19, 2002, at 05:05 PM, Rasmus Lerdorf wrote:
>
> > Sure, turn register_globals on only for the oasis directory.  In your
> > httpd.conf add:
> >
> > 
> > php_value register_globals on
> > 
> >
> > -Rasmus
> >
> > On Mon, 19 Aug 2002, Andy wrote:
> >
> >> Hi there,
> >>
> >> I am running php 4.2.2 with register globals set to off. Now I am
> >> planing to
> >> install oasis (a add tracking sw). Their current version requires a php
> >> build with register globals set to on!?
> >>
> >> Is there a way out of this dilema running only one server?
> >>
> >> Thanx for any advice,
> >>
> >> Andy
> >>
> >>
> >>
> >>
> >>
> >> --
> >> 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 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] database value count retrieval

2002-08-19 Thread Martin Towell

try this:

->  $sqlcom="select count(codigo) as cnt from comments where codigo=$id";
$resultadocom = mysql_db_query ("database",$sqlcom);
$registocom = mysql_fetch_array($resultadocom);
->  $contador = $registocom["cnt"];
print("comentarios= $contador");

the lines marked with -> are the lines I changed

-Original Message-
From: Pag [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 20, 2002 9:38 AM
To: [EMAIL PROTECTED]
Subject: [PHP] database value count retrieval 



>SELECT COUNT(x) FROM table;
>
>Make 'x' equal to any column name in the table and add WHERE to the
>clause as needed.

 err...all very well, but how do i retrieve the value afterwards? 
Heres my code:

 $sqlcom="select count(codigo) from comments where codigo=$id";
 $resultadocom = mysql_db_query ("database",$sqlcom);
 $registocom = mysql_fetch_array($resultadocom);
 $contador = $registocom["codigo"];
 print("comentarios= $contador");

 Nothing comes out, although i dont have a clue on how to retrieve 
the result after the fetch_array. :-P


 /Pag



-- 
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] installing php with register globals off and on?

2002-08-19 Thread David Rice

Hi Rasmus:

Now turning register_globals back on and exploring "E_ALL".

Thanks :)

David


On Monday, August 19, 2002, at 07:36 PM, Rasmus Lerdorf wrote:

> If you forget to initialize your internal script variables, then people
> could potentially inject bogus values for these variables and change how
> your script operates.  eg.
>
>if($password=='david') $ok=1;
>
>if($ok) let_them_in();
>
> In the above, assume $password is a user-supplied value and $ok is an
> internal script variable.  Now, since $ok was never initialized to 0 
> then
> the user could supply ok=1 and get into let_them_in() regardless of the
> value of $password.
>
> Now, if you make your code E_ALL clean and make sure you initialize your
> internal variables, you are correct, having register_globals on is 
> cleaner
> and easier to deal with.
>
> -Rasmus
>
> On Mon, 19 Aug 2002, David Rice wrote:
>
>> Hi:
>>
>> I have a test site where I am trying out a few things in PHP. I started
>> off with  register_globals on. Then I read in the docs that it is best
>> to turn turn register_globals off. I did so and now I am having a
>> marvelous time recoding some session stuff :(
>> I could not find much info on why "register_globals on" is a bad thing.
>> Seems to me that code is much cleaner with them on. What's the down 
>> side?
>>
>> Cheers,
>> David
>>
>> On Monday, August 19, 2002, at 05:05 PM, Rasmus Lerdorf wrote:
>>
>>> Sure, turn register_globals on only for the oasis directory.  In your
>>> httpd.conf add:
>>>
>>> 
>>> php_value register_globals on
>>> 
>>>
>>> -Rasmus
>>>
>>> On Mon, 19 Aug 2002, Andy wrote:
>>>
 Hi there,

 I am running php 4.2.2 with register globals set to off. Now I am
 planing to
 install oasis (a add tracking sw). Their current version requires a 
 php
 build with register globals set to on!?

 Is there a way out of this dilema running only one server?

 Thanx for any advice,

 Andy





 --
 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 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] How to upgrade? possible?(newbie)

2002-08-19 Thread Ryan A

Hi everyone,
I have just downloaded the MySql,PHP,Apache triad but notice the version for php is 
4.1.1 which is the old version right? How do I upgrade just the PHP in the whole setup 
to the latest stable version?
Kindly reply or point me to where the answer is,
I do not want to compile the packages as that always screws up my comp...pre compiled 
binaries only please.

I am running on win2k pro with a p3 550mhz and 256mb ram.

Any help appreciated...thanks in advance,

-R.



Re: [PHP] tracking visitors till registration?

2002-08-19 Thread Justin French

on 20/08/02 7:01 AM, Andy ([EMAIL PROTECTED]) wrote:

> Hi there,
> 
> I am wondering if following scenario would be possible:
> 
> - Create a unique referer id to make sure that the visitior has been refered
> by a particular person. (e.g. server.com?ref=20)

yes

> - The visitor enters the site and browses around, but the ref=20 should not
> be stored inside the url, but in a coockie

yes, or alternatively in a session

> - If the visitor signs up and there is a referer id assign the person who
> refered it some points.

yes

> The problem I see, is how to make sure that the refered id does not get lost
> and in case the person comes back another day still be able to asign the
> person who refered it the points.
>
> Has anybody a good suggestion on that?

make sure the cookie has a long expiry date... say a month, or whatever you
think is reasonable.
 

Justin


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




[PHP] "disable html" ?

2002-08-19 Thread Hawk

is there some way to "disable html".. if someone posts a msg with 
my entire layout messes up :)
I have no idea how to solve this, but it's messing with my brain, I tried
the htmlspecialchars, but that didn't help :/

Håkan



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




Re: [PHP] "disable html" ?

2002-08-19 Thread Justin French

php.net/striptags

Justin French



on 20/08/02 11:07 AM, Hawk ([EMAIL PROTECTED]) wrote:

> is there some way to "disable html".. if someone posts a msg with 
> my entire layout messes up :)
> I have no idea how to solve this, but it's messing with my brain, I tried
> the htmlspecialchars, but that didn't help :/
> 
> Håkan
> 
> 


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




  1   2   >