Re: [PHP] parse error? how can I print spesific message for all error mesage

2002-03-11 Thread Ceyhun Güler

? $dir = $HTTP_GET_VARS[dir];
$dir = str_replace( ,/,$dir);
$res = $HTTP_GET_VARS[res];
?
title?=$res;?/title
img src=?=$dir;?/?=$res;?.jpg 
/body

My code is running now until if a link comes trough here like
resimgoster.php?dir=main products imagesres=pic01
but  if you write resimgoster.php to your adress bar without dir and res
this script write_
Warning: Undefined index: dir in c:\inetpub\wwwroot\kocak\resimgoster.php on
line 1

Warning: Undefined index: res in c:\inetpub\wwwroot\kocak\resimgoster.php on
line 3

I want to give a message like Not Avaiable  if dir and res is not entered!



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




Re: [PHP] Re: A stupid question...

2002-03-11 Thread liljim

Hi chuck,

use left()

assuming your column is called name, then something like this will do:

$letter = a;

$get = @mysql_query(SELECT * FROM table WHERE LEFT(surname, 1) = '$letter'
ORDER BY surname ASC);

That should get out all of the fields beginning with a or A and list them
alphabetically.

Hope that's of some help.


James

Chuck Pup Payne [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I want to sort by a letter in a colomn. Let say I want to sort the colomn
 last_name. I can do order by but I can do just the A's.

 http://www.myserver.com/mysort.php?Letter=A

 Like to create a link on a web A then sort only the last name are A.

 I hope that's helps. I can order by, but I can't so a sort like the
example
 above.

 Chuck Payne
 Magi Design and Support


  on 3/10/02 9:42 PM, Cary at [EMAIL PROTECTED] wrote:
 
  At 08:24 PM 3/10/02, Chuck \PUP\ Payne wrote:
  Hi,
 
  I not a newie but I am not a pro at mysql either. I want to do a query
by
  letter(a, b, c..ect.). Is there a simple way to do it. I am writing in
PHP.
  So can someone please so me the how.
 
 
  I'm not totally sure what your looking for. If you could elaborate a
little
  I am sure that one of us could help you out.
 
  Cary
 
 
 
 




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




[PHP] Re: Congrats to Rasmus?

2002-03-11 Thread Matt Williams



  Well, everyone's favorite PHP developer multiplied last night - Rasmus
  Lerdorf now has a son (9.0lbs, 19.25in. - a big boy) was born at 13:26
  PDT on Wednesday March 6, 2002. If you'd like to see some pics from the
  family, check out this page - or to send congrats, email
  [EMAIL PROTECTED]

congratulations Rasmus

matt

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




[PHP] Sessions / MySQL

2002-03-11 Thread Chris Kay


I am wanting to store session data in a mysql db.. 
I have looked at a few examples and still cant get them to work

Rather than asking for the answer, I perfer to try a few more time.

Anyone have any links to tutorials that may help or examples that may
help me out?

Thanks in advance...

---
Chris Kay, Eleet Internet Services
[EMAIL PROTECTED]
---


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




[PHP] [GD] quality of image after resize

2002-03-11 Thread M.S. Damen

Hello,

At the moment I have a script in which foto's are uploaded, checked if the
size fits the required dimensions and then it is stored on the server. Also
a thumbnail is generated, but the quality of the thumbnail is very poor,
even if I set the jpeg quality on 100%. I use gd 1.8.2, and below is my
script. Does anyone have experience with this kind of stuff?

Oh, and it is not possible to use GD2, because the site is running on a
cobalt server, whow don't support GD2 until now :-( So
imagecreateresampled() won't be of any use :-(

Tnx allot,

Martijn/
The Netherlands





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




RE: [PHP] Re: A stupid question...

2002-03-11 Thread Niklas Lampén

An option too:

SELECT * FROM table WHERE SURNAME LIKE 'a%' ORDER BY surname ASC


Niklas

-Original Message-
From: liljim [mailto:[EMAIL PROTECTED]] 
Sent: 11. maaliskuuta 2002 11:09
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: A stupid question...


Hi chuck,

use left()

assuming your column is called name, then something like this will do:

$letter = a;

$get = @mysql_query(SELECT * FROM table WHERE LEFT(surname, 1) =
'$letter' ORDER BY surname ASC);

That should get out all of the fields beginning with a or A and list
them alphabetically.

Hope that's of some help.


James

Chuck Pup Payne [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I want to sort by a letter in a colomn. Let say I want to sort the 
 colomn last_name. I can do order by but I can do just the A's.

 http://www.myserver.com/mysort.php?Letter=A

 Like to create a link on a web A then sort only the last name are A.

 I hope that's helps. I can order by, but I can't so a sort like the
example
 above.

 Chuck Payne
 Magi Design and Support


  on 3/10/02 9:42 PM, Cary at [EMAIL PROTECTED] wrote:
 
  At 08:24 PM 3/10/02, Chuck \PUP\ Payne wrote:
  Hi,
 
  I not a newie but I am not a pro at mysql either. I want to do a 
  query
by
  letter(a, b, c..ect.). Is there a simple way to do it. I am 
  writing in
PHP.
  So can someone please so me the how.
 
 
  I'm not totally sure what your looking for. If you could elaborate 
  a
little
  I am sure that one of us could help you out.
 
  Cary
 
 
 
 




-- 
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] Netscape 6.2 session problem?

2002-03-11 Thread Jan Grafström

Hi !

Anybody else haviing problem with netscape opening link in new window?
On first page I do session start and set $_SESSION['myvar']=myword;

Then clicking any other link on that page causes Netscape to open it in a
new window.
my links looks like this: a href=page.php??echo SID?link/a

Thanks for any help.


--
Regards
Jan Grafström

Minisoft Sweden

Bredsäter 2091
87010 Älandsbro
0611-60920
070-6409073


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




[PHP] Hi problem with selected value!!

2002-03-11 Thread Balaji Ankem
Title: Message



Hi friend, could u plz. Tell me how 
to display the slected option value in alert box?Code I wrote is like 
this.. But I am getting NULL.. Any help would be 
appreciable..=html
head
script 
language="Javascript"function 
check(){ var 
a; alert(document.babai.bongu.value); // Is it 
correct?? return 
true;}/script
/head
bodyform name="babai"select name="bongu" 
option 
value="11"11/optiuon 
option 
value="12"12/optiuon 
option value="13"13/optiuon/selectinput 
type="submit" value="check" 
/form/body/htmlThanks 
in advanceBalaji 

**Disclaimer
  


Information contained in this E-MAIL being proprietary to Wipro Limited
is 'privileged' and 'confidential' and intended for use only by the
individual or entity to which it is addressed. You are notified that any
use, copying or dissemination of the information contained in the E-MAIL
in any manner whatsoever is strictly prohibited.



 



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


Re: [PHP] Hi problem with selected value!!

2002-03-11 Thread Edward van Bilderbeek - Bean IT

guess that should be:

alert(document.babai.bongu.selectedIndex);

Greets,

Edward

- Original Message -
From: Balaji Ankem [EMAIL PROTECTED]
To: Php-General [EMAIL PROTECTED]
Sent: Monday, March 11, 2002 11:23 AM
Subject: [PHP] Hi problem with selected value!!


 Hi friend,
   could u plz. Tell me how to display the slected option value in alert
 box?

 Code I wrote is like this.. But I am getting NULL.. Any help would be
 appreciable..

 =
 html


 head


 script language=Javascript

 function check()
 {
 var a;
 alert(document.babai.bongu.value); // Is it correct??
 return true;
 }

 /script


 /head


 body
 form name=babai

 select name=bongu
 option value=/optiuon
 option value=1212/optiuon
 option value=1313/optiuon

 /select
 input type=submit value=check onclick=check();
 /form
 /body
 /html
 

 Thanks in advance
 Balaji








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



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




[PHP] Re:

2002-03-11 Thread Edward van Bilderbeek - Bean IT

why aren't you posting this on the general PHP list?

you should upload the word doc and then base64encode it into you
mailmessage... there are some mailclasses available on the internet... check
them out...


Edward



- Original Message -
From: Swati Patil [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 12, 2002 11:35 AM


 i m using php4.1.1
 in the mail function, i want to provide the facility to the end user to
 attach his/her  word document.
 how can i do this?

 swati.





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




[PHP] Can no one help with this opendir problem?

2002-03-11 Thread Nick selby

Hi,
I wrote a few days ago and have heard nothing - can ANYONE help with this:


I've got a script that is installed on a Solaris machine that is having 
difficulties, and I'm wondering if anyone can help. The script is trying to 
access and read files within a directory, pull some at random and put them 
in a webpage. The path is correct, the directory is set to 755 and I can 
view the files when I browse in. The script is up and running perfectly on 
two other servers - one on Red Hat Linux and one on Win2k.

The script is this:

?php
// This pulls 3 random banners from the appropriate
// subdirectory of the images section of the site
$i=-1; $banners=opendir($SECTION_SIDEBAR_BANNERS);
if ($banners != FALSE) { while (($file = readdir($banners)) != FALSE) if 
($file != .  $file != ..) $banner_list[$i++]=$file; 
closedir($banners); $l=sizeof($banner_list); if ($l!=0) { for 
($i=0;$i3;$i++) { $ad=$banner_list[rand(0,$l)]; if (empty($ad)) { $i-=1; 
continue; } $imginfo=getimagesize($SECTION_SIDEBAR_BANNERS/$ad); 
$link=str_replace('.gif','',$ad); $link=str_replace('.jpg','',$ad); 
$link=str_replace('_','/',$ad); echo  div class='sidebar-banner-slot' a 
href='$SECTION_URL.ad-clickthrough.htm?AD_URL=$link'img src='. 
$SECTION_SIDEBAR_BANNERS_URL. /$ad' height='$imginfo[1]' 
width='$imginfo[0]' border='0' alt='Visit $link' //a /div; } }
// $l != 0 } // $banner != FALSE
?

The problem on the solaris machine is that opendir is getting in to the 
directory but from that point the server won't let the script read the 
files. It kicks back the error:
Warning: 1 is not a valid Directory resource in 
/data0/foo.org/members/foo/foo/html/destinations/templates/foo.footer.php 
on line 20
(Identifying directories are foo'd out)

Since it kicks back the 1 and not a false, it seems it's getting access 
but then not being permitted. Here's something else - the problem is 
intermittent: sometimes the script can grab the images and others not. Can 
anyone help? Many thanks in advance. NIck



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




[PHP] Probleme de lien hypertexte

2002-03-11 Thread Jérome Moisy



Bonjour,
Dans une page qui se nomme seriefr.php je place 
le code suivant à l'intérieur d'une boucle SWITCH.Le problème est que quand on 
clique sur le lien hypertexte la page est reloadée mais sans modification. La 
nouvelle valeur de la variable val n'est pas prise en compte. Si quelqu'un a une 
idée du pourquoi ?
Merci

Code :

If ($val = 1) {echo "1 - 
5";print "nbsp;a 
href="\"seriefr.php?val=6serie=Al84\"6" - 
10/a";print "nbsp;a 
href="\"seriefr.php?val=11serie=Al84\"11" - 
15/a";print "nbsp;a 
href="\"seriefr.php?val=16serie=Al84\"16" - 
20/a";print "nbsp;a 
href="\"seriefr.php?val=21serie=Al84\"21" - 
22/a";print "BR";}ElseIf($val = 
6) {print "a href='seriefr.php?val=1serie=Al84'1 - 
5/anbsp;";echo "6 - 10";print 
"nbsp;a href='seriefr.php?val=11serie=Al84'11 - 
15/a";print "nbsp;a 
href='seriefr.php?val=16serie=Al84'16 - 
20/a";print "nbsp;a 
href='seriefr.php?val=21serie=Al84'21 - 
22/a";print "BR";}ElseIf ($val = 11) 
{print "a href='seriefr.php?val=1serie=Al84'1 - 
5/a";print "nbsp;a 
href='seriefr.php?val=6serie=Al84'6 - 
10/anbsp;";echo "11 - 15";print 
"nbsp;a href='seriefr.php?val=16serie=Al84'16 - 
20/a";print "nbsp;a 
href='seriefr.php?val=21serie=Al84'21 - 
22/a";print "BR";}ElseIf ($val 
=16) {print "a 
href='seriefr.php?val=1serie=Al84'1 - 
5/a";print "nbsp;a 
href='seriefr.php?val=6serie=Al84'6 - 
10/a";print "nbsp;a 
href='seriefr.php?val=11serie=Al84'11 - 
15/anbsp;";echo "16 - 20";print 
"nbsp;a href='seriefr.php?val=21serie=Al84'21 - 
22/a";print "BR";}ElseIf ($val 
=21) {print "a 
href='seriefr.php?val=1serie=Al84'1 - 
5/a";print "nbsp;a 
href='seriefr.php?val=6serie=Al84'6 - 
10/a";print "nbsp;a 
href='seriefr.php?val=11serie=Al84'11 - 
15/a";print "nbsp;a 
href='seriefr.php?val=16serie=Al84'16 - 
20/anbsp;";echo "21 - 22";print 
"BR";}

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


Re: [PHP] parse error? how can I print spesific message for all error mesage

2002-03-11 Thread Ceyhun Güler

Can AnyOne Help?



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




RE: [PHP] Can no one help with this opendir problem?

2002-03-11 Thread Jon Haworth

I don't think anyone's about to wade through your incredibly obfuscated
code. I tried to have a look, and got as far as while (($file =
readdir($banners)) != FALSE) before thinking you must be joking.

You also have bits like this: 
// $l != 0 } // $banner != FALSE

How are we supposed to know which bits are live and which bits are commented
out?

If the problem may be with your code, please make it legible before asking
for help.

Cheers
Jon


-Original Message-
From: Nick selby [mailto:[EMAIL PROTECTED]]
Sent: 11 March 2002 10:54
To: [EMAIL PROTECTED]
Subject: [PHP] Can no one help with this opendir problem?


Hi,
I wrote a few days ago and have heard nothing - can ANYONE help with this:


I've got a script that is installed on a Solaris machine that is having 
difficulties, and I'm wondering if anyone can help. The script is trying to 
access and read files within a directory, pull some at random and put them 
in a webpage. The path is correct, the directory is set to 755 and I can 
view the files when I browse in. The script is up and running perfectly on 
two other servers - one on Red Hat Linux and one on Win2k.

The script is this:

?php
// This pulls 3 random banners from the appropriate
// subdirectory of the images section of the site
$i=-1; $banners=opendir($SECTION_SIDEBAR_BANNERS);
if ($banners != FALSE) { while (($file = readdir($banners)) != FALSE) if 
($file != .  $file != ..) $banner_list[$i++]=$file; 
closedir($banners); $l=sizeof($banner_list); if ($l!=0) { for 
($i=0;$i3;$i++) { $ad=$banner_list[rand(0,$l)]; if (empty($ad)) { $i-=1; 
continue; } $imginfo=getimagesize($SECTION_SIDEBAR_BANNERS/$ad); 
$link=str_replace('.gif','',$ad); $link=str_replace('.jpg','',$ad); 
$link=str_replace('_','/',$ad); echo  div class='sidebar-banner-slot' a 
href='$SECTION_URL.ad-clickthrough.htm?AD_URL=$link'img src='. 
$SECTION_SIDEBAR_BANNERS_URL. /$ad' height='$imginfo[1]' 
width='$imginfo[0]' border='0' alt='Visit $link' //a /div; } }
// $l != 0 } // $banner != FALSE
?

The problem on the solaris machine is that opendir is getting in to the 
directory but from that point the server won't let the script read the 
files. It kicks back the error:
Warning: 1 is not a valid Directory resource in 
/data0/foo.org/members/foo/foo/html/destinations/templates/foo.footer.php 
on line 20
(Identifying directories are foo'd out)

Since it kicks back the 1 and not a false, it seems it's getting access 
but then not being permitted. Here's something else - the problem is 
intermittent: sometimes the script can grab the images and others not. Can 
anyone help? Many thanks in advance. NIck



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


_
This message has been checked for all known viruses by UUNET delivered 
through the MessageLabs Virus Control Centre. For further information visit
http://www.uk.uu.net/products/security/virus/

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




[PHP] submitting to remote forms

2002-03-11 Thread Websitecd

I'm working on a program that will allow information to be submitted to a 
remote form. How can I do this with PHP?

Thanks.

Joserph

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




RE: [PHP] Probleme de lien hypertexte

2002-03-11 Thread Jon Haworth

Bonjour Jerome,

Vous avez besoin de replacer

 If ($val = 1) {

avec

 If ($val == 1) {

Parce que = signifie une allocation, et == signifie une comparaison

Je fais des excuses pour mon francais - je ne le parle pas tres bien :-)


Regards
Jon




-Original Message-
From: Jérome Moisy [mailto:[EMAIL PROTECTED]]
Sent: 11 March 2002 10:46
To: [EMAIL PROTECTED]
Subject: [PHP] Probleme de lien hypertexte


Bonjour,
Dans une page qui se nomme seriefr.php je place le code suivant à
l'intérieur d'une boucle SWITCH.Le problème est que quand on clique sur le
lien hypertexte la page est reloadée mais sans modification. La nouvelle
valeur de la variable val n'est pas prise en compte. Si quelqu'un a une idée
du pourquoi ?
Merci

Code :

 If ($val = 1) {
  echo 1 - 5;
  print nbsp;a href=\seriefr.php?val=6serie=Al84\6 - 10/a;
  print nbsp;a href=\seriefr.php?val=11serie=Al84\11 - 15/a;
  print nbsp;a href=\seriefr.php?val=16serie=Al84\16 - 20/a;
  print nbsp;a href=\seriefr.php?val=21serie=Al84\21 - 22/a;
  print BR;
 }ElseIf ($val = 6) {
  print a href='seriefr.php?val=1serie=Al84'1 - 5/anbsp;;
  echo 6 - 10;
  print nbsp;a href='seriefr.php?val=11serie=Al84'11 - 15/a;
  print nbsp;a href='seriefr.php?val=16serie=Al84'16 - 20/a;
  print nbsp;a href='seriefr.php?val=21serie=Al84'21 - 22/a;
  print BR;
 }ElseIf ($val = 11) {
  print a href='seriefr.php?val=1serie=Al84'1 - 5/a;
  print nbsp;a href='seriefr.php?val=6serie=Al84'6 - 10/anbsp;;
  echo 11 - 15;
  print nbsp;a href='seriefr.php?val=16serie=Al84'16 - 20/a;
  print nbsp;a href='seriefr.php?val=21serie=Al84'21 - 22/a;
  print BR;
 }ElseIf ($val = 16) {
  print a href='seriefr.php?val=1serie=Al84'1 - 5/a;
  print nbsp;a href='seriefr.php?val=6serie=Al84'6 - 10/a;
  print nbsp;a href='seriefr.php?val=11serie=Al84'11 - 15/anbsp;;
  echo 16 - 20;
  print nbsp;a href='seriefr.php?val=21serie=Al84'21 - 22/a;
  print BR;
 }ElseIf ($val = 21) {
  print a href='seriefr.php?val=1serie=Al84'1 - 5/a;
  print nbsp;a href='seriefr.php?val=6serie=Al84'6 - 10/a;
  print nbsp;a href='seriefr.php?val=11serie=Al84'11 - 15/a;
  print nbsp;a href='seriefr.php?val=16serie=Al84'16 - 20/anbsp;;
  echo 21 - 22;
  print BR;
 }

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




[PHP] Link probleme

2002-03-11 Thread Jérome Moisy




Hy,
Inthepageseriefr.phpthere 
is thecode in a SWITCH loop.The problemis that whenwe use the 
linknothings happen. The value of the variable val don't change.if 
someone know whycan you explain it to me ?
Thanks

The page seriefr.php join.

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


Re: [PHP] ploblem with safe_mode_include_dir

2002-03-11 Thread Renato Lins

Dear Rasmus,

   I must be wrong, because fetching the cvs I found an entry in the 
Chanlog file

2002-02-01  James E. Flemer  [EMAIL PROTECTED]

   * main/fopen_wrappers.c
 main/fopen_wrappers.h:
   Changed php.ini directive 'safe_mode_include_dir' to accept a
   (semi)colon separated path, rather than a single directory.
   Also moved checking of said path into a separate path for code
   readability.

   Which led me to think that such parameter would enable php scripts 
with an open_base_dir setting to access a separate include_path so 
system wide libraries would not need to be duplicated in every 
VirtualDomain hosted.

   Can you help me out with this ?


Rasmus Lerdorf wrote:

There is no such feature.

On Mon, 4 Mar 2002, Renato Lins wrote:

Sorry, I may not haven been clear.

What should I do to include from a safe area (/myuser/safe) when I have
open_basedir set to other path (/myuser/public_html) ?

Rasmus Lerdorf wrote:

open_basedir doesn't take a list of paths.

On Mon, 4 Mar 2002, Renato Lins wrote:

Some one can help me. Why this is not working ?



# apache conf
Directory /myuser/public_html/
php_admin_flag safe_mode on
php_admin_value safe_mode_include_dir /myuser/safe/
php_admin_value doc_root /myuser/public_html/
php_admin_value open_basedir /myuser/public_html/:/tmp/
/Directory

#cat /myuser/public_html/x2.php
?php
echo 'Current PHP version: ' . phpversion().BR;
require(/myuser/safe/x4.php);
echo I am in x2br
?

#cat /myuser/safe/x4.php
?php
echo I am in X4br
?


#browser result
Current PHP version: 4.2.0-dev
*Warning*: open_basedir restriction in effect. File is in wrong
directory in */myuser/public_html/x1.php* on line 2

*Fatal error*: Failed opening required '/myuser/safe/x4.php'
(include_path='') in */home/rlins/public_html/x1.php* on line 2



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




Re: [PHP] Sessions / MySQL

2002-03-11 Thread Michael Egan

Chris,

There's a fairly comprehensive example of this included within
'Beginning PHP4' (ISBN 1861003730) - I think in Chapter 13.

You can download the code examples for this book from
http://p2p.wrox.com/php/ without actually buying the book - though I've
found this book and the more recent 'Professional PHP4' to be
invaluable.

Hope this helps,

Michael Egan

Chris Kay wrote:
 
 I am wanting to store session data in a mysql db..
 I have looked at a few examples and still cant get them to work
 
 Rather than asking for the answer, I perfer to try a few more time.
 
 Anyone have any links to tutorials that may help or examples that may
 help me out?
 
 Thanks in advance...
 
 ---
 Chris Kay, Eleet Internet Services
 [EMAIL PROTECTED]
 ---
 
 --
 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] Don't understand flock

2002-03-11 Thread Kristian Laren

Hi

I've read the article on http://www.php.net/manual/en/function.flock.php but
i stille don't understand what flock() is doing, what it's good for, how i
use it and what it help
Would someone please help understand it??

Thanks
  Kristian Larsen
  Denmark



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




[PHP] unable to use built in functions

2002-03-11 Thread CHANDRA VENKAT RAO



Hi

  When I do ftp_connect() or printer_open() function in my scripts which are 
built in  functions but

I get
 Fatal error. Call to undefined function printer_open() in /home/~web on 
line 11

Pl help me



regards
CVR





_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




RE: [PHP] Re: A stupid question...

2002-03-11 Thread Tim Ward

If you mean select by first letter then wild cards are what you want ...
http://www.mysql.com/doc/S/t/String_comparison_functions.html
http://www.mysql.com/doc/S/t/String_comparison_functions.html 

in your case SELECT ... WHERE lastname LIKE '$Letter%' ORDER BY lastname

... if you mean sort all records but don't sort past the first letter then
SELECT ..., LEFT(lastname, 1) AS lastname_first ... ORDER BY
lastname_first or you might even be able to do  ... ORDER BY
LEFT(lastname, 1) you'll have to experiment with that one.

Tim Ward
Internet chess www.chessish.com http://www.chessish.com 

--
From:  Chuck PUP Payne [SMTP:[EMAIL PROTECTED]]
Sent:  11 March 2002 02:59
To:  Cary; mysql lists.mysql.com
Cc:  PHP General
Subject:  Re: [PHP] Re: A stupid question...

I want to sort my a letter in a set colomn. Let say I want to sort
the
colomn last_name

http://www.myserver.com/mysort.php?Letter=A

Like to create a link like A then sort only the last name ore what
ever I
want to sort by that letter.

I hope that's helps. I can order by, but I can't so a sort like the
example
above.

Chuck Payne
Magi Design and Support


on 3/10/02 9:42 PM, Cary at [EMAIL PROTECTED] wrote:

 At 08:24 PM 3/10/02, Chuck \PUP\ Payne wrote:
 Hi,
 
 I not a newie but I am not a pro at mysql either. I want to do a
query by
 letter(a, b, c..ect.). Is there a simple way to do it. I am
writing in PHP.
 So can someone please so me the how.
 
 
 I'm not totally sure what your looking for. If you could elaborate
a little
 I am sure that one of us could help you out.
 
 Cary
 
 
 


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




[PHP] Running PHP scripts from the shell

2002-03-11 Thread andy thomas

Just wondering but is there any way PHP scripts can be run from the
command line from a standard Unix shell like, for example, perl rather
than being invoked via a browser and running web server, etc?

Such a feature would be very nice as there are a number of things that
can be done better from PHP than from a shell script - MySQL access being
one of them.

Andy


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




[PHP] upload status...

2002-03-11 Thread Philip Jeffs

Hi,

I've got a script that uploads and resizes images. Is there a way to display a page 
while the images are being uploaded and then go somewhere else after the images have 
finished uploading? 
I don't need it to give status of how long it will take etc. It just needs to site 
there until the image has been uploaded and then go somewhere else once its finished.

Thanks in advance,

Phil
-
 
Philip Jeffs
 
The Tickle Group
The Gate House
Summerseat
Bury
Lancashire
BL9 5PE
United Kingdom
W: http://www.tickle.co.uk
T: 01706 823456
F: 01706 829500
E: [EMAIL PROTECTED] (daytime)
[EMAIL PROTECTED] (evening)
 
-



Re: [PHP] unable to use built in functions

2002-03-11 Thread Jason Wong

On Monday 11 March 2002 20:07, CHANDRA VENKAT RAO wrote:
 Hi

   When I do ftp_connect() or printer_open() function in my scripts which
 are built in  functions but

FTP functions are only available when you compile PHP with --enable-ftp.

 I get
  Fatal error. Call to undefined function printer_open() in /home/~web
 on line 11

Printer functions are only available on Windows platforms.


Please RTFM.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
The mosquito exists to keep the mighty humble.
*/

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




[PHP] Help w/ join syntax

2002-03-11 Thread Anthony Rodriguez

When I call the following script, $qry_1 doesn't work (No Query # 1!).

?php
set_time_limit(300);
$connection=mysql_connect(localhost,wagner,???) or die (No 
connection!);
$db=mysql_select_db(sbwresearch,$connection) or die (No database!);

$qry_1=select
first_name.con_inf,
...
zip.con_inf,
label.svy_149
from con_inf, svy_149 where con_inf.username=svy_149.username;
$result_1=mysql_query($qry_1,$connection) or die (No query # 1!);
while ($row_1=mysql_fetch_array($result_1, MYSQL_ASSOC))
{
   $first_name=$row_1[first_name];
   ...
   $zip=$row_1[zip];
   $label=$row_1[label];
   if ($label==n)
   {
   $qry_2=insert into address_149
   (
   first_name,
   ...,
   zip)
   values (
   \$first_name\,
   ...,
   \$zip\
   );
   $result_2=mysql_query($qry_2,$connection);
   };
};

mysql_free_result($result_1);
mysql_close($connection);
echo bDONE/b;
flush();
exit;
?

Thanks!

Anthony F. Rodriguez
([EMAIL PROTECTED])


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




Re: [PHP] Running PHP scripts from the shell

2002-03-11 Thread Jason Wong

On Monday 11 March 2002 20:18, andy thomas wrote:
 Just wondering but is there any way PHP scripts can be run from the
 command line from a standard Unix shell like, for example, perl rather
 than being invoked via a browser and running web server, etc?

 Such a feature would be very nice as there are a number of things that
 can be done better from PHP than from a shell script - MySQL access being
 one of them.

PHP can be compiled as a stand-alone program (for use as CGI  thus shell 
scripting). See manual, Installation for details.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
I've seen the forgeries I've sent out.
-- John F. Haugh II ([EMAIL PROTECTED]), about forging net news articles
*/

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




[PHP] PHP group in spanish

2002-03-11 Thread Frank

How know a PHP group that is in spanish?.

Thanks beforehand...
Frank.-



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




Re: [PHP] Running PHP scripts from the shell

2002-03-11 Thread andy thomas



On Mon, 11 Mar 2002, Jason Wong wrote:

 On Monday 11 March 2002 20:18, andy thomas wrote:
  Just wondering but is there any way PHP scripts can be run from the
  command line from a standard Unix shell like, for example, perl rather
  than being invoked via a browser and running web server, etc?
 
  Such a feature would be very nice as there are a number of things that
  can be done better from PHP than from a shell script - MySQL access being
  one of them.

 PHP can be compiled as a stand-alone program (for use as CGI  thus shell
 scripting). See manual, Installation for details.

I will try doing this, thanks a lot for the suggestion.

Andy


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




[PHP] Re: mail() getenv() problems (after 4.1.2 update)...

2002-03-11 Thread Keith Waters

Just to report back to the group, the mail() delay problem was solved by
putting entries into /etc/hosts to speed up reverse DNS lookups.  (Worked
fine before 4.1.2, but I guess there's some new code in there somewhere!)

Paul's getenv() problem was a simple one, he forgot the double-quotes!

Keith

Keith Waters [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I'm having the same problem -

 I've been using the mail() command for quite some time now and it's been
 working 100% and executing immediately.

 Suddenly, this morning, it is taking about 60 seconds to send mail,
delaying
 the display of the php web page by that same amount of time.

 I have checked the mail server and sending mail from the command prompt
 (linux) and there is no delay there.

 Does anybody have any clue? I even momentarily downgraded to 4.1.0 to make
 sure it wasnt a bug in 4.1.2


 Paul [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Can nobody help?  This is so frustrating.  I cannot see what's wrong,
open
  to ANY suggestions!
 
  Thanks.
 
  Paul
  Paul [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   Hello,
  
   I wonder if anyone can help me with a problem I have.  I have some
sites
   hosted on a Cobalt Raq4 server (not sure if this is relevant).  I
 recently
   upgraded PHP from a package at www.pkgmaster.com, and since making
this
   upgrade I have problems with PHP that I cannot find the solution to.
  
   I have conacted their 'team' who have thus far offered no explanation,
   saying it must be something else causing these issues with PHP, but I
   haven't made any more changes, just installed the new PHP version.
  
   The problems are with the mail() function taking an AGE to excecute,
and
   environmental HTTP header information not being sent/recieved by
 getenv().
  
   Some examples follow..
  
   For example, as an extremely basic example of the mail function going
  slow,
   this simple script:
   ?
   mail([EMAIL PROTECTED], Test subject, Test
message);
   print finished!;
   ?
  
   Which can be found at http://www.clicktolearn.co.uk/test/mail.php in
  action,
   ran (as it should do) extremely fast the week before I made the
upgrade
  from
   the packages.  Now, as you will see, it runs dog slow.
  
   Secondly, the following script shows the lack of headers:
   http://www.clicktolearn.co.uk/test/  (click the link, so there's a
 referer
   to the script page)...
  
   ?
   function get_http_headers($url, $proto=HTTP/1.0, $timeout=10) {
   $return = false;
   if (substr($url,0,7)==http://;) {
   $url = substr($url,7);
   }
  
   $parts = parse_url(http://.$url);
  
   $ips = gethostbynamel($parts[host]);
  
   if ($ips[0]) {
   $ip = $ips[0];
   $host = $parts[host];
   $path = ($parts[path]) ? $parts[path] : /;
   $port = ($parts[port]) ? $parts[port] : 80;
  
   $start = time();
   $timeout = $timeout + $start;
  
   if($sock = fsockopen($host, $port)) {
   set_socket_blocking($sock, 0);
   switch($proto) {
   case HTTP/1.1:
   set_socket_blocking($sock, 1);
   fputs($sock, sprintf(HEAD %s
  %s\n,
   $path, $proto));
   fputs($sock, sprintf(Host:
  %s\n\n,
   $host));
   break;
   default:
   fputs($sock, sprintf(HEAD %s
   %s\n\n, $path, $proto));
   }
  
   while(!feof($sock)  $t$timeout) {
   $line .= fgets($sock,1);
   $t = time();
   }
   fclose($sock);
   $end = time();
  
   if ($t=$timeout) {
   $http = parse_output($line);
   $http[result] = 502;
   $http[message] = Timed Out;
   $http[time_used] = $end - $start;
   $return = $http;
   } elseif($line) {
   $http = parse_output($line);
   $http[time_used] = $end - $start;
   $return = $http;
   }
   }
   }
   return $return;
   }
  
   function parse_output($line) {
   $lines = explode(\n, $line);
   if(substr($lines[0],0,4)==HTTP) {
   list($http[protocol], $http[result], $http[message]) =
   

[PHP] Why am i not getting any php e-mails? just testing;

2002-03-11 Thread Caleb Carvalho



_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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




Re: [PHP] attachment through mail

2002-03-11 Thread Samuel Ottenhoff

There is a very good article (with some well written OO classes) available
at PHPBuilder.  

http://www.phpbuilder.com/columns/kartic2807.php3

I think the classes are at:

http://www.phpbuilder.com/columns/kartic2807.zip

This will make file attachments very easy.

BTW, the PHPBuilder columns section should be bookmarked by most  people.
It answers a lot of questions on this list about session management, gd
image creation, file uploads, etc.

http://www.phpbuilder.com/columns/

Sam



On 3/12/02 2:03 AM, Swati Patil [EMAIL PROTECTED] wrote:

 i m using php4.1.1
 in the mail function, i want to provide the facility to the end user to
 attach his/her  word document.
 how can i do this?
 
 swati.


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




[PHP] Re: impossible to delete file after 'parse_ini_file'

2002-03-11 Thread Gregory Collette

Running on win nt !



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




Re: [PHP] connection speed?

2002-03-11 Thread Samuel Ottenhoff

There aren't too many elegant ways to do this, that I know of.

You can create a flash movie with a big chunk of nothing in it... With a
couple of calls, you can find how long it took to load So if it took 4
secs to load 200k You can sort of figure out their connection speed.

But unfortunately, there is not going to be any:

$speed = get_connection_speed();

Sam
 

On 3/11/02 2:29 AM, Kunal Jhunjhunwala [EMAIL PROTECTED] wrote:

 Hey,
 How can I detect the users connection speed? I dont want to ask them.. :)
 Regards,
 Kunal Jhunjhunwala
 
 Minds think with ideas, not information. No amount of data, bandwidth, or
 processing power can substitute for inspired thought. - Clifford Stoll
 


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




RE: [PHP] Help w/ join syntax

2002-03-11 Thread Rick Emery

What do you mean it doesn't work?  What results are you getting?

Specifics...we need specifics...

-Original Message-
From: Anthony Rodriguez [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 6:44 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Help w/ join syntax


When I call the following script, $qry_1 doesn't work (No Query # 1!).

?php
set_time_limit(300);
$connection=mysql_connect(localhost,wagner,???) or die (No 
connection!);
$db=mysql_select_db(sbwresearch,$connection) or die (No database!);

$qry_1=select
first_name.con_inf,
...
zip.con_inf,
label.svy_149
from con_inf, svy_149 where con_inf.username=svy_149.username;
$result_1=mysql_query($qry_1,$connection) or die (No query # 1!);
while ($row_1=mysql_fetch_array($result_1, MYSQL_ASSOC))
{
   $first_name=$row_1[first_name];
   ...
   $zip=$row_1[zip];
   $label=$row_1[label];
   if ($label==n)
   {
   $qry_2=insert into address_149
   (
   first_name,
   ...,
   zip)
   values (
   \$first_name\,
   ...,
   \$zip\
   );
   $result_2=mysql_query($qry_2,$connection);
   };
};

mysql_free_result($result_1);
mysql_close($connection);
echo bDONE/b;
flush();
exit;
?

Thanks!

Anthony F. Rodriguez
([EMAIL PROTECTED])


-- 
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] who can translate my ASP codes to PHP code? its very simple asp code...

2002-03-11 Thread Garth Dahlstrom

A perfect script to LEARN how to use PHP yourself...
here is some documentation to get you started:

http://www.php.net/quickref.php - PHP's function list index
http://www.zend.com/codex.php - PHP code gallery 
http://www.phpbuilder.com/ - lots of articles on building things in PHP

Northern.CA ===--
http://www.northern.ca 
Canada's Search Engine



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




RE: [PHP] Netscape Vs. IE

2002-03-11 Thread Vlad Kulchitski


Hi,

Someone replied to my post about browsers incompatibilities but I lost
the message, can someone remind me how to set up the background image:

td style='background: white'

I mean I need another command that will tell to load image as a bg. I am
trying to use background-image:file.gif, but it doesn't seem to work.

Thanks,
Vlad


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




RE: [PHP] Netscape Vs. IE

2002-03-11 Thread Richard S. Crawford

This can be done without CSS, actually.  Try:

td background=imagefile

Not all browsers will support this, of course.  But, then, even fewer
browsers will support the use of CSS for the same application.

You can also use:

td bgcolor=#ff

to make the background color white, again avoiding the use of CSS.

Both, I believe, will pass as valid HTML 4.01 and XHTML transitional
1.01.



On Mon, 2002-03-11 at 07:19, Vlad Kulchitski wrote:
 
 Hi,
 
 Someone replied to my post about browsers incompatibilities but I lost
 the message, can someone remind me how to set up the background image:
 
 td style='background: white'
 
 I mean I need another command that will tell to load image as a bg. I am
 trying to use background-image:file.gif, but it doesn't seem to work.
 
 Thanks,
 Vlad
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED]  http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



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




[PHP] problem with getdate()

2002-03-11 Thread Joshua E Minnie

I am having a problem with the getdate() function.  I don't understand why I
am getting the output that it is giving me.  Here is the code:

$timevalid_ = getdate();
$hours = $timevalid_[hours] + 1;
$minutes = $timevalid_[minutes];
$month = $timevalid_[mon];
$day = $timevaild_[mday];
$year = $timevalid_[year];

$update = mktime($hours, $minutes, 0, $month, $day, $year);

echo \$hours = $hoursBR\n;
echo \$minutes = $minutesBR\n;
echo \$month = $monthBR\n;
echo \$day = $dayBR\n;
echo \$year = $yearBR\n;
echo date(F jS, Y  g:i a,$update);

With this code the output is as follows, but I don't see why it is not
giving me the $day:

$hours = 10
$minutes = 27
$month = 3
$day =
$year = 2002
February 28th, 2002 10:27 am

You can see the code run from my server at
www.wildwebtech.com/php-bin/test/mfmtime.php

Any help that anyone can provide will be greatly appreciated.
--
Joshua E Minnie
CIO
[EMAIL PROTECTED]

Don't work for recognition, but always do work worthy of recognition.



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




Re: [PHP] Don't understand flock

2002-03-11 Thread Chris Hewitt

Kristian,

flock() is useful in a multiuser environment where two or more users 
might try to e.g edit a file at the same time. If this will not happen 
with what you are doing then you have no need for flock().

If, for example, you have a web application that updates a file then the 
application could use flock() to check whether the file may be opened or 
is already in use. It could be in use by another user of the same web 
application. If the file is not in use then using flock() will indicate 
to other instances of the application that the file is already in use. 
Using flock() does not actually prevent someone else opening it.

I think it is this basic information you were asking, apologies if I 
understood wrongly. The article you refer to shows how to use/call flock().

Hope this helps. Regards

Chris

Kristian Laren wrote:

Hi

I've read the article on http://www.php.net/manual/en/function.flock.php but
i stille don't understand what flock() is doing, what it's good for, how i
use it and what it help
Would someone please help understand it??

Thanks
  Kristian Larsen
  Denmark







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




Re: [PHP] problem with getdate()

2002-03-11 Thread Jason Wong

On Monday 11 March 2002 23:31, Joshua E Minnie wrote:
 I am having a problem with the getdate() function.  I don't understand why
 I am getting the output that it is giving me.  Here is the code:

 $day = $timevaild_[mday];

Typo!



-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
Nobody can be as agreeable as an uninvited guest.
*/

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




[PHP] Multi-Densional Array Sorting?

2002-03-11 Thread houser

Okay - here's one for you. Probably something really small and stoopid which I'm 
fergeting, but I don't mind a little egg on my face as long as I can figure out the 
problem.

Since you may or may not be down, I've included plenty o'comments to assist you in 
looking at this issue for me - thanks, by the way!

I'm having a problem in the code below. In simple, if you were to copy and paste the 
code to a file and run it on a PHP enabled server, you'll see a nifty table. Click on 
any one of the column headings and BAM!! - the column gets resorted (either ascending 
or descending) WITH ONE EXCEPTION - if you click on the last column heading, be ready 
to have your task manager window open so you can kill your browser, or else this puppy 
will lock your box tighter than a Bavarian virgin!! 

It doesn't seem to matter WHAT the last column is, as evident by the last column name 
in the below example - previously it would bag on position. Now position works fine, 
but be wary of test.

So I know it has to be something with the last column, but am having a little 
difficulty fighting my way out of this paper bag.

Any thoughts?

Here's the code:
// BEGIN TEST.PHP
// First we'll create a multi-demensional array of dummy info
$arr[id][] = 1;
$arr[name][] = John;
$arr[position][] = Developer;
$arr[test][] = schtuff;

$arr[id][] = 2;
$arr[name][] = Andrew;
$arr[position][] = Senior Product Designer;
$arr[test][] = schtuff4;

$arr[id][] = 3;
$arr[name][] = Christina;
$arr[position][] = Product Manager;
$arr[test][] = schtuff3;

// Next, for this example, we're gonna need a default sort order
// if we haven't defined one, we'll set it to the ID field
if(!isset($order_by)) $order_by = id;

if($order_dir == DSC) arsort($arr[$order_by]); // This does a reverse sort 
on our 2nd dimension
else asort($arr[$order_by]);// This does a normal sort on our 2nd dimension

// Start spitting out the UI
echo table border=1tr bgcolor=#ee;
// Walk through each 1st dimension to write the table headers based on the 1st 
dimension values
foreach($arr as $key = $val){
echo tda href=.$PHP_SELF.?order_by=$key;
if(($key == $order_by)(!isset($order_dir))) echo order_dir=DSC;
echo $key;
if($key == $order_by){ // Getting fancy now, aren't we?
if($order_dir == DSC) echo [-];
else echo [+];
}
echo /a/td;
}
echo /tr;

// Now we'll spit out the actual data
// Go through the now sorted 2nd dimension and get the keys (which holds the 
data positions
// in the other 2nd dimensions
while(list($key) = each($arr[$order_by])){
echo tr;
// now that we have the 2nd dimension key, we'll walk through the 1st 
dimension arrays
// one by one and get the value by way of our determined key
foreach($arr as $skey = $sval){
echo td.$arr[$skey][$key]./td;
}
echo /tr;
}
echo /table;
// END TEST.PHP

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




Re: [PHP] unable to use built in functions

2002-03-11 Thread Jason Wong

On Monday 11 March 2002 23:31, CHANDRA VENKAT RAO wrote:
 How do I know the php on the  server  is confired with ftp-enabled!

Your PHP setup is NOT configured with --enable-ftp, that is why you're 
getting that error. How did you install PHP, from RPMs? from source?


 sorry I didn't get that Printer function are only available on windows
 platforms

 I written file.php on linux 7.2 with Apache as webserver  but accessing
 from windows os IE5.5. still I get the same error.

Printer functions are only available if the *webserver* (not the 
client/browser) is running on a Windows platform.


Again, please read the manual.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
BEWARE!  People acting under the influence of human nature.
*/

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




RE: [PHP] Database abstraction layer oci

2002-03-11 Thread Andrew Hill

Most powerful meaning being tied to Oracle? :)

ODBC is not inherently slower than oci or any native access, and a properly
written ODBC driver will actually enforce additional functionality against
the back-end database.

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access  Data Integration Technology Providers


 -Original Message-
 From: Thies C. Arntzen [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, March 09, 2002 5:10 AM
 To: Andrew Hill
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [PHP] Database abstraction layer oci


 hi,

 the fastest and most powerful is always to use the native
 api.

 i would use the PHP oci driver.

 tc

 On Fri, Mar 08, 2002 at 09:00:17AM -0500, Andrew Hill wrote:
  I suggest simply using ODBC.
 
  Best regards,
  Andrew Hill
  Director of Technology Evangelism
  http://www.openlinksw.com/virtuoso/whatis.htm
  OpenLink Virtuoso Internet Data Integration Server
 
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
   Sent: Friday, March 08, 2002 5:39 AM
   To: [EMAIL PROTECTED]
   Subject: [PHP] Database abstraction layer oci
  
  
  
   Hi everybody.
  
   I would like your opinion on the Database Abstraction Layer
 you prefer (I
   will use it with Oracle 8i)
   I know that there is Metabase end Pear DB
  
   What's  your opinion on both or others ?
  
   Laurent Drouet
  
  
  
   --
   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] 5 Records per line

2002-03-11 Thread Thomas Edison Jr.

Hi,

I would like to display 5 records per line on the
Results page. Not seperated by a comma, but just
seperated by Space. How can i do that?

Thanks,
T. Edison jr.


=
Rahul S. Johari (Director)
**
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
***

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




Re: [PHP] 5 Records per line

2002-03-11 Thread Thomas Edison Jr.

Hi,

Thanks for writing back. 
Basically what i want is, that on a results page, i
want that the records should be placed only 5 on one
line.

For example, let's say i have 100 usernames in a table
in my database. 
Now on one page, i want to display all these
usernames. But i want that in one line, there should
be only 5 usernames, seperates by spaces. Like this :

user1 user2 user3 user4 user5
user6 user7 user8 user9 user10

Can you help?
Thanks,

T. Edison jr.

--- RIVES Sergio [EMAIL PROTECTED] wrote:
 may you give me more explanations ?
 thanx
 SR
 
 Thomas Edison Jr. a écrit :
 
  Hi,
 
  I would like to display 5 records per line on the
  Results page. Not seperated by a comma, but just
  seperated by Space. How can i do that?
 
  Thanks,
  T. Edison jr.
 
  =
  Rahul S. Johari (Director)
  **
  Abraxas Technologies Inc.
  Homepage : http://www.abraxastech.com
  Email : [EMAIL PROTECTED]
  Tel : 91-4546512/4522124
  ***
 
  __
  Do You Yahoo!?
  Try FREE Yahoo! Mail - the world's greatest free
 email!
  http://mail.yahoo.com/
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit:
 http://www.php.net/unsub.php
 


=
Rahul S. Johari (Director)
**
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
***

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




Re: [PHP] 5 Records per line

2002-03-11 Thread Jason Wong

On Tuesday 12 March 2002 00:03, Thomas Edison Jr. wrote:
 Hi,

 I would like to display 5 records per line on the
 Results page. Not seperated by a comma, but just
 seperated by Space. How can i do that?

Pseudo code:

  connect to db
  make query
  while results {
   display 5 results separated by a space
  }


If you have some actual code, post it so we can build on it or correct it. If 
you don't know where to start then at least write some code to connect to 
your db.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
Twenty years of romance make a woman look like a ruin; but twenty years of
marriage make her something like a public building.
-- Oscar Wilde
*/

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




Re: [PHP] 5 Records per line

2002-03-11 Thread Edward van Bilderbeek - Bean IT

just use something like this in your while-loop:

if ($counter % 5 == 0) {
print br;
}


Greets,

Edward


- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 11, 2002 5:08 PM
Subject: Re: [PHP] 5 Records per line


 On Tuesday 12 March 2002 00:03, Thomas Edison Jr. wrote:
  Hi,
 
  I would like to display 5 records per line on the
  Results page. Not seperated by a comma, but just
  seperated by Space. How can i do that?

 Pseudo code:

   connect to db
   make query
   while results {
display 5 results separated by a space
   }


 If you have some actual code, post it so we can build on it or correct it.
If
 you don't know where to start then at least write some code to connect to
 your db.

 --
 Jason Wong - Gremlins Associates - www.gremlins.com.hk

 /*
 Twenty years of romance make a woman look like a ruin; but twenty years of
 marriage make her something like a public building.
 -- Oscar Wilde
 */

 --
 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] 5 Records per line

2002-03-11 Thread Chris Boget

 Basically what i want is, that on a results page, i
 want that the records 

You mean fields

 should be placed only 5 on one line.
 For example, let's say i have 100 usernames in a table
 in my database. 
 Now on one page, i want to display all these usernames. 
 But i want that in one line, there should be only 5 usernames, 
 seperates by spaces. Like this :
 user1 user2 user3 user4 user5
 user6 user7 user8 user9 user10

Use a counter while looping through the results.  
When counter % 5 = 0, do whatever you need to create a new
line.  \n, /tr, whatever.

Chris


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




Re: [PHP] 5 Records per line

2002-03-11 Thread Thomas Edison Jr.

Hi,

This is the code i'm using so far :

?php
$db = mysql_connect(localhost,user,pass);
mysql_select_db(mydb,$db);

$result = mysql_query(SELECT * FROM sms ORDER BY ID
DESC,$db);
if ($myrow = mysql_fetch_array($result)) {
  do {

   echo(bfont color=#6ed8ff$myrow[num]/b
br);

  } while ($myrow = mysql_fetch_array($result));
} 

else {
  echo Sorry, no records matching your criteria were
found!;
}
?

But this displays all records one per line...

T. Edison Jr.



=
Rahul S. Johari (Director)
**
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
***

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




[PHP] Re: Authorize.net example

2002-03-11 Thread Jeremy Reed

Ahh, you had the same problem as I.  Fortunately, I've worked out a pretty
good fix.  It makes use of the CURL module in PHP.  I think CURL comes
standard in the 4.x versions of PHP,  but I'm not sure.

Anywho, here's the code:

--BEGIN CODE-
?php
$ch = curl_init(https://url.authnet.com;);
$data =
x_Version=3.0x_Login=loginnamex_adc_url=Falsex_adc_delim_data=TRUEx_car
d_num=1234123412341234x_exp_date=0104x_Amount=24.45x_Test_Request=TRUEx_
Type=AUTH_CAPTUREx_first_name=FNAMEx_last_name=LNAMEx_email_merchant=TRUE
;
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $data);
$buf = curl_exec ($ch); //execute post and get results
echo($buf);
curl_close ($ch);
?
-END CODE-

Be sure to include the 'https://' in the curl_init() function.  That is what
tells the program that all the data should be encoded.  Obviously, the
'$data' variable holds all the post data and you can, of course, build this
string on the fly with form data etc.

Pretty simple once you know how to do it.

Best regards,

Jeremy Reed
David Johansen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Could someone tell me where I could get a basic Authorize.net example to
 work off of. I'm sure that I could do it all from scratch, but a base to
 start from would be nice and make it a lot faster. Thanks,
 Dave





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




FW: [PHP] Netscape Vs. IE

2002-03-11 Thread Johnson, Kirk



-Original Message-
From: Richard S. Crawford [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 8:30 AM
To: Vlad Kulchitski
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Netscape Vs. IE


This can be done without CSS, actually.  Try:

td background=imagefile

Not all browsers will support this, of course.  But, then, even fewer
browsers will support the use of CSS for the same application.

You can also use:

td bgcolor=#ff

to make the background color white, again avoiding the use of CSS.

Both, I believe, will pass as valid HTML 4.01 and XHTML transitional
1.01.



On Mon, 2002-03-11 at 07:19, Vlad Kulchitski wrote:
 
 Hi,
 
 Someone replied to my post about browsers incompatibilities but I lost
 the message, can someone remind me how to set up the background image:
 
 td style='background: white'
 
 I mean I need another command that will tell to load image as a bg. I am
 trying to use background-image:file.gif, but it doesn't seem to work.
 
 Thanks,
 Vlad
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED]  http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



-- 
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] Problems installing PHP

2002-03-11 Thread Berlina

Hi again,

Im trying to install an Apache Web Server and PHP in a Windows NT .

* Apache 1.2.23
* PHP 4.1.1
* Windows NT Server 4.0 with SP4

The installation of Apache Web Server and PHP was succesfully ok, but when I
configure the PHP and Apache, editing the PHP.ini and httpd.conf files, as
installation manual says, was not any problem neither.

The problem appears when i try to load a php file with the web server, then
shows all the content of a file. The server reads and show the file but not
execute it.
And, of course I added the lines:
LoadModule php4_module PATH/php4apache.dll
AddType application/x-httpd-php .php
in my httpd.conf file.

Any ideas?
Advanced thanks,
Berli

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




[PHP] Novata Como inicio??

2002-03-11 Thread Jenny Fox

Primeramente alguien sabe español???, estoy iniciandome en PHP entre a dicha página, 
pero me quede truncada en la instalación, alguien me puede dar una mano
Saludos de
  Jenny León




[PHP] Installing PHP 4.1.2

2002-03-11 Thread Marcel Besancon

Hi everybody,

i've got a problem again. I want to install PHP 4.1.2. Now my problem:
There's only a source code distribution on php.net. How do I install it on
Windows XP? I read the documentation, but I all I understood was bla. So,
you see I understood nothing. Is there anyone who can explain it an easy way
???

Thanks.

Marcel

--
registered Fli4l-User #0388



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




RE: [PHP] Novata Como inicio??

2002-03-11 Thread Hunter, Ray

Que es su problema?



Thank you,

Ray Hunter
Firmware Engineer

ENTERASYS NETWORKS


-Original Message-
From: Jenny Fox [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 11, 2002 9:41 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Novata Como inicio??


Primeramente alguien sabe español???, estoy iniciandome en PHP entre a dicha
página, pero me quede truncada en la instalación, alguien me puede dar una
mano Saludos de
  Jenny León




[PHP] Update database via email

2002-03-11 Thread Jackson Miller

I am working on a site that I
would like to be able to
update content (basically news
stories) on via email.  I am
sitting with the problem
trying to figure out the best
way to do this before I start
coding.

I am curious if anyone else
has done this and has a list
of lessons learned that they
would be willing to share.
Also is there any code
available that does this kind
of thing.

Thanks in advance,

-Jaxn


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




Re: [PHP] Installing PHP 4.1.2

2002-03-11 Thread Andrey Hristov

There was a discussion on PHP-DEV. Win32 binaries will be available soon.

Best regards,
Andrey Hristov

- Original Message - 
From: Marcel Besancon [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 11, 2002 6:43 PM
Subject: [PHP] Installing PHP 4.1.2


 Hi everybody,
 
 i've got a problem again. I want to install PHP 4.1.2. Now my problem:
 There's only a source code distribution on php.net. How do I install it on
 Windows XP? I read the documentation, but I all I understood was bla. So,
 you see I understood nothing. Is there anyone who can explain it an easy way
 ???
 
 Thanks.
 
 Marcel
 
 --
 registered Fli4l-User #0388
 
 
 
 -- 
 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] Update database via email

2002-03-11 Thread Adam Plocher

If you want an html form in an email, that's possible, but the form will
probably need to submit to a php script (via http, not email).  You would
just need to set the content-type of the email to text/html.

You wouldn't be able to have an active php script embedded in an email
(other than having it called via http).

-Original Message-
From: Jackson Miller [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 11, 2002 8:52 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Update database via email


I am working on a site that I
would like to be able to
update content (basically news
stories) on via email.  I am
sitting with the problem
trying to figure out the best
way to do this before I start
coding.

I am curious if anyone else
has done this and has a list
of lessons learned that they
would be willing to share.
Also is there any code
available that does this kind
of thing.

Thanks in advance,

-Jaxn


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



[PHP] limiting the livetime of a session possible?

2002-03-11 Thread Andy

Hi there,

I am building a user registering module and now I am wondering if there
would be a way to destroy the session if the user was inactive for an
specified amount of time.

I found an article on that with following line:
If you propagate the session ID via cookies, you can influence the cookies
lifetime with the configuration value lifetime.

Which configuration? I tryed session_set_cookie_params(10); But this is only
valid for the same script.

Does anybody have a good idea, or possibly a hint?

Thanx for any help,

Andy



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




[PHP] removing ALL whitespace from a string

2002-03-11 Thread Lee P Reilly

Can somebody tell me if there is a function that will remove *all*
whitespace (\n, \r, \t, \w, etc) from a string i.e. from the beginning,
the end, and the middle?. Something like chop(), trim()?

e.g. input =12 3ad 
e.g. output = 123ad

Thanks,

Lee


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




[PHP] Re: removing ALL whitespace from a string

2002-03-11 Thread Jordan S. Jones

You can use a regular expression for that.. However, I don't have that right
here..

Jordan

Lee P Reilly [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Can somebody tell me if there is a function that will remove *all*
 whitespace (\n, \r, \t, \w, etc) from a string i.e. from the beginning,
 the end, and the middle?. Something like chop(), trim()?

 e.g. input =12 3ad 
 e.g. output = 123ad

 Thanks,

 Lee




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




Re: [PHP] removing ALL whitespace from a string

2002-03-11 Thread Andrey Hristov

$new=preg_replace('/\s/','',$old);

Best regards,
Andrey Hristov

- Original Message - 
From: Lee P Reilly [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Monday, March 11, 2002 6:56 PM
Subject: [PHP] removing ALL whitespace from a string


 Can somebody tell me if there is a function that will remove *all*
 whitespace (\n, \r, \t, \w, etc) from a string i.e. from the beginning,
 the end, and the middle?. Something like chop(), trim()?
 
 e.g. input =12 3ad 
 e.g. output = 123ad
 
 Thanks,
 
 Lee
 
 
 -- 
 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] removing ALL whitespace from a string

2002-03-11 Thread Rasmus Lerdorf

$output = preg_replace('/\s/','',$input);

On Mon, 11 Mar 2002, Lee P Reilly wrote:

 Can somebody tell me if there is a function that will remove *all*
 whitespace (\n, \r, \t, \w, etc) from a string i.e. from the beginning,
 the end, and the middle?. Something like chop(), trim()?

 e.g. input =12 3ad 
 e.g. output = 123ad

 Thanks,

 Lee


 --
 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] removing ALL whitespace from a string

2002-03-11 Thread Demitrious S. Kelly

You can use strtok() with ' ' as the delim

-Original Message-
From: Lee P Reilly [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 11, 2002 8:56 AM
To: PHP List
Subject: [PHP] removing ALL whitespace from a string

Can somebody tell me if there is a function that will remove *all*
whitespace (\n, \r, \t, \w, etc) from a string i.e. from the beginning,
the end, and the middle?. Something like chop(), trim()?

e.g. input =12 3ad 
e.g. output = 123ad

Thanks,

Lee


-- 
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] 5 Records per line

2002-03-11 Thread Thomas Edison Jr.

Hey THANKS!

It worked.. just the way i wanted! Thank you so much.

T. Edison Jr.


--- RIVES Sergio [EMAIL PROTECTED] wrote:
 i don't know if it will work... i am quite a newbie
 in this stuff.
 
 Hope it could help you
 
 
 Thomas Edison Jr. a écrit :
 
  Hi,
 
  This is the code i'm using so far :
 
  ?php
  $db = mysql_connect(localhost,user,pass);
  mysql_select_db(mydb,$db);
 
  $result = mysql_query(SELECT * FROM sms ORDER BY
 ID
  DESC,$db);
  if ($myrow = mysql_fetch_array($result)) {
do {
 
 
 echo(bfont color=#6ed8ff$myrow[num]/b
  br);
 
 if ($counter % 5 == 0) {
 print br;
 }
 $counter++;
 
 
 
} while ($myrow = mysql_fetch_array($result));
  }
 
  else {
echo Sorry, no records matching your criteria
 were
  found!;
  }
  ?
 
  But this displays all records one per line...
 
  T. Edison Jr.
 
  =
  Rahul S. Johari (Director)
  **
  Abraxas Technologies Inc.
  Homepage : http://www.abraxastech.com
  Email : [EMAIL PROTECTED]
  Tel : 91-4546512/4522124
  ***
 
  __
  Do You Yahoo!?
  Try FREE Yahoo! Mail - the world's greatest free
 email!
  http://mail.yahoo.com/
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit:
 http://www.php.net/unsub.php
 


=
Rahul S. Johari (Director)
**
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
***

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




Re: [PHP] Update database via email

2002-03-11 Thread Samuel Ottenhoff

If I were you, I would start looking into procmail.

http://www.procmail.org

You would set up an alias on your server... Something like
[EMAIL PROTECTED]  Procmail would filter the email for the important
stuff and pass that on to a PHP script.  The php script would then update
your database.

Try a google search on procmail php.

Sam


On 3/11/02 11:52 AM, Jackson Miller [EMAIL PROTECTED] wrote:

 I am working on a site that I
 would like to be able to
 update content (basically news
 stories) on via email.  I am
 sitting with the problem
 trying to figure out the best
 way to do this before I start
 coding.
 
 I am curious if anyone else
 has done this and has a list
 of lessons learned that they
 would be willing to share.
 Also is there any code
 available that does this kind
 of thing.
 
 Thanks in advance,
 
 -Jaxn
 


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




[PHP] php.ini ...

2002-03-11 Thread Marcel Besancon

Hi, it's me again,

when I used the PHP 4.0.6 I had a php.ini with a lot of entries. Now, at
Version 4.1.1, there's a php.ini with this content:


-
; php.ini for PEAR tests
include_path=..
[mail function]
SMTP= localhost ; for Win32 only
sendmail_from= [EMAIL PROTECTED] ; for Win32 only
upload_tmp_dir = C:\PHP\uploadtemp  ; temporary directory for HTTP uploaded
files (will use system default if not specified)
[Session]
session.save_path= C:\PHP\sessiondata; argument passed to save_handler
[PHP]
error_reporting= E_ALL  ~(E_NOTICE | E_USER_NOTICE | E_WARNING |
E_COMPILE_WARNING | E_CORE_WARNING | E_USER_WARNING) ; display all errors


-

Now, where can I find the entries for the extensions that you should be
used? I want to use the gd-library. I copied the DLL to the include-path (I
don't know if that's the correct way !!!), but now I can't tell PHP to use
the DLL!!! Please help me !!!

Marcel

--
registered Fli4l-User #0388



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




[PHP] Image upload and scaling

2002-03-11 Thread P.Agenbag

Hi, I am trying to make a util whereby ppl can upload their own images to my server 
for me to automatically display them.
The below code works fine, but I have the following problem.
It only works fne if everyone complies to a standard of a set width and height for the 
image. This is not always possible, so I'm looking for a way to accept the image in 
any form they have and then to scale it 
to fit within an acceptable height/width range.
This I need help with, so if someone could hep me ( at the hand of my current code) I 
would be very pleased.

Thanks

Petre

below my code snippet


?php
if ($submit) {
if ($file != none) {

$current_time = time();
$location_pic = /home/www/imgs/listings/.$current_time.$file_name;
$url_pic = 
http://www.website.co.za/imgs/listings/.$current_time.$file_name;
copy ($file,$location_pic);
$db= mysql_pconnect(localhost,db_user,db_password);
mysql_select_db(DB_NAME,$db);
$sql = update table set location_pic = \$location_pic\, url_pic = 
\$url_pic\ where id = \$id_pic\ ;
$result = mysql_query($sql);

}
echo Picture Uploaded! Thank You!br;
echo Below is a preview of how your logo will look. If it displays 
incorrectly, adjust your image with an image editor of choice and upload again.br;
echo img src=\$url_pic\ width=\350\ height=\150\;
}else {
echo 
Please use this form to upload image.brbrbr
form method=\post\ action=\$PHP_SELF\ enctype=\multipart/form-data\
Logo Location : input type=\file\ name=\file\brbrbrbrPlease Note!Your 
image must be smaller than 50KB!
input type=\hidden\ name=\MAX_FILE_SIZE\ value=\5\
input type=\hidden\ name=\id_pic\ value=\$id\br
input type=\submit\ name=\submit\ value=\submit\
;}
?




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




Re: [PHP] Update database via email

2002-03-11 Thread Enrico Weigelt

On Mon, Mar 11, 2002 at 11:52:20AM -0500, Jackson Miller wrote:

 I am working on a site that I
 would like to be able to
 update content (basically news
 stories) on via email.  I am
 sitting with the problem
 trying to figure out the best
 way to do this before I start
 coding.

i'm doing symetric database replication per email.
i've written some mail robots, which are called from /etc/aliases ...

~-n
--
 Enrico Weigelt==   meTUX IT services 
 software development, IT service, internet security solutions
 www: http://www.metux.de/phone: +49 36207 519931
 email:   [EMAIL PROTECTED]cellphone: +49 174 7066481

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




Re: [PHP] limiting the livetime of a session possible?

2002-03-11 Thread Andrey Hristov

PHP4 sessions or self made sessions. If PHP4 there is an option in php.ini to set 
about how frequently the GC(garbage collector)
will be started. Otherwise if self made and using a DB for backend - add new field 
last_time , and on every page request do Delete
from session_table where last_timenow() interval 60 min; not sure for the query but 
that is the idea.


Best regards,
Andrey Hristov

- Original Message -
From: Andy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 11, 2002 6:46 PM
Subject: [PHP] limiting the livetime of a session possible?


 Hi there,

 I am building a user registering module and now I am wondering if there
 would be a way to destroy the session if the user was inactive for an
 specified amount of time.

 I found an article on that with following line:
 If you propagate the session ID via cookies, you can influence the cookies
 lifetime with the configuration value lifetime.

 Which configuration? I tryed session_set_cookie_params(10); But this is only
 valid for the same script.

 Does anybody have a good idea, or possibly a hint?

 Thanx for any help,

 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




RE: [PHP] php.ini ...

2002-03-11 Thread Hunter, Ray

Before you installed did you make a copy of the php.ini file...?  If you did
not then it might have been overwritten with the new installation.  

Sounds like you did the basic installer installation.  You might need to
download the zip file and do a manual installation to get the required data.



Thank you,

Ray Hunter
Firmware Engineer

ENTERASYS NETWORKS


-Original Message-
From: Marcel Besancon [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 11, 2002 10:18 AM
To: [EMAIL PROTECTED]
Subject: [PHP] php.ini ...


Hi, it's me again,

when I used the PHP 4.0.6 I had a php.ini with a lot of entries. Now, at
Version 4.1.1, there's a php.ini with this content:


-
; php.ini for PEAR tests
include_path=..
[mail function]
SMTP= localhost ; for Win32 only
sendmail_from= [EMAIL PROTECTED] ; for Win32 only
upload_tmp_dir = C:\PHP\uploadtemp  ; temporary directory for HTTP uploaded
files (will use system default if not specified) [Session]
session.save_path= C:\PHP\sessiondata; argument passed to save_handler
[PHP]
error_reporting= E_ALL  ~(E_NOTICE | E_USER_NOTICE | E_WARNING |
E_COMPILE_WARNING | E_CORE_WARNING | E_USER_WARNING) ; display all errors


-

Now, where can I find the entries for the extensions that you should be
used? I want to use the gd-library. I copied the DLL to the include-path (I
don't know if that's the correct way !!!), but now I can't tell PHP to use
the DLL!!! Please help me !!!

Marcel

--
registered Fli4l-User #0388



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



[PHP] dynamic startpage in flash...

2002-03-11 Thread Eric Trezza

Hello,

Far from being an expert in PHP, I work with it to make Flash dynamic...

But I need help for the following point:

I would like to send a dynamic variable to a Flash movie at the same time
PHP build the HTML page containing this Flash movie. The idea behind it is
for mail links. We want to give some links in emails like
http://www.blabla.com/mailTarget.php?target=6 and then ask PHP build the
HTML page containing the flash movie which needs the variable 'target' to
know which part of the movie to begin with.

Thanks for your help...


Trezza Eric
-- 
) b-tween (
web design  e-communication  e-education
http://www.b-tween.com
Geneva, Switzerland  Tel. (+41) 22 782 38 60


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




[PHP] ImagePng: No PNG support in this PHP build

2002-03-11 Thread Josep Raurell

Hello.

I alwais get this message, i try with the gd and libpng librarys from the SuSE 
7.0, and after uninstalling with the sources librarys.
(gd works ok)

The result is the same:

ImagePng: No PNG support in this PHP build 

This is my last configure setting:

 './configure' '--prefix=/usr/local/intranet/php' '--exec-
prefix=/usr/local/intranet/php' '--with-
apache=/usr/local/src_intranet/apache_1.3.22' '--with-gettext' '--with-
mysql=/usr/local/mysql' '--with-imap' '--with-ibm-
db2=/usr/IBMdb2/7.1/include' '--with-pdflib=/usr/local/pdflib4' '--with-zlib' '-
-with-png-dir=/usr/local' '--with-gd=/usr/local'

It seems a problem that other people had, but I can't found the sollution in 
the forums.

Help please.

Josep R. Raurell.




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




Re: [PHP] Problems installing PHP

2002-03-11 Thread DL Neil

Hi Berlina,

 Im trying to install an Apache Web Server and PHP in a Windows NT .

 * Apache 1.2.23
 * PHP 4.1.1
 * Windows NT Server 4.0 with SP4

 The installation of Apache Web Server and PHP was succesfully ok, but
when I
 configure the PHP and Apache, editing the PHP.ini and httpd.conf
files, as
 installation manual says, was not any problem neither.

 The problem appears when i try to load a php file with the web server,
then
 shows all the content of a file. The server reads and show the file
but not
 execute it.
 And, of course I added the lines:
 LoadModule php4_module PATH/php4apache.dll
 AddType application/x-httpd-php .php
 in my httpd.conf file.


My (NT) system is Apache 1.3.20, PHP 4.0.6, NTWS 4.0 SP6a

Entries in httpd.conf that you didn't mention:

ScriptInterpreterSource registry
and in:
IfModule mod_alias.c
ScriptAlias /php/ C:/Program Files/PHP/
later (in addition to what you described) in:
IfModule mod_mime.c
Action application/x-httpd-php /php/php.exe
AddType application/x-httpd-php .php .phtml .php3 .php4

- watch those PATHs!?

I'm not sure if any/all of them might be useful to you - I'm no Apache
specialist, but I followed the instructions given and everything runs
really well.

Regards,
=dn


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




[PHP] registering $_REQUEST variables as session variables.

2002-03-11 Thread Gonzalez, Zara E

Hullo,

I was just wondering if anyone knew an easy way to register all $_REQUEST
variables as session variables.

Or if there's not any easy way to do that, if there is an easier way than doing
it this way for each variable:

$a = $_REQUEST['a'];
session_register(a);
$b = $_REQUEST['b'];
session_register(b);

etc

I have a bunch of form variables that I need to set as session variables, but
I'm not sure if there is an easy way to do so or not.

I tried:
session_register($_REQUEST['a']);

but that didn't seem to work...

any help is appreciated,

Zara

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




[PHP] phpMyAdmin

2002-03-11 Thread Chuck \PUP\ Payne

I have a client that has install phpMyAdmin but can't get into he gets this
error;

Error
MySQL said:


Access denied for user: 'root@localhost' (Using password: NO)


Is there a way to get into if he knows the password?

Chuck PUP Payne
Sr. System Administrator
GDI Engineering, Inc.




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




[PHP] Re: registering $_REQUEST variables as session variables.

2002-03-11 Thread Julio Nobrega Trabalhando

$_SESSION['from_form'] = $_REQUEST;

--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884


Zara E Gonzalez [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hullo,

 I was just wondering if anyone knew an easy way to register all $_REQUEST
 variables as session variables.

 Or if there's not any easy way to do that, if there is an easier way than
doing
 it this way for each variable:

 $a = $_REQUEST['a'];
 session_register(a);
 $b = $_REQUEST['b'];
 session_register(b);

 etc

 I have a bunch of form variables that I need to set as session variables,
but
 I'm not sure if there is an easy way to do so or not.

 I tried:
 session_register($_REQUEST['a']);

 but that didn't seem to work...

 any help is appreciated,

 Zara



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




RE: [PHP] Re: registering $_REQUEST variables as session variables.

2002-03-11 Thread Gonzalez, Zara E

So because I'm a little dense, would that register the whole $_REQUEST array as
a session variable? Or just 'from_form' ?

Thanks,

Zara

-Original Message-
From: Julio Nobrega Trabalhando [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 11, 2002 12:09 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: registering $_REQUEST variables as session variables.

$_SESSION['from_form'] = $_REQUEST;

--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884


Zara E Gonzalez [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hullo,

 I was just wondering if anyone knew an easy way to register all $_REQUEST
 variables as session variables.

 Or if there's not any easy way to do that, if there is an easier way than
doing
 it this way for each variable:

 $a = $_REQUEST['a'];
 session_register(a);
 $b = $_REQUEST['b'];
 session_register(b);

 etc

 I have a bunch of form variables that I need to set as session variables,
but
 I'm not sure if there is an easy way to do so or not.

 I tried:
 session_register($_REQUEST['a']);

 but that didn't seem to work...

 any help is appreciated,

 Zara



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

2002-03-11 Thread John S. Huggins

On Mon, 11 Mar 2002, Chuck PUP Payne wrote:

-I have a client that has install phpMyAdmin but can't get into he gets this
-error;
-
-Error
-MySQL said:
-
-
-Access denied for user: 'root@localhost' (Using password: NO)
-
-
-Is there a way to get into if he knows the password?

Well, yes.  The root mysql account is most likely password protected and
yes if you have it then you should be able to get in.

If you do not have the password forthe root account, but do have it for
your mysql account, then change the parameters in the config files to
reflect your account settings.

-
-Chuck PUP Payne
-Sr. System Administrator
-GDI Engineering, Inc.
-
-
-
-
--- 
-PHP General Mailing List (http://www.php.net/)
-To unsubscribe, visit: http://www.php.net/unsub.php
-

**

John Huggins
VANet

[EMAIL PROTECTED]
http://www.va.net/

**


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




Re: [PHP] limiting the livetime of a session possible?

2002-03-11 Thread Andy

Hi Andrey,

is there no way to control the lifetime without modifiying the php.ini? I am
not on my own server. The ISP controles this file.

Would you suggest to go for a self made session?

Andy

Andrey Hristov [EMAIL PROTECTED] schrieb im Newsbeitrag
027901c1c91d$cce57970$0b01a8c0@ANDreY">news:027901c1c91d$cce57970$0b01a8c0@ANDreY...
 PHP4 sessions or self made sessions. If PHP4 there is an option in php.ini
to set about how frequently the GC(garbage collector)
 will be started. Otherwise if self made and using a DB for backend - add
new field last_time , and on every page request do Delete
 from session_table where last_timenow() interval 60 min; not sure for
the query but that is the idea.


 Best regards,
 Andrey Hristov

 - Original Message -
 From: Andy [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, March 11, 2002 6:46 PM
 Subject: [PHP] limiting the livetime of a session possible?


  Hi there,
 
  I am building a user registering module and now I am wondering if there
  would be a way to destroy the session if the user was inactive for an
  specified amount of time.
 
  I found an article on that with following line:
  If you propagate the session ID via cookies, you can influence the
cookies
  lifetime with the configuration value lifetime.
 
  Which configuration? I tryed session_set_cookie_params(10); But this is
only
  valid for the same script.
 
  Does anybody have a good idea, or possibly a hint?
 
  Thanx for any help,
 
  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




Re: [PHP] Re: registering $_REQUEST variables as session variables.

2002-03-11 Thread Julio Nobrega Trabalhando

  It would register a session variable name 'from_form' equal to $_REQUEST;

  The name 'from_form' was just an example, you need to change it according
to your needs, if you wish.

--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Zara E Gonzalez [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
So because I'm a little dense, would that register the whole $_REQUEST array
as
a session variable? Or just 'from_form' ?

Thanks,

Zara



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




[PHP] Check @ in Record show Error in mail() !!

2002-03-11 Thread Thomas Edison Jr.

Hi,

I'm using the following code to get Email Address
stored in a table in my Database :

?php
$db = mysql_connect(localhost,user,pass);
mysql_select_db(mydb,$db);

$result = mysql_query(SELECT * FROM sms where
email!='' ORDER BY ID DESC,$db);
if ($myrow = mysql_fetch_array($result)) {
  do {

   echo(bfont color=#6ed8ff$myrow[email]/b
br);

  } while ($myrow = mysql_fetch_array($result));
} 

else {
  echo Sorry, no records matching your criteria were
found!;
}
?

But there are some records where the user has entered
something else.. not the Email Address. I would like
to list only those records out of these, who do
contain the letter @, so that i'm sure only those
records which actually do contain an Email Adress are
listed. 

Also, when sending an email, like this :

if($submit) {
$headers .= From: Mjimm.com
[EMAIL PROTECTED]\n;
$headers .= X-Sender: [EMAIL PROTECTED]\n;
$headers .= X-Mailer: PHP\n; // mailer
$headers .= Reply-To: [EMAIL PROTECTED]\n; //
Return path for errors
$headers .= bcc:$b\n; // BCCs to
mail($to,$subject,$message,$headers);
}
?

If there are any errors in sending the mail, how can i
get those errors, or at least have the alert that an
error was there and mail could not be sent, printed on
the page?

Thanks,
T. Edison jr.



=
Rahul S. Johari (Director)
**
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
***

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




Re: [PHP] phpMyAdmin

2002-03-11 Thread Thomas Edison Jr.

With the phpMyAdmin, you get a Config.inc file. You
will have to change the parameters (username,
password, database) etc., in order to access your
phpMyAdmin.

T. Edison Jr.

--- Chuck \PUP\ Payne [EMAIL PROTECTED]
wrote:
 I have a client that has install phpMyAdmin but
 can't get into he gets this
 error;
 
 Error
 MySQL said:
 
 
 Access denied for user: 'root@localhost' (Using
 password: NO)
 
 
 Is there a way to get into if he knows the password?
 
 Chuck PUP Payne
 Sr. System Administrator
 GDI Engineering, Inc.
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


=
Rahul S. Johari (Director)
**
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
***

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




Re: [PHP] [GD] quality of image after resize

2002-03-11 Thread Hiroshi Ayukawa


I had the same situation before.
At that time, I used Imagemagick and run it as another process.
GD is actually poor quality in resizing images, but Imagemagick is not 
poor.

Hiroshi Ayukawa
http://hoover.ktplan.ne.jp/kaihatsu/php_en/index.php?type=top

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




[PHP] using ahref tag in $msg variable

2002-03-11 Thread Claudia Smith

I would like to know how to code my mail msg to accept an a href tag

my current code is:

$msg = $username wants you to check out \The AdVentures of AdWoman:
AdWoman's Dilemma.\\n\n;
$msg .= Play for a chance to win a Caribbean cruise presented by
Carnival Cruise Line and a
href='http://www.contus.com'Contus.com/a.\n\n;
$msg .= This adgame is presented by the American Advertising
Federation, which cordially invites you to attend the a
href='http://www.aaf.org' AdVentures Conference/a, the AAF's National
Convention in Miami, Florida June 5-8.
 $msg .= This adgame was created by AdGames.biz.\n\n;
   $mailheaders = From: [EMAIL PROTECTED]\n;
$mailheaders .=  Reply-To: [EMAIL PROTECTED]\n\n;
mail($friendemail1, $username Referred you an Adgame!, $msg,
$mailheaders);

My auto response email is printed with the  a href=code instead of
creating the hyperlink for me.

Any suggestions on how to create this type of hyper link in a non html
email?

Thanks



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




[PHP] index.php question

2002-03-11 Thread Omland Christopher m

Hi all, I'm new to the mailing list, I hope I'm in the right spot.
I have installed php, and .php files work fine, unless they are my index
file. For example http://whatever.com/~jondoe/info.php will work. But if I
make a index.php file and go to http://whatever.com/~jondoe it wont work.
I can view the source and see my php code, which I know means the server
isn't translating it. I'm running RH LINUX, and running apache webserver.
I have checked the httpd.conf file and the load modules lines are in
there, and they are correct??(I THINK)
Any help would be appreciated.
Thank You.
-Chris


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




Re: [PHP] index.php question

2002-03-11 Thread Samuel Ottenhoff

# 
# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index.  Separate multiple entries with spaces.
#
IfModule mod_dir.c
DirectoryIndex index.php index.php3 index.html
/IfModule

Sam

On 3/11/02 1:36 PM, Omland Christopher m [EMAIL PROTECTED]
wrote:

 Hi all, I'm new to the mailing list, I hope I'm in the right spot.
 I have installed php, and .php files work fine, unless they are my index
 file. For example http://whatever.com/~jondoe/info.php will work. But if I
 make a index.php file and go to http://whatever.com/~jondoe it wont work.
 I can view the source and see my php code, which I know means the server
 isn't translating it. I'm running RH LINUX, and running apache webserver.
 I have checked the httpd.conf file and the load modules lines are in
 there, and they are correct??(I THINK)
 Any help would be appreciated.
 Thank You.
 -Chris
 


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




Re: [PHP] php.ini ...

2002-03-11 Thread pong-TC

Go to your PHP directory and open backup folder inside.  It should have
php.ini right there.  That is a real one, and you can use it.

Hope, this would help.
Pong
[EMAIL PROTECTED] writes:
Hi, it's me again,

when I used the PHP 4.0.6 I had a php.ini with a lot of entries. Now,
at
Version 4.1.1, there's a php.ini with this content:


-
; php.ini for PEAR tests
include_path=..
[mail function]
SMTP= localhost ; for Win32 only
sendmail_from= [EMAIL PROTECTED] ; for Win32 only
upload_tmp_dir = C:\PHP\uploadtemp  ; temporary directory for HTTP
uploaded
files (will use system default if not specified)
[Session]
session.save_path= C:\PHP\sessiondata; argument passed to save_handler
[PHP]
error_reporting= E_ALL  ~(E_NOTICE | E_USER_NOTICE | E_WARNING |
E_COMPILE_WARNING | E_CORE_WARNING | E_USER_WARNING) ; display all errors


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




Re: [PHP] Image upload and scaling

2002-03-11 Thread Samuel Ottenhoff

Someone just mentioned ImageMagick... Check it out:

http://www.imagemagick.org/

ImageMagickTM is a robust collection of tools and libraries to read, write,
and manipulate an image in many image formats (over 68 major formats)
including popular formats like TIFF, JPEG, PNG, PDF, PhotoCD, and GIF. With
ImageMagick you can create images dynamically, making it suitable for Web
applications. You can also resize, rotate, sharpen, color reduce, or add
special effects to an image and save your completed work in the same or
differing image format. Image processing operations are available from the
command line, as well as through C, C++, Perl, or Java programming
interfaces.

Or you can check out the built in gd functions.

http://www.php.net/manual/en/ref.image.php

Sam


On 3/11/02 12:21 PM, P.Agenbag [EMAIL PROTECTED] wrote:

 Hi, I am trying to make a util whereby ppl can upload their own images to my
 server for me to automatically display them.
 The below code works fine, but I have the following problem.
 It only works fne if everyone complies to a standard of a set width and height
 for the image. This is not always possible, so I'm looking for a way to accept
 the image in any form they have and then to scale it
 to fit within an acceptable height/width range.
 This I need help with, so if someone could hep me ( at the hand of my current
 code) I would be very pleased.
 
 Thanks
 
 Petre
 
 below my code snippet


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




[PHP] PHP/Apache install question

2002-03-11 Thread Chuck Bearden

I would like to be able to build PHP using the apxs of an existing 
Apache install, but I want to inhibit 'make install' from placing 
the libphp4.so file in the apache directory and from modifying its 
httpd.conf.  I want the libphp4.so placed in the PHP target 
directory, so that I can symlink to it as needed.  I'll modify the 
httpd.conf as needed.  How do I control the behavior of 'make install' 
in that fashion?  

Thanks in advance,
Chuck
==
 Chuck Bearden   Library Systems Programmer/Analyst   Rice University
 [EMAIL PROTECTED]   713.348.3634  713.348.5862 (fax)
==


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




Re: [PHP] php.ini ...

2002-03-11 Thread Marcel Besancon

Hi,

thanks for last posting. But that doesn't work with me. Don't ask me
why. I will try further. Maybe I have better luck with this 4.1.2 version. I
was told that the php_gd.dll is included there.

Thanks a lot,

Sincerely

Marcel

--
registered Fli4l-User #0388
Ray Hunter [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Before you installed did you make a copy of the php.ini file...?  If you
did
 not then it might have been overwritten with the new installation.

 Sounds like you did the basic installer installation.  You might need to
 download the zip file and do a manual installation to get the required
data.



 Thank you,

 Ray Hunter
 Firmware Engineer

 ENTERASYS NETWORKS


 -Original Message-
 From: Marcel Besancon [mailto:[EMAIL PROTECTED]]
 Sent: Monday, March 11, 2002 10:18 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] php.ini ...


 Hi, it's me again,

 when I used the PHP 4.0.6 I had a php.ini with a lot of entries. Now,
at
 Version 4.1.1, there's a php.ini with this content:

 --
--
 -
 ; php.ini for PEAR tests
 include_path=..
 [mail function]
 SMTP= localhost ; for Win32 only
 sendmail_from= [EMAIL PROTECTED] ; for Win32 only
 upload_tmp_dir = C:\PHP\uploadtemp  ; temporary directory for HTTP
uploaded
 files (will use system default if not specified) [Session]
 session.save_path= C:\PHP\sessiondata; argument passed to save_handler
 [PHP]
 error_reporting= E_ALL  ~(E_NOTICE | E_USER_NOTICE | E_WARNING |
 E_COMPILE_WARNING | E_CORE_WARNING | E_USER_WARNING) ; display all errors

 --
--
 -

 Now, where can I find the entries for the extensions that you should be
 used? I want to use the gd-library. I copied the DLL to the include-path
(I
 don't know if that's the correct way !!!), but now I can't tell PHP to use
 the DLL!!! Please help me !!!

 Marcel

 --
 registered Fli4l-User #0388



 --
 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] limiting the livetime of a session possible?

2002-03-11 Thread Samuel Ottenhoff

The last person gave you a way to do it without using php.ini Re-read
the reply.

1) you can create a timestamp column last_access in your USERS table
2) every time that user hits a page, you need to update that column
3) every time the user asks for a new page, see if the last access is less
than 60 minutes.  If not Session_destroy() Send them to the home
page.

Sam


On 3/11/02 1:14 PM, Andy [EMAIL PROTECTED] wrote:

 Hi Andrey,
 
 is there no way to control the lifetime without modifiying the php.ini? I am
 not on my own server. The ISP controles this file.
 
 Would you suggest to go for a self made session?
 
 Andy
 
 Andrey Hristov [EMAIL PROTECTED] schrieb im Newsbeitrag
 027901c1c91d$cce57970$0b01a8c0@ANDreY">news:027901c1c91d$cce57970$0b01a8c0@ANDreY...
 PHP4 sessions or self made sessions. If PHP4 there is an option in php.ini
 to set about how frequently the GC(garbage collector)
 will be started. Otherwise if self made and using a DB for backend - add
 new field last_time , and on every page request do Delete
 from session_table where last_timenow() interval 60 min; not sure for
 the query but that is the idea.
 
 
 Best regards,
 Andrey Hristov
 


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




[PHP] upload script problems.

2002-03-11 Thread Brian Lee


Hello,

I am trying to fix a upload script that doesn't seem to be working anymore. 
I had it up an running for a few months but it broke last week. I don't 
think that there was anything changed on the server. I am using php 
4.0.4pl1. Any help you could give me would be great.


I get this error when the script is run:
Warning: Unable to open '' for reading: No such file or directory in
/dir/on/webserver/upload.php on line 14

Here is line 14:
copy($temp, /dir/to/copy/to.$file);


Here is the script:

?php

$file = $HTTP_POST_FILES['file']['name'];
$type = $HTTP_POST_FILES['file']['type'];
$size = $HTTP_POST_FILES['file']['size'];
$temp = $HTTP_POST_FILES['file']['tmp_name'];

$size_limit = 100; // set size limit in bytes
$allowed_types = array(text/plain,text/html, application/msword, 
application/pdf);

if ($file){
if ($size  $size_limit){
if (in_array($type,$allowed_types)){
copy($temp, /dir/to/copy/to.$file);
} else {
$bod = 

tr
td colspan=\2\font face=\verdana\ size=\2\ color=\#00\ 
class=\blacktext2\Sorry, files of type tt$type/tt are not
permitted/font/td
/tr
;
}} else {
$bod = 
tr
td colspan=\2\font face=\verdana\ size=\2\ color=\#00\ 
class=\blacktext2\Sorry, your file exceeds the size limit of $size_limit
bytes/font/td
/tr

;
}}

echo 
html
head
titleSubmit/title
/head
body bottommargin=\0\ rightmargin=\0\
form enctype=\multipart/form-data\ action=\$PHP_SELF\ method=\post\
table cellpadding=\0\ cellspacing=\0\ border=\0\ width=\380\
$bod
tr
td colspan=\2\font face=\verdana\ size=\2\ color=\#00\ 
class=\blacktext2\Please fill out the form below and attach your CV. Also 
please don't use an apostrophe in your resume name. Thank you for your 
interest in WWMG./font/td
/tr
tr
td colspan=\2\font face=\verdana\ size=\2\ color=\#00\ 
class=\blacktext2\nbsp;/font/td
/tr
tr
tdfont face=\verdana\ size=\2\ color=\#00\ 
class=\blacktext2\Name:/font/td
tdfont face=\verdana\ size=\2\ color=\#00\ 
class=\blacktext2\input type=\text\ name=\name\ 
size=\25\/font/td
/tr
tr
tdfont face=\verdana\ size=\2\ color=\#00\ 
class=\blacktext2\Address:/font/td
tdfont face=\verdana\ size=\2\ color=\#00\ 
class=\blacktext2\input type=\text\ name=\add\ 
size=\40\/font/td
/tr
tr
tdfont face=\verdana\ size=\2\ color=\#00\ 
class=\blacktext2\Phone:/font/td
tdfont face=\verdana\ size=\2\ color=\#00\ 
class=\blacktext2\input type=\text\ name=\pnum\ 
size=\25\/font/td
/tr
tr
tdfont face=\verdana\ size=\2\ color=\#00\ 
class=\blacktext2\Email:/font/td
tdfont face=\verdana\ size=\2\ color=\#00\ 
class=\blacktext2\input type=\text\ name=\email\ 
size=\25\/font/td
/tr
tr
tdfont face=\verdana\ size=\2\ color=\#00\ 
class=\blacktext2\Upload a file:/font/td
tdfont face=\verdana\ size=\2\ color=\#00\ 
class=\blacktext2\input name=\file\ type=\file\ 
size=\25\/font/td
/tr
tr
tdfont face=\verdana\ size=\2\ color=\#00\ 
class=\blacktext2\/font/td
tdfont face=\verdana\ size=\2\ color=\#00\ 
class=\blacktext2\input type=\submit\ value=\Upload\nbspform 
method=\post\ action=\javascript:window.close();\input type=\submit\ 
value=\Cancel\ onclick=\javascript:window.close();\/form/font/td
/tr
/form
/table
/body
/html

;
?

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


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




Re: [PHP] index.php question

2002-03-11 Thread Daniel Negron/KBE


do you happen to have an answer for IIS.  I alreazdy tried to add index.php
to the list of documents, along with index.asp, index.html, and so on.But I
still get the same result.



Thank You



Daniel Negrón
Lotus Notes Administrator / Developer
KB Electronics, Inc.
954.346.4900x122
http://www.kbelectronics.com




|+
||  Samuel|
||  Ottenhoff |
||  sam@gothamjaz|
||  z.com|
|||
||  03/11/02 01:47|
||  PM|
|||
|+
  
-|
  |
 |
  |  To: Omland Christopher m [EMAIL PROTECTED], 
[EMAIL PROTECTED]|
  |  cc:   
 |
  |  Subject: Re: [PHP] index.php question 
 |
  
-|




#
# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index.  Separate multiple entries with spaces.
#
IfModule mod_dir.c
DirectoryIndex index.php index.php3 index.html
/IfModule

Sam

On 3/11/02 1:36 PM, Omland Christopher m
[EMAIL PROTECTED]
wrote:

 Hi all, I'm new to the mailing list, I hope I'm in the right spot.
 I have installed php, and .php files work fine, unless they are my index
 file. For example http://whatever.com/~jondoe/info.php will work. But if
I
 make a index.php file and go to http://whatever.com/~jondoe it wont work.
 I can view the source and see my php code, which I know means the server
 isn't translating it. I'm running RH LINUX, and running apache webserver.
 I have checked the httpd.conf file and the load modules lines are in
 there, and they are correct??(I THINK)
 Any help would be appreciated.
 Thank You.
 -Chris



--
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] Netscape Vs. IE

2002-03-11 Thread Gary

Vlad Kulchitski wrote:

 Hi,
 
 Someone replied to my post about browsers incompatibilities but I lost
 the message, can someone remind me how to set up the background image:
 
 td style='background: white'
 
 I mean I need another command that will tell to load image as a bg. I am
 trying to use background-image:file.gif, but it doesn't seem to work.
 
 Thanks,
 Vlad



td style=background-image:url(image.gif); background-color:#FF


HTH
Gary


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




Re: [PHP] using ahref tag in $msg variable

2002-03-11 Thread Jason Wong

On Tuesday 12 March 2002 02:12, Claudia Smith wrote:
 I would like to know how to code my mail msg to accept an a href tag

 my current code is:

 $msg = $username wants you to check out \The AdVentures of AdWoman:
 AdWoman's Dilemma.\\n\n;
 $msg .= Play for a chance to win a Caribbean cruise presented by
 Carnival Cruise Line and a
 href='http://www.contus.com'Contus.com/a.\n\n;
 $msg .= This adgame is presented by the American Advertising
 Federation, which cordially invites you to attend the a
 href='http://www.aaf.org' AdVentures Conference/a, the AAF's National
 Convention in Miami, Florida June 5-8.
  $msg .= This adgame was created by AdGames.biz.\n\n;
$mailheaders = From: [EMAIL PROTECTED]\n;
 $mailheaders .=  Reply-To: [EMAIL PROTECTED]\n\n;
 mail($friendemail1, $username Referred you an Adgame!, $msg,
 $mailheaders);

 My auto response email is printed with the  a href=code instead of
 creating the hyperlink for me.

 Any suggestions on how to create this type of hyper link in a non html
 email?

In a non-html email, ie a plain-text email, any text such as www.domain.com 
would automatically be interpreted by modern mail-clients as a URL link. In 
other words there is no need (in fact it's not possible within plain-text) to 
specifically specify that a link is a link.


-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
No spitting on the Bus!
Thank you, The Mgt.
*/

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




RE: [PHP] Check @ in Record show Error in mail() !!

2002-03-11 Thread Rick Emery

$result = mysql_query(SELECT * FROM sms where email LIKE \%@%\ ORDER BY
ID DESC,$db);

-Original Message-
From: Thomas Edison Jr. [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 12:18 PM
To: RIVES Sergio
Cc: [EMAIL PROTECTED]
Subject: [PHP] Check @ in Record  show Error in mail() !!


Hi,

I'm using the following code to get Email Address
stored in a table in my Database :

?php
$db = mysql_connect(localhost,user,pass);
mysql_select_db(mydb,$db);

$result = mysql_query(SELECT * FROM sms where
email!='' ORDER BY ID DESC,$db);
if ($myrow = mysql_fetch_array($result)) {
  do {

   echo(bfont color=#6ed8ff$myrow[email]/b
br);

  } while ($myrow = mysql_fetch_array($result));
} 

else {
  echo Sorry, no records matching your criteria were
found!;
}
?

But there are some records where the user has entered
something else.. not the Email Address. I would like
to list only those records out of these, who do
contain the letter @, so that i'm sure only those
records which actually do contain an Email Adress are
listed. 

Also, when sending an email, like this :

if($submit) {
$headers .= From: Mjimm.com
[EMAIL PROTECTED]\n;
$headers .= X-Sender: [EMAIL PROTECTED]\n;
$headers .= X-Mailer: PHP\n; // mailer
$headers .= Reply-To: [EMAIL PROTECTED]\n; //
Return path for errors
$headers .= bcc:$b\n; // BCCs to
mail($to,$subject,$message,$headers);
}
?

If there are any errors in sending the mail, how can i
get those errors, or at least have the alert that an
error was there and mail could not be sent, printed on
the page?

Thanks,
T. Edison jr.



=
Rahul S. Johari (Director)
**
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
***

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.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] ImagePng: No PNG support in this PHP build

2002-03-11 Thread Jason Wong

On Tuesday 12 March 2002 01:42, Josep Raurell wrote:
 Hello.

 I alwais get this message, i try with the gd and libpng librarys from the
 SuSE 7.0, and after uninstalling with the sources librarys.
 (gd works ok)

 The result is the same:

 ImagePng: No PNG support in this PHP build

 This is my last configure setting:

  './configure' '--prefix=/usr/local/intranet/php' '--exec-
 prefix=/usr/local/intranet/php' '--with-
 apache=/usr/local/src_intranet/apache_1.3.22' '--with-gettext' '--with-
 mysql=/usr/local/mysql' '--with-imap' '--with-ibm-
 db2=/usr/IBMdb2/7.1/include' '--with-pdflib=/usr/local/pdflib4'
 '--with-zlib' '- -with-png-dir=/usr/local' '--with-gd=/usr/local'

 It seems a problem that other people had, but I can't found the sollution
 in the forums.

Some notes:

- Were there any errors during the ./configure, and make process?
- Stop apache before running make install
- Whenever I recompile PHP, I always start with a clean extract from the 
source tarball.


-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
The only two things that motivate me and that matter to me are revenge
and guilt.
-- Elvis Costello
*/

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




[PHP] Syntax for attaching a PDF file

2002-03-11 Thread Todd Cary

I am not sure of the correct syntax for attaching a PDF file to an email
message using mail().  Any help is greatly appreciated since the
documents are confusing for me.

Todd

--
Dr. Todd Cary
Ariste Software
707-773-4523
[EMAIL PROTECTED]

It is a worthy thing to fight for one's freedom;
 it is another sight finer to fight for another man's

 Mark Twain



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




  1   2   >