Re: [PHP] function and global problems

2001-04-06 Thread Plutarck

Look at the line directly above where you're parse error is.

It semi-lacks part of the lower intentestional tract.


That will seem funny to you tommarrow.


--
Plutarck
Should be working on something...
...but forgot what it was.

PS: No it won't.

""Richard Kurth"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I can not seem to get this figuered out I whant to run this function to
pull
 data out of a file and thin use the data in the rest of the program. When
I
 do this I get a Parse error: parse error in
 c:/httpd/htdocs/autosetup/auto/test.php on line 25


 ?php
 function getdata( ){


 #
 global $domain,$tld,$firstname,$lastname,$userid,$passw,$email,$package,
 $frontpage,$mysql,$userdatabase,$newuser,$newuserpass;

 if(file_exists("userdata")) {
 $fp2=fopen ("userdata","r")or die("unable to open file ($userdata)");
 flock($fp2, 2); //unless ($use_flock == 0);
 while ($data = fgetcsv ($fp2, 1000, "|")) {
 $num = count ($data);
   $row++;
   for ($c=0; $c$num; $c++) {

 }
 list($domain,$tld,$firstname,$lastname,$userid,$passw,$email,$package,
 $frontpage,$mysql,$userdatabase,$newuser,$newuserpass) = $data;

 }

 //close and del file
 fclose ($fp2);
 //system ("del userdata");
 }
 getdata( )

 echo $domain;   --This is line 25 which is outside of the function
  echo $tld;
   echo $firstname;
  echo $lastname;
  echo $userid;
  echo $passw;
   echo $email;
  echo $package;
  echo $frontpage;
  echo $mysql;
  echo $userdatabase;
  echo $newuser;
 echo $newuserpass;


 ?


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] sockets (long)

2001-04-06 Thread Joseph Blythe

Yasuo Ohgaki wrote:

 set_nonblock() is in PHP C source, but not in the PHP Manual. May be it's dead?
 
 It seems it take one parameter (file descriptor), let us know if it works. I
 might want to use it in the future :)


Yasuo,

There is one mention of set_nonblock() in the manual under 
accept_connect() under the socket functions. I believe that the new 
socket functions non blocking mode is dead in the current version of php 
at least under linux.

Regards,

Joseph




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP and geocities

2001-04-06 Thread Plutarck

Also check out the CURL group of functions in the manual.

As for code, nope. Never needed to do it, and you won't find the code you
need anywhere. You'll have to write it yourself. Which is kind of the point,
I thought...


 You'll find all the info you need in the manual under fsockopen, fgets,
fputs, and probably a few RFCs. Check zend for the output buffering article
to get some information also.

The rest is up to you to hack out.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Joseph Bannon"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Sure you can, but the only way I know of is to use fsockopen() and use
  fputs() to mimick an HTTP connection session.

 Can you give me the coding for this?



  To fake geocities you'll need to set the referer, I believe. Not sure
what
  it needs to be set to, however.

 What is the code for this as well?


 Thanks,
 J






 Say I'm Hot! - Post Your Picture!
 http://www.sayimhot.com



















 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Building an array from a URL

2001-04-06 Thread Plutarck

You'll probably want to play with the following function:

http://www.php.net/manual/en/function.parse-url.php


--
Plutarck
Should be working on something...
...but forgot what it was.


"Mike Gifford" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello,

 I'm trying to build an array out of data submitted from a URL.

 Essentially, I want to pull certain records out of a database which have
been
 selected on another form.

 The URL presently looks like this:

superRSS.phtml?150=1150superRSS166=1166superRSS168=1168superRSS175=1188

 I'd like to take these independent variables and merge them into a single
array:
 $array_superRSS = implode (":", $superRSS[]);

 So I can then pipe these values directly into another function:

 while ($array_superRSS) {
 display_superRSS($array_superRSS[]);
 }

 Obviously I'm missing a step or two here, but would really appreciate
someone
 filling in some of the gaps.

 Thanks!

 Mike
 --
 Mike Gifford, OpenConcept Consulting, http://openconcept.ca
 Offering everything your organization needs for an effective web site.
 Featured Client: http://www.aboriginalrightscoalition.ca/
 If a book doesn't make us better, then what on earth is it for? - Alice
Walker

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] function and global problems

2001-04-06 Thread Richard Kurth

I don't have to wait tell tomorrow I feel funny already
Thanks
Richard
 Look at the line directly above where you're parse error is.

 It semi-lacks part of the lower intentestional tract.


 That will seem funny to you tommarrow.


 --
 Plutarck
 Should be working on something...
 ...but forgot what it was.

 PS: No it won't.

 ""Richard Kurth"" [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  I can not seem to get this figuered out I whant to run this function to
 pull
  data out of a file and thin use the data in the rest of the
 program. When
 I
  do this I get a Parse error: parse error in
  c:/httpd/htdocs/autosetup/auto/test.php on line 25
 
 
  ?php
  function getdata( ){
 
 ##
 ##
  #
  global $domain,$tld,$firstname,$lastname,$userid,$passw,$email,$package,
  $frontpage,$mysql,$userdatabase,$newuser,$newuserpass;
 
  if(file_exists("userdata")) {
  $fp2=fopen ("userdata","r")or die("unable to open file ($userdata)");
  flock($fp2, 2); //unless ($use_flock == 0);
  while ($data = fgetcsv ($fp2, 1000, "|")) {
  $num = count ($data);
$row++;
for ($c=0; $c$num; $c++) {
 
  }
  list($domain,$tld,$firstname,$lastname,$userid,$passw,$email,$package,
  $frontpage,$mysql,$userdatabase,$newuser,$newuserpass) = $data;
 
  }
 
  //close and del file
  fclose ($fp2);
  //system ("del userdata");
  }
  getdata( )
 
  echo $domain;   --This is line 25 which is outside of the function
   echo $tld;
echo $firstname;
   echo $lastname;
   echo $userid;
   echo $passw;
echo $email;
   echo $package;
   echo $frontpage;
   echo $mysql;
   echo $userdatabase;
   echo $newuser;
  echo $newuserpass;
 
 
  ?
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] help me please :(

2001-04-06 Thread Nilesh Parmar

Hi :)
   Well, I have installed php on my Windows 98 machine. But i am unable
to use the imap funcationality. I have the php_imap.dll in my php.ini file
for which i have removed the semicolon (;extension = php_imap.dll) . But it
dosent seem to work .I suppose i should have (php_imap4r2.dll ). Can anyone
please send me a copy of the file if  u have it please :)
thanx in advance
bye
Nilesh



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] inlude_path not in php.ini

2001-04-06 Thread Alvin Tan

Michael,

This works for us:

Location /
php_value include_path "/usr/local/etc/httpd/htdocs/site/inc:."
/Location

in the httpd.conf.

good luck,
@lvin

-Original Message-
From: Temeschinko, Michael [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 05, 2001 11:40 PM
To: 'Steve Werby'; Temeschinko, Michael; Php-General (E-Mail)
Subject: RE: [PHP] inlude_path not in php.ini




 -Original Message-
 From: Steve Werby [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, April 05, 2001 4:57 PM
 To: Temeschinko, Michael; Php-General (E-Mail)
 Subject: Re: [PHP] inlude_path not in php.ini
 
 
 "Temeschinko, Michael" [EMAIL PROTECTED] wrote:
  How do I set the php-iclude path if I have not acess to php.ini?
 
  I know in .htacess but al I try ends in an Internal Server Error
  I use php4.0.4pl1
 
 Please post what you tried.  It might be a difference in the 
 syntax between
 PHP3 and PHP4 if you're using the old style.  The new style is:
 
 php_flag include_path ".:./lib"

this line make an error too :-(

I tried
php_value include_path ".:./foo"
php_value include_path=".:./foo"
php_value include_path .:./foo
php_value include_path=.:./foo
php_flag include_path .:./foo  # but flag is not right according to the
documentation 

nothing :-(

It seems I must change al my includes to relative pathnames (../../php)

greetings from sunny (today :-) Germany
Michael

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] RE: better functionality in query ?

2001-04-06 Thread Tim Ward

the way I'd do it is " ... WHERE lastname LIKE '$last_name%" AND firstname
LIKE "$first_name%"

this gets round the problem of blank first names and treats all names as
being the start of a name, e.g. "Smith" will find "Smithson", but because of
your ORDER BY, for an exact imnput, an exact match will always show first.
haven't tried this at all but seems sound sql.

Tim Ward
Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


 -Original Message-
 From: Jerry Lake [mailto:[EMAIL PROTECTED]]
 Sent: 05 April 2001 22:23
 To: [EMAIL PROTECTED]
 Subject: better functionality in query ?
 
 
 I'm in process of creating a online whitepages directory for
 a small town phone company and I am having a little difficulty
 in refining my selection. My search form has two fields; last
 and first name. I would like to be able to have more of a wild
 card approach and some refinement when a user enters both a
 first and last name. I am unsure how to go about this, should
 I restructure my query, or make changes to my PHP. here is the
 query I am currently using. and the site is located at
 http://whitepages.maadtelco.com/ any assistance/direction is certainly
 appreciated.
 
 snip
 $query = "select * from whitepages WHERE last_name LIKE 
 '$last_name' ORDER
 BY last_name" or die("Nothing to see here");
 /snip
 
 Jerry Lake- [EMAIL PROTECTED]
 Web Designer
 Europa Communications - http://www.europa.com
 Pacifier Online   - http://www.pacifier.com
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] help me on file writing

2001-04-06 Thread hari t.v.s prakash

hi,
I'm hari. I've need a help from you.

Pls look by code.

$string="line1\nline\2line3";
$fp=fopen( "somefile", "w");
fwrite( $fp, $string);
fclose( $fp);

Then the file contents will be 

line1\nline\2line3

Instead I'm looking for.

line1
line2
line3

Pls help me on some true program way.
But I did it manually by pressing enter key like
$string="-'
line1-'
line2-'
line3";

But this should't convenient to me

with thanks,
hari.


_
Chat with your friends as soon as they come online. Get Rediff Bol at
http://bol.rediff.com





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] inlude_path not in php.ini

2001-04-06 Thread Matt Williams


 I tried
 php_value include_path ".:./foo"
 php_value include_path=".:./foo"
 php_value include_path .:./foo
 php_value include_path=.:./foo
 php_flag include_path .:./foo  # but flag is not right 
 according to the
 documentation 
 
 nothing :-(
 
 It seems I must change al my includes to relative pathnames (../../php)
 

It maybe you are not allowed to change the stuff in .htaccess.
I think rights for this are assigned in httpd.conf.

HTH

M@

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] IF this then, move to this line...

2001-04-06 Thread Stewart Taylor

You could use continue to skip to the start of a loop.
e.g.
while (1)
{
   start of code you want to jump back too
   .
   .
   .
   if (so and so is true) continue;
   .
   .
   .
   .
   break;  // exit loop
}

Unlike c php does not have a goto command.

However what you describe does not sound like very good programming practice
anyway.
You should be able to arrange your code using functions etc so that you dont
need this sort of goto method.

-Stewart


-Original Message-
From: Brandon Orther [mailto:[EMAIL PROTECTED]]
Sent: 05 April 2001 18:43
To: PHP User Group
Subject: [PHP] IF this then, move to this line...


Hello,

Is there a way to make my script jump to a certain line in my code
if a
certain variable is true.  like use an if then statement to check for a
certain value, then if it is true jump back to line 34 (Any line really).

Thanks Brandon


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Variables

2001-04-06 Thread Cheng, Kynan (London)

Hello,

Can anyone help me to achieve this using PHP:

I would like to have a personal photographic portfolio site with thumbnails.
Clicking on the thumbnail would bring up another page which has an enlarged
version of the photo on a standard 'template page'.  In other words the
photo src is a variable.

Thing is I know not much about PHP/CGI/JS and I am using free ISPs like
Freeserve (UK) and Yahoo Geocities, so I don't know what is the best way to
approach this.

Thanks for any pointers.

Kynan



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Update All fields?

2001-04-06 Thread James Holloway

Hi There,

I currently have a MySQL table, with around 700 populated rows in it.  I'd
like to know if there's a quick and easy way to update one column across all
of the rows in the database.  I shouldn't imagine it's a difficult job, but
I'm having a mental block :)

Thanks in advance.

--

James



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] RE: Apache latest + PHP latest + GD latest + Freetype latest + Jpeg latest

2001-04-06 Thread Daniel B I

I've posted this email one week ago. I think it may help you
a little with some new ideas. Don't forget the other good advices
like 'make clean' in gd, php and apache and.. so on..directories
and removing config.cache from php directory before making a
new recompilation.
Hope it helps!

=old message, about jpeg support installation

You need the jpeg support. Shortly, do this:
(I will use my version names, so you can easyly
find something, if you find newer ones, it's your bussiness)

1. search the internet for: 
jpegsrc.v6b.tar.gz 
gd-1.8.3.tar.gz
apache_1.3.14.tar.gz
php-4.0.4.tar.gz

2. unzip all files in a tmp directory (let's say /tmp ):
tar zxvf jpegsrc.v6b.tar.gz 
the same for gd, php, apache...

3. modify the 'Makefile' of the jpeg kit, to meet your requirements
(only the paths to be correct, as your are)
then issue: 
 ./configure --enable-shared --enable-static
then
 make 
 make install

4. modify the gd Makefile:
put there the your paths and uncomment the 'CFLAGS' line that 
enables the jpeg support (something like CFLAGS -DHAVE jpeg)
then issue:
 make
 make install

5. now configure php and apache and compile them. it should work.
it took me alot these days to discover all of this..




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] fopen wierdness

2001-04-06 Thread Christian Reiniger

On Friday 06 April 2001 03:12, you wrote:
 Technically yes.

 In an HTTP session, the server returns a header "Content-length" which
 lists the more or less exact size of the file being sent.

Caution: The server is not required to send this header - PHP for example 
doesn't do it automatically.

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

I saw God - and she was black.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] better functionality in query ?

2001-04-06 Thread Christian Reiniger

On Friday 06 April 2001 01:57, you wrote:
 NOTE(!): LIKE '%foo%' DOES NOT SCALE. It looks like you are making a
 phone book, which could get to be a lot of numbers. On the other hand
 'foo%' oddly scales to hundreds of thousands of records without any
 problems (make sure it's key'd!).

Well, if you think a bit about it it's not odd at all. For "%foo%" the DB 
has to examine the entire string until it finds an occurence of "foo" or 
until it reaches the end - and it can not use any (normal) index. for it. 
For "foo%" it just has to examine the first three chars - that's even 
faster than "WHERE phone = 'foobar-something'"
and works very nicely with a perfectly normal index.

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

I saw God - and she was black.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /pear/Experimental/XML sql2xml.php

2001-04-06 Thread Christian Stocker

chregu  Fri Apr  6 03:13:13 2001 EDT

  Modified files:  
/php4/pear/Experimental/XML sql2xml.php 
  Log:
  - Row and result Tag names are now configurable
  - some errorchecking
  
  
Index: php4/pear/Experimental/XML/sql2xml.php
diff -u php4/pear/Experimental/XML/sql2xml.php:1.6 
php4/pear/Experimental/XML/sql2xml.php:1.7
--- php4/pear/Experimental/XML/sql2xml.php:1.6  Wed Apr  4 02:15:57 2001
+++ php4/pear/Experimental/XML/sql2xml.php  Fri Apr  6 03:13:13 2001
@@ -15,19 +15,16 @@
 // | Authors: Christian Stocker [EMAIL PROTECTED] |
 // +--+
 //
-// $Id: sql2xml.php,v 1.6 2001/04/04 09:15:57 chregu Exp $
+// $Id: sql2xml.php,v 1.7 2001/04/06 10:13:13 chregu Exp $
 
-require_once("PEAR.php");
-
 /**
 * This class takes a PEAR::DB-Result Object, a sql-query-string or an array
 *  and returns a xml-representation of it.
 *
-* More docs will follow
-*
 * TODO
 *   -encoding etc, options for header
-*   - ERROR CHECKING
+*   -ERROR CHECKING
+*
 * Usage example
 *
 * include_once ("DB.php");
@@ -39,16 +36,17 @@
 *
 * or
 *
+* include_once ("DB.php");
+* include_once("XML/sql2xml.php");
 * $sql2xml = new xml_sql2xml("mysql://root@localhost/xmltest");
-* $sql2xml-AddSql("select * from bands");
+* $sql2xml-Add("select * from bands");
 * $xmlstring = $sql2xml-getXML();
 *
-* more examples and outputs on
+* More documentation and a tutorial/how-to can be found at
 *   http://www.nomad.ch/php/sql2xml
-*   for the time being
 *
 * @author   Christian Stocker [EMAIL PROTECTED]
-* @version  $Id: sql2xml.php,v 1.6 2001/04/04 09:15:57 chregu Exp $
+* @version  $Id: sql2xml.php,v 1.7 2001/04/06 10:13:13 chregu Exp $
 * @package  XML
 */
 class XML_sql2xml {
@@ -67,6 +65,22 @@
 var $nested = True;
 
 /**
+* Name of the tag element for resultsets
+*
+* @var  string
+* @see  insertNewResult()
+*/
+var $tagNameResult = "result";
+
+/**
+* Name of the tag element for rows
+*
+* @var  string
+* @see  insertNewRow()
+*/
+var $tagNameRow = "row";
+
+/**
 *
 * @var   object PEAR::DB
 * @acces private
@@ -159,15 +173,12 @@
 * @param  $dsn string with PEAR::DB "data source name" or object DB object
 * @param  $root string of the name of the xml-doc root element.
 */
-function XML_sql2xml ($dsn=False,$root = "root") {
+function XML_sql2xml ($dsn=Null,$root = "root") {
 
-if (DB::isError($dsn)) {
-print "The given param for XML_sql2xml was not valid in file ".__FILE__." 
at line ".__LINE__."br\n";
-return new DB_Error($dsn-code,PEAR_ERROR_DIE);
-}
-
 // if it's a string, then it must be a dsn-identifier;
-if (is_string($dsn)) {
+if (is_string($dsn))
+{
+include_once ("DB.php");
 $this-db = DB::Connect($dsn);
 if (DB::isError($this-db))
 {
@@ -176,6 +187,13 @@
 }
 
 }
+
+elseif (DB::isError($dsn))
+{
+print "The given param for XML_sql2xml was not valid in file ".__FILE__." 
+at line ".__LINE__."br\n";
+return new DB_Error($dsn-code,PEAR_ERROR_DIE);
+}
+
 // if parent class is db_common, then it's already a connected identifier
 elseif (get_parent_class($dsn) == "db_common")
 {
@@ -306,9 +324,12 @@
 new DB_Error($result-code,PEAR_ERROR_DIE);
 }
 
-//user should be able to give his own tableInfo-array, but not implemented yet
+// the method_exists is here, cause tableInfo is only in the cvs at the moment
+// (should be in 4.0.6)
+// BE CAREFUL: if you have fields with the same name in different tables, you 
+will get errors
+// later, since DB_FETCHMODE_ASSOC doesn't differentiate that stuff.
 
-if (! ($tableInfo = $result-tableInfo(False)))
+if (!method_exists($result,"tableInfo") || ! ($tableInfo = 
+$result-tableInfo(False)))
 {
 //emulate tableInfo. this can go away, if every db supports tableInfo
 $fetchmode = DB_FETCHMODE_ASSOC;
@@ -318,7 +339,7 @@
 
 while (list($key, $val) = each($res))
 {
-$tableInfo[$i]["table"]= "result";
+$tableInfo[$i]["table"]= $this-tagNameResult;
 $tableInfo[$i]["name"] = $key;
 $resFirstRow[$i] = $val;
 $i++;
@@ -363,7 +384,6 @@
 {
 //FirstFetchDone is only for emulating tableInfo, as long as not all dbs 
support tableInfo. can go away later
 $FirstFetchDone = False;
-
 while (list($key, $val) = each($res))
 {
 if ($resold[$tableInfo["parent_key"][$tableInfo[$key]["table"]]] != 
$res[$tableInfo["parent_key"][$tableInfo[$key]["table"]]] || !$this-nested)
@@ -415,7 +435,7 @@
 function DoArray2Xml 

Re: [PHP] Problems porting from MySQL Server to MSSQL7 Server

2001-04-06 Thread jlim

Hello Michael

Some people have reported with the ADODB database class library that they 
were having problems with inserts and updates when using mssql_pconnect. 
Switching to regular mssql_connect the problems disappeared. 

I suspect it has something to do with persistent connections having 
inconsistent transaction handling settings. Eg. 

- Connection A is setup by user 1 to use transactions. 
- Connection B is setup by user 2 not to use transactions.
- Connection A is reused by user 2, who thinks he doesn't need 
transactions, but connection A actually requires a commit to work because 
of user 1's previous setting...

People using Interbase have reported this problem also.

Regards, john


 Hi John -
 
 Can you elaborate on the concurrency issues?
 Thanks.
 
 
 John wrote:
 
  Hello Adrian,
 
  There are some concurrency issues with mssql if you are using
  mssql_pconnect. Try switching to mssql_connect. Also check to see if
  transactions are enabled in mssql.
 
  Your SQL insert syntax looks ok.
 
  Regards, John
 



---
"Stressed spelled backwards is desserts."
[EMAIL PROTECTED]   NATSOFT MALAYSIA  (60)3-706 1216
 
   Visit this web site for Asian and local Internet news
 http://webfeet.editthispage.com/
   My PHP website:
 http://php.weblogs.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] problem: php-document in netscape is oly downloadable

2001-04-06 Thread Markus Mattes

We  have successfully installed php3 and php4 under AIX4.3.3 with
Apache1.3.19.
Now we can see the php3-documents in the browser(NS4.7).
In opposition to that the php4-documents are only downloadable.
Is there any setting that is not described in the manual we have to do
therewith the browser can show us both types of php?

Thanks for help,


Markus Mattes




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Date formatting

2001-04-06 Thread Matt Davis

Hi I am trying to format a date extracted from my DB. I have run my query
and then have used the following to get my row data

  while ($row = mysql_fetch_array($sql_result)) {
 $title = $row["message_title"];
 $message = $row["message"];
 $event = $row["date_of_event"];

 $shortevent = date ("D j M", $event);

I am trying to take $event and make it diplay like this "FRI 06 APR" using
the date function. Although $event outputs like this "2001-04-06 00:00:00"
$shortevent outputs "Thu 1 Jan" which is unix epoch date.

Does anybody know what I am doiing wrong its probably something really
simple but I cant see what.

Matt.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] problem loading php4-document

2001-04-06 Thread MMATTES



Hi All,

We  have successfully installed php3 and php4 under AIX4.3.3 with
Apache1.3.19.
Now we can see the php3-documents in the browser(NS4.7).
In opposition to that the php4-documents are only downloadable.
Is there any setting that is not described in the manual we have to do
therewith the browser can show us both types of php?

Thanks for help,


Markus Mattes


IT-Services and Solutions GmbHbusiness
unit: e-security
IBM Global Services Company   Phone : +49-221-304-2738 or
-2561, FAX: -2518
Gustav-Heinemann-Ufer 120-122, D-50968 Kln e-mail:
[EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] problem loading php4-document

2001-04-06 Thread Altunergil, Oktay


in .conf/httpd.conf
Do the following;

# For example, the PHP 3.x module (not part of the Apache distribution - see
# http://www.php.net) will typically use:
#
AddType application/x-httpd-php3 .php3 .php   #or whatever extensions.
AddType application/x-httpd-php3-source .phps
#
# And for PHP 4.x, use:
# 
AddType application/x-httpd-php .php4 .phtml  #or whatever extension as
long as it's different than the
#settings for the php3 files
AddType application/x-httpd-php-source .phps


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 06, 2001 7:22 AM
To: [EMAIL PROTECTED]
Subject: [PHP] problem loading php4-document




Hi All,

We  have successfully installed php3 and php4 under AIX4.3.3 with
Apache1.3.19.
Now we can see the php3-documents in the browser(NS4.7).
In opposition to that the php4-documents are only downloadable.
Is there any setting that is not described in the manual we have to do
therewith the browser can show us both types of php?

Thanks for help,


Markus Mattes


IT-Services and Solutions GmbHbusiness
unit: e-security
IBM Global Services Company   Phone : +49-221-304-2738 or
-2561, FAX: -2518
Gustav-Heinemann-Ufer 120-122, D-50968 Kln e-mail:
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Array problem

2001-04-06 Thread Mark Roedel

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 06, 2001 3:20 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Array problem
 
 
 I am having big problems with merging two arrays. I just 
 can't seem to get my head around it.
 
 I have two arrays which I wish to merge, but I want to 
 EXCLUDE duplicate values.
 
 Any suggestions, as my numerous attempts have proved
 unsuccessful.

I expect my approach would probably be to merge the two arrays together,
then call array_unique() on the result.


---
Mark Roedel ([EMAIL PROTECTED])  ||  "There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full."
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] mssql_pconnect issues?

2001-04-06 Thread Michael Kimsal

Very strange.  I've noticed some integrity issues using mssql_pconnect,
but we don't explicitly use transactions in any case, so it may not
even go that deep.

I wonder if the odbc functions have this issue - anyone have any ideas?

[EMAIL PROTECTED] wrote:

 Hello Michael

 Some people have reported with the ADODB database class library that they
 were having problems with inserts and updates when using mssql_pconnect.
 Switching to regular mssql_connect the problems disappeared.

 I suspect it has something to do with persistent connections having
 inconsistent transaction handling settings. Eg.

 - Connection A is setup by user 1 to use transactions.
 - Connection B is setup by user 2 not to use transactions.
 - Connection A is reused by user 2, who thinks he doesn't need
 transactions, but connection A actually requires a commit to work because
 of user 1's previous setting...

 People using Interbase have reported this problem also.

 Regards, john


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] mssql_pconnect issues?

2001-04-06 Thread Kees Hoekzema

Have you already tried to patch the Zend/zend_list.c file and recompile it?
there is a known problem with persistent connections,
read this:
http://groups.google.com/groups?hl=enlr=safe=offic=1th=8810708445e328bb;
seekd=939114469#939114469

and this: http://marc.theaimsgroup.com/?l=php-devm=97858730928909w=2

it sure helped here, from the more than 40k errors with mysql we went
down to approx 1000 errors/daily.

Kees

-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]Namens
Michael Kimsal
Verzonden: Friday, April 06, 2001 3:40 PM
Aan: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Onderwerp: [PHP] mssql_pconnect issues?


Very strange.  I've noticed some integrity issues using mssql_pconnect,
but we don't explicitly use transactions in any case, so it may not
even go that deep.

I wonder if the odbc functions have this issue - anyone have any ideas?

[EMAIL PROTECTED] wrote:

 Hello Michael

 Some people have reported with the ADODB database class library that they
 were having problems with inserts and updates when using mssql_pconnect.
 Switching to regular mssql_connect the problems disappeared.

 I suspect it has something to do with persistent connections having
 inconsistent transaction handling settings. Eg.

 - Connection A is setup by user 1 to use transactions.
 - Connection B is setup by user 2 not to use transactions.
 - Connection A is reused by user 2, who thinks he doesn't need
 transactions, but connection A actually requires a commit to work because
 of user 1's previous setting...

 People using Interbase have reported this problem also.

 Regards, john


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Date formatting

2001-04-06 Thread Joe Sheble (Wizaerd)

Something I almost always do when pulling dates from a mySQL table is 
format the date column in the query itself using the mySQL function 
DATE_FORMAT()...


At 01:13 PM 4/6/01 +0100, Matt Davis wrote:
Hi I am trying to format a date extracted from my DB. I have run my query
and then have used the following to get my row data

   while ($row = mysql_fetch_array($sql_result)) {
  $title = $row["message_title"];
  $message = $row["message"];
  $event = $row["date_of_event"];

  $shortevent = date ("D j M", $event);

I am trying to take $event and make it diplay like this "FRI 06 APR" using
the date function. Although $event outputs like this "2001-04-06 00:00:00"
$shortevent outputs "Thu 1 Jan" which is unix epoch date.

Does anybody know what I am doiing wrong its probably something really
simple but I cant see what.

Matt.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Help w/Error Message

2001-04-06 Thread Toni Barskile

Hi:

Can someone please explain the following error message?

ERROR 1052: Column: 'compid' in field list is ambiguous

Here's my mySQL statement:

$sql="SELECT  fname, lname, compid, status, dept, room, bldg, phone,
ticket_num, compid, date_rpt, request_type, hardware, model, dci,
dci_num,software_type, software_pkg, problem, comments, entered_by
FROM users, tickets
WHERE users.compid = tickets.compid
ORDER BY lname";


Thanks in Advance

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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Help w/Error Message

2001-04-06 Thread Joe Sheble (Wizaerd)

In your query you have compid specified twice.  If this field is named the 
same in two seperate tables, preface your fieldnames with the table names...

$sql="SELECT  fname, lname, users.compid, status, dept, room, bldg, phone,
ticket_num, tickets.compid, date_rpt, request_type, hardware, model, dci,
dci_num,software_type, software_pkg, problem, comments, entered_by
FROM users, tickets
WHERE users.compid = tickets.compid
ORDER BY lname";


At 10:04 AM 4/6/01 -0400, Toni Barskile wrote:
Hi:

Can someone please explain the following error message?

ERROR 1052: Column: 'compid' in field list is ambiguous

Here's my mySQL statement:

$sql="SELECT  fname, lname, compid, status, dept, room, bldg, phone,
ticket_num, compid, date_rpt, request_type, hardware, model, dci,
dci_num,software_type, software_pkg, problem, comments, entered_by
FROM users, tickets
WHERE users.compid = tickets.compid
ORDER BY lname";


Thanks in Advance

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


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Help w/Error Message

2001-04-06 Thread Renze Munnik

Toni Barskile wrote:
 
 Hi:
 
 Can someone please explain the following error message?
 
 ERROR 1052: Column: 'compid' in field list is ambiguous
 
 Here's my mySQL statement:
 
 $sql="SELECT  fname, lname, compid, status, dept, room, bldg, phone,
 ticket_num, compid, date_rpt, request_type, hardware, model, dci,
 dci_num,software_type, software_pkg, problem, comments, entered_by
 FROM users, tickets
 WHERE users.compid = tickets.compid
 ORDER BY lname";
 
 Thanks in Advance
 
 Toni
 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


You select from two tables that both have a column named 'compid'.
Your computer doesn't know which one of them it should use. So, you
should make that decision for 'm:

SELECT users.compid
or
SELECT tickets.compid
-- 

* RzE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Problem with each()

2001-04-06 Thread David Minor

well, that didn't work either.  Same error.  Show me where my thinking is
wrong, if I've got an array ($HTTP_POST_VARS) in this case.  and
$HTTP_POST_VARS[var_list] is an array and the first entry in the array.  if
I did $x = each($HTTP_POST_VARS) in a while loop, the first combination that
is returned is $x[0] with value of 'var_list' and $x[1] with value of
'Array'.  In the first instance, I passed the name of the array
($HTTP_POST_VARS) to each(), so in this instance I would again pass the name
of the array to each() to pull the value pairs out of it.  This would mean
that $each_array2 = each($each_array[0]), not $each_array[1].  Am I way off?

 In article [EMAIL PROTECTED], [EMAIL PROTECTED] says...
 
 }print("key: $each_array[0] value: $each_array[1]");
 }
 }When I get to an array within HTTP_POST_VARS, it prints:
 }key: var_name value: Array
 }
 }ok, but when I try to do an each on that array: (and maybe this is where I
 }am wrong)
 }$each_array2 = each($each_array[0])
 }
 
 There's your problem.. Your trying to do each(..) on, what in your
 example above, is set to "var_name" ...
 
 Try changing that to:
 
 $each_array2 = each($each_array[1]);
 
 It's the second variable in your example that's an Array, (or it may
 just be a string set to the word "Array".. Who knows?.. =)
 
 -- 
 Jeff Carnahan - [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Error message

2001-04-06 Thread Toni Barskile

Thanks for everyone's help w/the error message thing.

I got my SQL statement working, but it's not returning any rows.  I noticed 
that there's nothing in my compid field in the 2nd table.  Does anyone know 
how I might go about automatically filling in the value in the 2nd table 
when someone enters data in the 1st table?  I hope this question makes 
sense...

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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] String in a string

2001-04-06 Thread Jon Haworth

Mike,

You could investigate the functions strstr (www.php.net/strstr) and stristr
(www.php.net/stristr), it sounds like they're what you're after.

HTH
Jon


-Original Message-
From: Mike [mailto:[EMAIL PROTECTED]]
Sent: 06 April 2001 15:42
To: [EMAIL PROTECTED]
Subject: [PHP] String in a string


How do I find out if a string is contained in a string. I just need
true/false.
Thanks
[EMAIL PROTECTED]



**
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Table Relationships

2001-04-06 Thread David Smith

I have two table one categories, two with relationship to table one...

Example:

Table 1

catid   category

1   General Gaming News
 2   Combat Flight Simulator
 3   B-17 Flying Fortress
 4   IL-2 Sturmovik
 5   Crimson Skies
 6   European Air War

Table Two

id  datecategorydesc

1   2001-04-04 14:41:33   1   Shrapnel Games

I want to call the data from table two and if 1 matches 1 in first table it
shows "General Gaming News" instead of just 1.

understand?

please reply to email since not a list member...


David Smith
Indy Web Design
http://www.indywebdesign.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] String in a string

2001-04-06 Thread Martin Cabrera Diaubalick



Hello Mike,
try preg_match
See
http://www.php.net/manual/en/function.preg-match.php
HTH
Regards

- Original Message -
 From: Mike [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, April 06, 2001 4:42 PM
 Subject: [PHP] String in a string


  How do I find out if a string is contained in a string. I just need
  true/false.
  Thanks
  [EMAIL PROTECTED]
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /ext/skeleton skeleton.c

2001-04-06 Thread Sean Bright

elixer  Fri Apr  6 07:42:07 2001 EDT

  Modified files:  
/php4/ext/skeleton  skeleton.c 
  Log:
  Fixed possible overflow.
  
  
Index: php4/ext/skeleton/skeleton.c
diff -u php4/ext/skeleton/skeleton.c:1.11 php4/ext/skeleton/skeleton.c:1.12
--- php4/ext/skeleton/skeleton.c:1.11   Fri Dec  1 06:56:30 2000
+++ php4/ext/skeleton/skeleton.cFri Apr  6 07:42:06 2001
@@ -97,7 +97,7 @@
 
convert_to_string_ex(arg);
 
-   len = sprintf(string, "Congratulations, you have successfully modified 
ext/extname/config.m4, module %s is compiled into PHP", Z_STRVAL_PP(arg));
+   len = sprintf(string, "Congratulations, you have successfully modified 
+ext/%.80s/config.m4, module %.80s is compiled into PHP", "extname", Z_STRVAL_PP(arg));
RETURN_STRINGL(string, len, 1);
 }
 /* }}} */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] function return

2001-04-06 Thread Kurth Bemis


i'm trying to make all my include files into functions for 
manageability.  I have one function that i'd like to get to work.heres 
teh code..

?php
$db = mysql_pconnect("localhost", "user" ,"pass");
mysql_select_db("database",$db);
?

i had it in a function and had the function return $db.but didn't 
work.any ideas?

~kurth


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] mssql_pconnect issues?

2001-04-06 Thread Michael Kimsal

Wouldn't this have made it in PHP 4.0.4 by now?  Or am I reading 2001-01-04
wrong?  (january 4?)

Kees Hoekzema wrote:

 Have you already tried to patch the Zend/zend_list.c file and recompile it?
 there is a known problem with persistent connections,
 read this:
 http://groups.google.com/groups?hl=enlr=safe=offic=1th=8810708445e328bb;
 seekd=939114469#939114469

 and this: http://marc.theaimsgroup.com/?l=php-devm=97858730928909w=2

 it sure helped here, from the more than 40k errors with mysql we went
 down to approx 1000 errors/daily.

 Kees

 -Oorspronkelijk bericht-
 Van: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]Namens
 Michael Kimsal
 Verzonden: Friday, April 06, 2001 3:40 PM
 Aan: [EMAIL PROTECTED]
 CC: [EMAIL PROTECTED]
 Onderwerp: [PHP] mssql_pconnect issues?

 Very strange.  I've noticed some integrity issues using mssql_pconnect,
 but we don't explicitly use transactions in any case, so it may not
 even go that deep.

 I wonder if the odbc functions have this issue - anyone have any ideas?

 [EMAIL PROTECTED] wrote:

  Hello Michael
 
  Some people have reported with the ADODB database class library that they
  were having problems with inserts and updates when using mssql_pconnect.
  Switching to regular mssql_connect the problems disappeared.
 
  I suspect it has something to do with persistent connections having
  inconsistent transaction handling settings. Eg.
 
  - Connection A is setup by user 1 to use transactions.
  - Connection B is setup by user 2 not to use transactions.
  - Connection A is reused by user 2, who thinks he doesn't need
  transactions, but connection A actually requires a commit to work because
  of user 1's previous setting...
 
  People using Interbase have reported this problem also.
 
  Regards, john

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Error message

2001-04-06 Thread Renze Munnik

Toni Barskile wrote:
 
 Thanks for everyone's help w/the error message thing.
 
 I got my SQL statement working, but it's not returning any rows.  I noticed
 that there's nothing in my compid field in the 2nd table.  Does anyone know
 how I might go about automatically filling in the value in the 2nd table
 when someone enters data in the 1st table?  I hope this question makes
 sense...
 
 Toni
 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


I don't know what your db exactly is, or what you want to do... but
it pretty much sounds like something for a foreign key. If you don't
like that option, you'll have to change your code (PHP or sp,
wherever you do it) that inserts the data. That function should then
also insert/update the data in the other table.
-- 

* RzE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] String in a string

2001-04-06 Thread Phil Driscoll

try preg_match
A bit of a big hammer for cracking nuts.
strstr and stristr will tax your server much more lightly, and, no doubt, do
the job quicker as well.

Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Apache Win32 sapi error

2001-04-06 Thread Yurais Fernandez Leal

Hi there

Trying to run apache with support for PHP 4.0.4pl1 as a module

I set up eveything and when I launch apache it dies with an error like this

APACHE caused an invalid page fault in
module MSVCRT.DLL at 017f:780102ba.
Registers:
EAX= CS=017f EIP=780102ba EFLGS=00010206
EBX=7800bb73 SS=0187 ESP=0063da04 EBP=0063dc58
ECX= DS=0187 ESI=7ffe FS=1377
EDX=7fff ES=0187 EDI=1003027d GS=
Bytes at CS:EIP:
80 38 00 74 03 40 eb f1 2b c1 e9 85 fe ff ff c7 
Stack dump:
0001 78037c88 7800bb50 780012d9  0063dc1c 7800ef03 7802e248  
0063da64 780012d9  0001 bff95b52 00b6 00b62aa2 

Can someone give me a glue ?

regardsyurais

PD: Email me directly please, I'm not subscribed to the list




Re: [PHP] function and global problems

2001-04-06 Thread Steve Werby

"Richard Kurth" [EMAIL PROTECTED] wrote:
 I can not seem to get this figuered out I whant to run this function to
pull
 data out of a file and thin use the data in the rest of the program. When
I
 do this I get a Parse error: parse error in
 c:/httpd/htdocs/autosetup/auto/test.php on line 25

snip
 }
 getdata( )

 echo $domain;   --This is line 25 which is outside of the function
/snip

getdata(); // Don't forget the semicolon.

As a general rule, missing semicolons ";" and braces "}" on lines above
those mentioned in the error output are often culprits for parse errors.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4(PHP_4_0_5) /main main.c

2001-04-06 Thread Jani Taskinen

sniper  Fri Apr  6 08:18:52 2001 EDT

  Modified files:  (Branch: PHP_4_0_5)
/php4/main  main.c 
  Log:
  Support also old arg_separator directive.
  
Index: php4/main/main.c
diff -u php4/main/main.c:1.356.2.2 php4/main/main.c:1.356.2.3
--- php4/main/main.c:1.356.2.2  Thu Apr  5 19:09:43 2001
+++ php4/main/main.cFri Apr  6 08:18:52 2001
@@ -19,7 +19,7 @@
 */
 
 
-/* $Id: main.c,v 1.356.2.2 2001/04/06 02:09:43 sniper Exp $ */
+/* $Id: main.c,v 1.356.2.3 2001/04/06 15:18:52 sniper Exp $ */
 
 
 #include stdio.h
@@ -139,6 +139,18 @@
 }
 
 
+static PHP_INI_MH(OnUpdateDeprecated)
+{
+   PLS_FETCH();
+
+   PG(arg_separator.output) = new_value;
+
+   if (stage==PHP_INI_STAGE_RUNTIME) {
+   php_error(E_WARNING, "The arg_separator directive is deprecated. Use 
+arg_separator.output instead");
+   }
+   return SUCCESS;
+}
+
 static PHP_INI_MH(OnUpdateTimeout)
 {
ELS_FETCH();
@@ -211,6 +223,7 @@
 
STD_PHP_INI_ENTRY("arg_separator.output",   "",PHP_INI_ALL,   
 OnUpdateStringUnempty,  arg_separator.output,   php_core_globals,   
core_globals)
STD_PHP_INI_ENTRY("arg_separator.input","",
PHP_INI_SYSTEM|PHP_INI_PERDIR,  OnUpdateStringUnempty,  arg_separator.input,
php_core_globals,   core_globals)
+   PHP_INI_ENTRY("arg_separator",  "",
+PHP_INI_ALL,OnUpdateDeprecated)
 
STD_PHP_INI_ENTRY("auto_append_file",   NULL,   PHP_INI_ALL,   
 OnUpdateString, auto_append_file,   
php_core_globals,   core_globals)
STD_PHP_INI_ENTRY("auto_prepend_file",  NULL,   PHP_INI_ALL,   
 OnUpdateString, auto_prepend_file,  
php_core_globals,   core_globals)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Problem with newline and email

2001-04-06 Thread Pierre-Yves Lemaire

Hello,

ok I am getting completely crazy here, I use this to make shure
outlook will display newlines correctly. But now I found out
that exchange is jumping 2 lines at every newline with this...
$msg = str_replace ( "\n", "\r\n", $msg );

My question, what sould I use in order to send a long message,
wich is coming multiple db fields to a text file to php mail(),
so it will be formatted nicely on all email client?
Or, is it possible?


Any piece of code, tutorial, newsletter script, good wiches or
old grandma's soup would be so appreciated!

py






+ ==
+ Pierre-Yves Lem@ire
+ E-MedHosting.com
+ (514) 729-8100
+ [EMAIL PROTECTED]
+ ==


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Array problem

2001-04-06 Thread Joe Stump

This would work ...

?

  $arrA = array(1,2,3,4,5,6);
  $arrB = array(9,8,7,6,5);

  // pick an arbitrary one to start with ...
  for($i = 0 ; $i = sizeof($arrB) ; ++$i)
if(!in_array($arrB[$i],$arrA))
  $arrA[] = $arrB[$i];

?


--Joe


On Fri, Apr 06, 2001 at 09:19:52AM +0100, Alexis Antonakis wrote:
 Hi,
 
 I am having big problems with merging two arrays. I just can't seem to get
 my head around it.
 
 I have two arrays which I wish to merge, but I want to EXCLUDE duplicate
 values.
 
 Any suggestions, as my numerous attempts have proved unsuccessful.
 
 BTW I'm using PHP4.
 
 Many thanks
 Alexis
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


/**\
 *Joe Stump - PHP/SQL/HTML Developer  *
 * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net   *
 * "Better to double your money on mediocrity than lose it all on a dream."   * 
\**/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] function return

2001-04-06 Thread Adrian Murphy

should work(works for me).probly something simple.
?php
function conn(){

$db = mysql_pconnect("localhost", "" ,"");
mysql_select_db("database",$db);
return $db;
}


 $db = conn();
 $result= mysql_query("select * from table",$db);

while($myrow=MySQL_fetch_array($result))
{ 
$thing=$myrow["item"]; 
echo "$thing br
"; 
} 


?
- Original Message - 
From: Kurth Bemis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, April 06, 2001 4:10 PM
Subject: [PHP] function return


 
 i'm trying to make all my include files into functions for 
 manageability.  I have one function that i'd like to get to work.heres 
 teh code..
 
 ?php
 $db = mysql_pconnect("localhost", "user" ,"pass");
 mysql_select_db("database",$db);
 ?
 
 i had it in a function and had the function return $db.but didn't 
 work.any ideas?
 
 ~kurth
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Nearly all (1755) PHP functions in a text file

2001-04-06 Thread Phillip Bow

Geez Plutarck where are all the GTK functions? :)  Just kidding this is
great and I am gonna snarf a copy to use locally.
--
phill

""Plutarck"" [EMAIL PROTECTED] wrote in message
9ajqk2$ll4$[EMAIL PROTECTED]">news:9ajqk2$ll4$[EMAIL PROTECTED]...
 First of all I use Edit Plus, which uses a list of PHP functions to know
 what words to highlight in the code.

 Well now that I have a seriously throbbing headache, I've done it.
Finally.

 If you use a program that needs a list of functions for syntax
highlighting,
 I've finally got one that has every function according to PHP
 get_defined_functions (includes quite a few undocumented functions), the
PHP
 manual, and quite a few others it failed to mention but should be
 highlighted. unset() is a good example, along with print/echo, I managed
to
 put it together. Every entry on it's own line (so it's seperated by "\n").

 My head feels like it is being used as the repository for Anna Nichole
 Smith's silicone breast implants (both failed and spare parts for future
 use).

 In any case, there are 1755 entries in the blasted thing. If it's in the
PHP
 manual or get_defined_functions, it's in there. And damn is that alot.

 Here is the link to the text file:
 http://crazyoddball.hypermart.net/php.stx.txt


 However I learned so many cool things with so many functions I'd like to
 use, but I have a severe headache and have to go to work (I'll be in a car
 the whole time, so no computer) in one hour, and I haven't slept.

 And I'm not getting paid for this either.

 Ah yes, this is GeekLife. But I have no caffiene in my system. So this is
 the GranolaGeekLife...GGL...giggle?



 Well whatever I end up doing/not-doing, enjoy! Hopefully the thing will be
 useful.

 I certainly hope so, because compiling the whole thing was overkill if I'm
 the only one that will use it :)



 --
 Plutarck
 Should be working on something...
 ...but forgot what it was.



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Date formatting

2001-04-06 Thread Joe Stump

You need a UNIX timestamp for the second argument in date() - thus you need
to first convert your $even into a timestamp (number of seconds past 1970).

?
  $event = '2001-03-15 24:03:34';
  list($date,$time) = explode(' ',$event);
  list($year,$month,$day) = explode('-',$date);
  list($hour,$min,$sec) = explode(':',$time);

  $foo = mktime($hour,$min,$sec,$month,$day,$year)."\n";
  echo date("D j M",$foo);

?

That would work ...

--Joe

On Fri, Apr 06, 2001 at 01:13:59PM +0100, Matt Davis wrote:
 Hi I am trying to format a date extracted from my DB. I have run my query
 and then have used the following to get my row data
 
   while ($row = mysql_fetch_array($sql_result)) {
  $title = $row["message_title"];
  $message = $row["message"];
  $event = $row["date_of_event"];
 
  $shortevent = date ("D j M", $event);
 
 I am trying to take $event and make it diplay like this "FRI 06 APR" using
 the date function. Although $event outputs like this "2001-04-06 00:00:00"
 $shortevent outputs "Thu 1 Jan" which is unix epoch date.
 
 Does anybody know what I am doiing wrong its probably something really
 simple but I cant see what.
 
 Matt.
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


/**\
 *Joe Stump - PHP/SQL/HTML Developer  *
 * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net   *
 * "Better to double your money on mediocrity than lose it all on a dream."   * 
\**/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Nearly all (1755) PHP functions in a text file

2001-04-06 Thread Jason Lotito

WoW.  That is UberGeek!  I am humbledcool...fear not, good sir, for that
list will become very handy indeed.

Jason Lotito
www.NewbieNetwork.net
Where those who can, teach;
and those who can, learn.


 -Original Message-
 From: Plutarck [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 06, 2001 12:17 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Nearly all (1755) PHP functions in a text file


 First of all I use Edit Plus, which uses a list of PHP functions to know
 what words to highlight in the code.

 Well now that I have a seriously throbbing headache, I've done
 it. Finally.

 If you use a program that needs a list of functions for syntax
 highlighting,
 I've finally got one that has every function according to PHP
 get_defined_functions (includes quite a few undocumented
 functions), the PHP
 manual, and quite a few others it failed to mention but should be
 highlighted. unset() is a good example, along with print/echo, I
 managed to
 put it together. Every entry on it's own line (so it's seperated by "\n").

 My head feels like it is being used as the repository for Anna Nichole
 Smith's silicone breast implants (both failed and spare parts for future
 use).

 In any case, there are 1755 entries in the blasted thing. If it's
 in the PHP
 manual or get_defined_functions, it's in there. And damn is that alot.

 Here is the link to the text file:
 http://crazyoddball.hypermart.net/php.stx.txt


 However I learned so many cool things with so many functions I'd like to
 use, but I have a severe headache and have to go to work (I'll be in a car
 the whole time, so no computer) in one hour, and I haven't slept.

 And I'm not getting paid for this either.

 Ah yes, this is GeekLife. But I have no caffiene in my system. So this is
 the GranolaGeekLife...GGL...giggle?



 Well whatever I end up doing/not-doing, enjoy! Hopefully the thing will be
 useful.

 I certainly hope so, because compiling the whole thing was overkill if I'm
 the only one that will use it :)



 --
 Plutarck
 Should be working on something...
 ...but forgot what it was.



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 / configure.in

2001-04-06 Thread Jon Parise

jon Fri Apr  6 09:01:20 2001 EDT

  Modified files:  
/php4   configure.in 
  Log:
  Fix expansion of PEAR_INSTALLDIR.
  
  
Index: php4/configure.in
diff -u php4/configure.in:1.229 php4/configure.in:1.230
--- php4/configure.in:1.229 Wed Apr  4 13:52:43 2001
+++ php4/configure.in   Fri Apr  6 09:01:20 2001
@@ -1,4 +1,4 @@
-dnl ## $Id: configure.in,v 1.229 2001/04/04 20:52:43 sniper Exp $ -*- sh -*-
+dnl ## $Id: configure.in,v 1.230 2001/04/06 16:01:20 jon Exp $ -*- sh -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -717,9 +717,9 @@
   PEAR_INSTALLDIR="$prefix/lib/php"
 fi
 
-EXTENSION_DIR="\${PEAR_INSTALLDIR}/extensions/$PART1-$PART2-$ZEND_MODULE_API_NO"
+EXTENSION_DIR="${PEAR_INSTALLDIR}/extensions/$PART1-$PART2-$ZEND_MODULE_API_NO"
 
-INCLUDE_PATH=".:\${PEAR_INSTALLDIR}"
+INCLUDE_PATH=".:${PEAR_INSTALLDIR}"
 
 PHP_BUILD_RPATH
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Variables

2001-04-06 Thread Jon Haworth

But members.evolt.org does, along with MySQL, Cold Fusion, and a heap of
other goodies.

HTH
Jon

-Original Message-
From: Joe Stump [mailto:[EMAIL PROTECTED]]
Sent: 06 April 2001 17:03

I'm not sure about Freeserve, but I don't think that Geocities supports PHP
on their webpages (at least not for users ...).

--Joe

On Fri, Apr 06, 2001 at 10:05:14AM +0100, Cheng, Kynan (London) wrote:
 Hello,
 
 Can anyone help me to achieve this using PHP:
 
 I would like to have a personal photographic portfolio site with
thumbnails.
 Clicking on the thumbnail would bring up another page which has an
enlarged
 version of the photo on a standard 'template page'.  In other words the
 photo src is a variable.
 
 Thing is I know not much about PHP/CGI/JS and I am using free ISPs like
 Freeserve (UK) and Yahoo Geocities, so I don't know what is the best way
to
 approach this.
 
 Thanks for any pointers.
 
 Kynan


**
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Which is better??

2001-04-06 Thread Curtis

Hello,

I am wondering witch way is that best to go with my forms..

Self Referenceing or have the data sent to another page for the
processing.

i.e.
(option one)
My forms page is named "submit.phtml"
form action="submit.phtml" method="post"

OR
(option two)
My forms page name is "enterdata.phtml"
form action="submit.phtml" method="post"

and it uses another page to submit the data.
that displays  "DATA SUBMITTED"

Make sense?

The reason I ask is that I am having problems making a field REQUIRED
with option one.
But all of my forms are set up that way.

Thanks for any input.

Curtis



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Which is better??

2001-04-06 Thread Michael Kimsal

Why are you having problems with option one?  That one makes more
sense to me, because you can have the FORM in only one file, and show
error messages/etc on the same page as the form.

psuedo-code

?
if (submitted) {
check values
if no errors(redirect to next page)
if errors }
?
?= $errors;?
form
SHOW FORM STUFF HERE
also include submitted values so if
there are errors we'll see them an not
have to reinput everything
input type="hidden" name="submitted" value="yes"
/form
?


Self-referencing seems to be the way to go, imo.



Curtis wrote:

 snip
 The reason I ask is that I am having problems making a field REQUIRED
 with option one.
 But all of my forms are set up that way.

 Thanks for any input.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Nested for() loops?

2001-04-06 Thread jvoth

Howdy Y'all!

I'm trying to figure out why I'm having so much difficulty with
nested for loops.

As a test, I did this and it doesn't work. The script simply doesn't 
give any output.

?
 error_reporting(E_ALL);

 for( $i=0; $i10; $i++ )
  for( $j=0; $j10; $j++ )
  {
$res = $i * $j;
print(" result = $res br");
  }
?

If I remove the inner loop then it works fine but that's useless.

I am hoping to figure out how to make this work since I need to 
populate a 2 dimensional array with results from multiple database
queries.

Any ideas? Anything obviously wrong?

Thanks in advance!
John

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Nested for() loops?

2001-04-06 Thread Joe Stump

A copy and paste into foo.php and then a php -q foo.php yielded results for
me.

--Joe

On Fri, Apr 06, 2001 at 10:44:59AM -0600, [EMAIL PROTECTED] wrote:
 Howdy Y'all!
 
 I'm trying to figure out why I'm having so much difficulty with
 nested for loops.
 
 As a test, I did this and it doesn't work. The script simply doesn't 
 give any output.
 
 ?
  error_reporting(E_ALL);
 
  for( $i=0; $i10; $i++ )
   for( $j=0; $j10; $j++ )
   {
 $res = $i * $j;
 print(" result = $res br");
   }
 ?
 
 If I remove the inner loop then it works fine but that's useless.
 
 I am hoping to figure out how to make this work since I need to 
 populate a 2 dimensional array with results from multiple database
 queries.
 
 Any ideas? Anything obviously wrong?
 
 Thanks in advance!
 John
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


/**\
 *Joe Stump - PHP/SQL/HTML Developer  *
 * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net   *
 * "Better to double your money on mediocrity than lose it all on a dream."   * 
\**/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP/MySQL Code

2001-04-06 Thread Jeff Oien

This code won't work. I'm trying to get an error if the username
is entered incorrectly but it won't go through the if brackets. I even
tried printing out $num and it's 0. I also tried 
if ($num = "0") {
if ($num = '0') {

?php
include("connect.php");
$result=mysql_query("select * from table where
username='$username'",$connection) or die ("Can't do it");
$num = mysql_numrows($result);

if ($num = 0) {
print "htmlerror message etc.
exit;
}

Jeff Oien

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Nested for() loops?

2001-04-06 Thread Johnson, Kirk

I cut and pasted your code and it worked fine - ???

kirk


 As a test, I did this and it doesn't work. The script simply doesn't 
 give any output.
 
 ?
  error_reporting(E_ALL);
 
  for( $i=0; $i10; $i++ )
   for( $j=0; $j10; $j++ )
   {
 $res = $i * $j;
 print(" result = $res br");
   }
 ?
 
 If I remove the inner loop then it works fine but that's useless.
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Variables

2001-04-06 Thread Cheng, Kynan (London)

Thanks for the tips guys,
but I'm also new to the coding...
can anyone tell me what the script to accept the variable might be?


Geocities does do lots of Cgi scripts - is that better/easier?

 -Original Message-
 From: Jon Haworth [SMTP:[EMAIL PROTECTED]]
 Sent: 06 April 2001 17:20
 To:   '[EMAIL PROTECTED]'
 Subject:  RE: [PHP] Variables
 
 But members.evolt.org does, along with MySQL, Cold Fusion, and a heap of
 other goodies.
 
 HTH
 Jon
 
 -Original Message-
 From: Joe Stump [mailto:[EMAIL PROTECTED]]
 Sent: 06 April 2001 17:03
 
 I'm not sure about Freeserve, but I don't think that Geocities supports
 PHP
 on their webpages (at least not for users ...).
 
 --Joe
 
 On Fri, Apr 06, 2001 at 10:05:14AM +0100, Cheng, Kynan (London) wrote:
  Hello,
  
  Can anyone help me to achieve this using PHP:
  
  I would like to have a personal photographic portfolio site with
 thumbnails.
  Clicking on the thumbnail would bring up another page which has an
 enlarged
  version of the photo on a standard 'template page'.  In other words the
  photo src is a variable.
  
  Thing is I know not much about PHP/CGI/JS and I am using free ISPs like
  Freeserve (UK) and Yahoo Geocities, so I don't know what is the best way
 to
  approach this.
  
  Thanks for any pointers.
  
  Kynan
 
 
 **
 'The information included in this Email is of a confidential nature and is
 
 intended only for the addressee. If you are not the intended addressee, 
 any disclosure, copying or distribution by you is prohibited and may be 
 unlawful. Disclosure to any party other than the addressee, whether 
 inadvertent or otherwise is not intended to waive privilege or
 confidentiality'
 
 **
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP/MySQL Code

2001-04-06 Thread Steve Werby

"Jeff Oien" [EMAIL PROTECTED] wrote:
 This code won't work. I'm trying to get an error if the username
 is entered incorrectly but it won't go through the if brackets. I even
 tried printing out $num and it's 0. I also tried
 if ($num = "0") {
 if ($num = '0') {

The single "=" sets the variable $num to that value.  A double "==" is an
equality comparison operator - that's what you want in this case.  Also,
since mysql_numrows() returns a number, not a string, you don't need quots
around the 0.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP/MySQL Code

2001-04-06 Thread Jon Haworth

The comparison operator is ==. = means "assign". Try:

if ($num == 0) {
foo(bar, baz);
}

AFAIK what your code means is "assign 0 to $num and then, if that worked,
print the error message."

HTH
Jon


-Original Message-
From: Jeff Oien [mailto:[EMAIL PROTECTED]]
Sent: 06 April 2001 17:51
To: PHP
Subject: [PHP] PHP/MySQL Code 


This code won't work. I'm trying to get an error if the username
is entered incorrectly but it won't go through the if brackets. I even
tried printing out $num and it's 0. I also tried 
if ($num = "0") {
if ($num = '0') {

?php
include("connect.php");
$result=mysql_query("select * from table where
username='$username'",$connection) or die ("Can't do it");
$num = mysql_numrows($result);

if ($num = 0) {
print "htmlerror message etc.
exit;
}

Jeff Oien

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



**
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or
confidentiality'

**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP/MySQL Code

2001-04-06 Thread Brian S. Dunworth

At 11:51 AM 4/6/01 -0500, Jeff Oien wrote:

if ($num = 0) {
 print "htmlerror message etc.
 exit;
}

   This "conditional" will always run.  you are assigning $num the value of 
zero within your if() statement, and that assignation actually happens, so 
the result is "true" and the braced statements run.

   Try:

if ($num == 0) {
   print "blah blah blah, etc.\n"
   exit;
}

  - Brian

  -
Brian S. Dunworth
Sr. Software Development Engineer
Oracle Database Administrator
The Printing House, Ltd.

(850) 875-1500  x225
[EMAIL PROTECTED]
  -


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /ext/skeleton skeleton.c

2001-04-06 Thread Jon Parise

jon Fri Apr  6 09:04:25 2001 EDT

  Modified files:  
/php4/ext/skeleton  skeleton.c 
  Log:
  Make this message more grammatically correct.
  
  
Index: php4/ext/skeleton/skeleton.c
diff -u php4/ext/skeleton/skeleton.c:1.12 php4/ext/skeleton/skeleton.c:1.13
--- php4/ext/skeleton/skeleton.c:1.12   Fri Apr  6 07:42:06 2001
+++ php4/ext/skeleton/skeleton.cFri Apr  6 09:04:25 2001
@@ -97,7 +97,7 @@
 
convert_to_string_ex(arg);
 
-   len = sprintf(string, "Congratulations, you have successfully modified 
ext/%.80s/config.m4, module %.80s is compiled into PHP", "extname", Z_STRVAL_PP(arg));
+   len = sprintf(string, "Congratulations! You have successfully modified 
+ext/%.80s/config.m4. Module %.80s is now compiled into PHP.", "extname", 
+Z_STRVAL_PP(arg));
RETURN_STRINGL(string, len, 1);
 }
 /* }}} */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP/MySQL Code

2001-04-06 Thread Jeff Oien

 "Jeff Oien" [EMAIL PROTECTED] wrote:
  This code won't work. I'm trying to get an error if the username
  is entered incorrectly but it won't go through the if brackets. I even
  tried printing out $num and it's 0. I also tried
  if ($num = "0") {
  if ($num = '0') {
 
 The single "=" sets the variable $num to that value.  A double "==" is an
 equality comparison operator - that's what you want in this case.  Also,
 since mysql_numrows() returns a number, not a string, you don't need quots
 around the 0.
 
 --
 Steve Werby
 President, Befriend Internet Services LLC
 http://www.befriend.com/

Ah, one of those repeated rookie mistakes. Thanks for helping me out.
Jeff Oien

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 / php.ini-dist

2001-04-06 Thread Jon Parise

jon Fri Apr  6 09:24:56 2001 EDT

  Modified files:  
/php4   php.ini-dist 
  Log:
  Comment out the 'include_path' variable by default.
  
  # Leaving it blank overrides the default include path, which contains the
  # PEAR directory.
  # The other option is to have the build system generate this file and expand
  # @PEAR_INSTALLDIR@ on this line to reflect the system default.
  
  
Index: php4/php.ini-dist
diff -u php4/php.ini-dist:1.77 php4/php.ini-dist:1.78
--- php4/php.ini-dist:1.77  Thu Apr  5 05:41:25 2001
+++ php4/php.ini-dist   Fri Apr  6 09:24:55 2001
@@ -1,5 +1,5 @@
 [PHP]
-; $Id: php.ini-dist,v 1.77 2001/04/05 12:41:25 dbeu Exp $
+; $Id: php.ini-dist,v 1.78 2001/04/06 16:24:55 jon Exp $
 
 ;;;
 ; About this file ;
@@ -308,12 +308,11 @@
 ;
 
 ; UNIX: "/path1:/path2"  Windows: "\path1;\path2"
-include_path =
+;include_path =
 
 ; The root of the PHP pages, used only if nonempty.
 doc_root =
 
-
 ; The directory under which PHP opens the script using /~usernamem used only
 ; if nonempty.
 user_dir =
@@ -779,4 +778,4 @@
 
 ; Local Variables:
 ; tab-width: 4
-; End:
\ No newline at end of file
+; End:



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP/MySQL Code

2001-04-06 Thread long huynh

I think the function should be mysql_num_rows.  There's an mSQL function
msql_numrows, but for MySQL it needs the second underscore in between 'num'
and 'rows'.

 $num = mysql_numrows($result);


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Nested for() loops? - Now Multi Dimension Arrays

2001-04-06 Thread jvoth



Joe Stump wrote:
 
 A copy and paste into foo.php and then a php -q foo.php yielded results for
 me.

Yeah, it's giving me results too today. I don't know what went wrong
yesterday.

To extend my question, I'm trying to work with multidimensional arrays.

For example, I would like to do this:

?
 error_reporting(E_ALL);

 $target_array = array();

 echo "starting br";

  for( $i=0; $i5; $i++ )
   for( $j=0; $j5; $j++ )
   {
 $res = $i * $j;
 $target_array[$i][$j] = $res;
 print("result = $target_array[$i][$j] br");
   }
  echo "done";
?

And this is my result today:
starting 
result = Array[0] 
result = Array[1] 
result = Array[2] 
result = Array[3] 
result = Array[4] 
result = Array[0] 
result = Array[1] 
result = Array[2] 
result = Array[3] 
result = Array[4] 
result = Array[0] 
result = Array[1] 
result = Array[2] 
result = Array[3] 
result = Array[4] 
result = Array[0] 
result = Array[1] 
result = Array[2] 
result = Array[3] 
result = Array[4] 
result = Array[0] 
result = Array[1] 
result = Array[2] 
result = Array[3] 
result = Array[4] 
done 

My thinking is that PHP ought to be like C when doing simple stuff like
this.
I must have something wrong with the declaration of the array. 

How do you declare a multidimensional array??!!??
How do you work with it then???

Thanks in advance!!

John

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Nested for() loops? - Now Multi Dimension Arrays

2001-04-06 Thread Joe Stump

You just do something like this:

?

  $arr = array(0,23,4,2,1);
  for($i = 0 ; $i  10 ; ++$i)
$arrB[] = $arr;
 
  while(list(,$my_array) = each($arrB))
while(list($key,$val) = each($my_array))
  echo $key.' - '.$val."\n";

?

Just throw arrays into arrays :O)

--Joe

On Fri, Apr 06, 2001 at 11:18:19AM -0600, [EMAIL PROTECTED] wrote:
 
 
 Joe Stump wrote:
  
  A copy and paste into foo.php and then a php -q foo.php yielded results for
  me.
 
 Yeah, it's giving me results too today. I don't know what went wrong
 yesterday.
 
 To extend my question, I'm trying to work with multidimensional arrays.
 
 For example, I would like to do this:
 
 ?
  error_reporting(E_ALL);
 
  $target_array = array();
 
  echo "starting br";
 
   for( $i=0; $i5; $i++ )
for( $j=0; $j5; $j++ )
{
  $res = $i * $j;
  $target_array[$i][$j] = $res;
  print("result = $target_array[$i][$j] br");
}
   echo "done";
 ?
 
 And this is my result today:
 starting 
 result = Array[0] 
 result = Array[1] 
 result = Array[2] 
 result = Array[3] 
 result = Array[4] 
 result = Array[0] 
 result = Array[1] 
 result = Array[2] 
 result = Array[3] 
 result = Array[4] 
 result = Array[0] 
 result = Array[1] 
 result = Array[2] 
 result = Array[3] 
 result = Array[4] 
 result = Array[0] 
 result = Array[1] 
 result = Array[2] 
 result = Array[3] 
 result = Array[4] 
 result = Array[0] 
 result = Array[1] 
 result = Array[2] 
 result = Array[3] 
 result = Array[4] 
 done 
 
 My thinking is that PHP ought to be like C when doing simple stuff like
 this.
 I must have something wrong with the declaration of the array. 
 
 How do you declare a multidimensional array??!!??
 How do you work with it then???
 
 Thanks in advance!!
 
 John


/**\
 *Joe Stump - PHP/SQL/HTML Developer  *
 * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net   *
 * "Better to double your money on mediocrity than lose it all on a dream."   * 
\**/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] odbc_result, long data get cut off????

2001-04-06 Thread Scott Fletcher

Hi!

I found an interesting PHP issues here.  I use the "odbc_result_all" or
"odbc_fetch_row" or "odbc_result" to display the data in any column in a
row.  What I got is that a very long data on a column box doesn't show them
all on the website.  The MS-SQL database showed all of the data in that
field.

Here's what it's look like

(On the Website)
Address the following issues: 1. In order to us this printer with Deal
Pack, you must download and install an Epson FX-100 printer driver (see Deal
Pack Help for details). 2. In order to us this printer with Deal Pack, you
must change some of the de

(MS-SQL)
Address the following issues:  1. In order to use this printer with Deal
Pack, you must download and install an Epson FX-100 printer driver (see Deal
Pack Help for details).  2. In order to use this printer with Deal Pack, you
must change some of the default printer settings within the printer (see
Deal Pack Help for details).

-

What do I need to fix that?  PHP is suppose to show them all, not part of
it.  When the data get too long, it get cut off.

Thanks,
 Scott




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP/MySQL Code

2001-04-06 Thread Steve Werby

"long huynh" [EMAIL PROTECTED] wrote:
 I think the function should be mysql_num_rows.  There's an mSQL function
 msql_numrows, but for MySQL it needs the second underscore in between
'num'
 and 'rows'.

  $num = mysql_numrows($result);

Either will work.  mysql_numrows() is the old name of the function from
previous PHP versions.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Virtual Hosts on Solaris with iPlanet Enterprise

2001-04-06 Thread Tom Freeman


Does anyone know the way to make php4 running as NSAPI, work with named
virtuals? It seems to work only if it is a real virtual (with its own IP)
and not a named virtual. Any help is greatly appreciated




Tom Freeman
Web Analyst
StellarRAD Systems
an Everest Global Technologies Company

p | 636.625.5839 e | [EMAIL PROTECTED]
http://www.stellarrad.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] No character set?

2001-04-06 Thread Leon Mergen

Hello all,

Today, I compiled my PHP as CGI, since I want to use some PHP scripts in cron jobs. 
Shouldn't be too hard, I tought, and compiled with

./configure --with-mysql

For some strange reason, it does not work. Look at this:

[root@blazebox cron]# php ./missiles.php
File 'NONEXISTENT/charsets/?.conf' not found (Errcode: 2)
Character set '#7' is not a compiled character set and is not specified in the 
'NONEXISTENT/charsets/Index' file
X-Powered-By: PHP/4.0.4pl1
Content-type: text/html

br
bWarning/b:  MySQL Connection Failed: Can't initialize character set 7 (path: 
default)
 in b./missiles.php/b on line b5/bbr
[root@blazebox cron]#

Anyone has any idea what is causing this problem, and if/how I can fix it?

Thanks in advance,

_
Leon Mergen
[EMAIL PROTECTED]
President of Operations
BlazeBox, Inc.
ICQ: 55677353



[PHP] Help please.

2001-04-06 Thread Chris

Hi,
I am trying to find some info on upgrading from php3 to php4.
I can't seem to find any docs about upgrading, just installing. Is this the same thing?
Do I have to re-compile apache just to go from php3 to php4?

Thanks,
Chris.




RE: [PHP] Help please.

2001-04-06 Thread Johnson, Kirk

http://www.php.net/manual/en/migration4.php

 -Original Message-
 From: Chris [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 06, 2001 12:19 PM
 To: php
 Subject: [PHP] Help please.
 
 
 Hi,
 I am trying to find some info on upgrading from php3 to php4.
 I can't seem to find any docs about upgrading, just 
 installing. Is this the same thing?
 Do I have to re-compile apache just to go from php3 to php4?
 
 Thanks,
 Chris.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Newsletter on the way..stuck in the moment!

2001-04-06 Thread Dhaval Desai

Hi!

Well, I want to send an email to about 300 people. The
problem is that if I use  this method people can see
all the email address of the people whoever it is sent
to.


?php

$connect = mysql_connect();
$query = "select email from news";
$execute = mysql_db_query("uaegraduate", $query);
while($r = mysql_fetch_array($execute))
{
$email = $r['email'];
$add .= $email . ",";
}


$headers = "From:
[EMAIL PROTECTED][EMAIL PROTECTED]\n";
$headers .= "Content-Type: text/html;
charset=iso-8859-1\n"; 

$subject = "hey";
$to = "$add";
$mailmessage = "hey this is the message";

$mailsomeone = mail($to, $subject, $mailmessage,
$headers);

if($mailsomeone)
{
echo "Success";
}

?


If I use the above method, all the email  address will
apear in the to: like this:-
To:[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED] 

and goes on for 300 entries.


Is there any way I can stop this from happening yet
the mails reaching their destination.


Thank You

Cheers!~
Dhaval Desai

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] mssql_pconnect issues?

2001-04-06 Thread Kees Hoekzema

maybe, but fact is that it isn't in php404pl1, and it usefull if you
use persistent connections :)

Kees

-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]Namens
Michael Kimsal
Verzonden: Friday, April 06, 2001 5:12 PM
Aan: [EMAIL PROTECTED]
Onderwerp: Re: [PHP] mssql_pconnect issues?


Wouldn't this have made it in PHP 4.0.4 by now?  Or am I reading 2001-01-04
wrong?  (january 4?)

Kees Hoekzema wrote:

 Have you already tried to patch the Zend/zend_list.c file and recompile
it?
 there is a known problem with persistent connections,
 read this:

http://groups.google.com/groups?hl=enlr=safe=offic=1th=8810708445e328bb;
 seekd=939114469#939114469

 and this: http://marc.theaimsgroup.com/?l=php-devm=97858730928909w=2

 it sure helped here, from the more than 40k errors with mysql we went
 down to approx 1000 errors/daily.

 Kees

 -Oorspronkelijk bericht-
 Van: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]Namens
 Michael Kimsal
 Verzonden: Friday, April 06, 2001 3:40 PM
 Aan: [EMAIL PROTECTED]
 CC: [EMAIL PROTECTED]
 Onderwerp: [PHP] mssql_pconnect issues?

 Very strange.  I've noticed some integrity issues using mssql_pconnect,
 but we don't explicitly use transactions in any case, so it may not
 even go that deep.

 I wonder if the odbc functions have this issue - anyone have any ideas?

 [EMAIL PROTECTED] wrote:

  Hello Michael
 
  Some people have reported with the ADODB database class library that
they
  were having problems with inserts and updates when using mssql_pconnect.
  Switching to regular mssql_connect the problems disappeared.
 
  I suspect it has something to do with persistent connections having
  inconsistent transaction handling settings. Eg.
 
  - Connection A is setup by user 1 to use transactions.
  - Connection B is setup by user 2 not to use transactions.
  - Connection A is reused by user 2, who thinks he doesn't need
  transactions, but connection A actually requires a commit to work
because
  of user 1's previous setting...
 
  People using Interbase have reported this problem also.
 
  Regards, john

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Nearly all (1755) PHP functions in a text file

2001-04-06 Thread Johnson, Kirk

So, now that you've seen 'em all, which one is your favorite? :)

Kirk

 -Original Message-
 From: Plutarck [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 06, 2001 1:17 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Nearly all (1755) PHP functions in a text file

 In any case, there are 1755 entries in the blasted thing. If 
 it's in the PHP
 manual or get_defined_functions, it's in there. And damn is that alot.
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Help please.

2001-04-06 Thread Chris

Yes, thank you, but this has nothing to do with what I asked, this is about
CODE migration.


 http://www.php.net/manual/en/migration4.php

  -Original Message-
  From: Chris [mailto:[EMAIL PROTECTED]]
  Sent: Friday, April 06, 2001 12:19 PM
  To: php
  Subject: [PHP] Help please.
 
 
  Hi,
  I am trying to find some info on upgrading from php3 to php4.
  I can't seem to find any docs about upgrading, just
  installing. Is this the same thing?
  Do I have to re-compile apache just to go from php3 to php4?
 
  Thanks,
  Chris.

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Which is better??

2001-04-06 Thread Felix Kronlage

On Fri, Apr 06, 2001 at 12:27:22PM -0400, Curtis wrote:

 Self Referenceing or have the data sent to another page for the
 processing.

I usually do self-referencing, since this way I have everything 
in one place, don't rely on two scripts, don't need to open
two files in my editor etc. :)

-fkr
-- 
gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0  8A48 0D31 9BD3 D9AC 74D0 
  |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE  |
  |all your base are belong to us  |  shame on me  | fkr@IRCnet | 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /ext/skeleton skeleton.c

2001-04-06 Thread Sean Bright

elixer  Fri Apr  6 10:48:34 2001 EDT

  Modified files:  
/php4/ext/skeleton  skeleton.c 
  Log:
  Fixed possible overflow again.
  # Heh...
  
  
Index: php4/ext/skeleton/skeleton.c
diff -u php4/ext/skeleton/skeleton.c:1.13 php4/ext/skeleton/skeleton.c:1.14
--- php4/ext/skeleton/skeleton.c:1.13   Fri Apr  6 09:04:25 2001
+++ php4/ext/skeleton/skeleton.cFri Apr  6 10:48:34 2001
@@ -97,7 +97,7 @@
 
convert_to_string_ex(arg);
 
-   len = sprintf(string, "Congratulations! You have successfully modified 
ext/%.80s/config.m4. Module %.80s is now compiled into PHP.", "extname", 
Z_STRVAL_PP(arg));
+   len = sprintf(string, "Congratulations! You have successfully modified 
+ext/%.78s/config.m4. Module %.78s is now compiled into PHP.", "extname", 
+Z_STRVAL_PP(arg));
RETURN_STRINGL(string, len, 1);
 }
 /* }}} */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Newsletter on the way..stuck in the moment!

2001-04-06 Thread Steve Werby

"Dhaval Desai" [EMAIL PROTECTED] wrote:
 Well, I want to send an email to about 300 people. The
 problem is that if I use  this method people can see
 all the email address of the people whoever it is sent
 to.

Add the addresses to the bcc: field instead of the to: field.  I believe
this is covered in an example right in the manual.  See mail() in the manual
online.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Help please.

2001-04-06 Thread Steve Werby

"Chris" [EMAIL PROTECTED] wrote:
 I am trying to find some info on upgrading from php3 to php4.
 I can't seem to find any docs about upgrading, just installing.
 Is this the same thing?
 Do I have to re-compile apache just to go from php3 to php4?

Upgrading from PHP3 to PHP4 consists of installing PHP4.  You can install
php with apxs (--with-apxs flag) in which case you don't need to recompile
Apache or you can recompile Apache and install it as a static module
directly in the Apache binary.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] bug in php4 with postgres?

2001-04-06 Thread Kristopher Yates

How come sometimes I get this message and sometimes I dont?

[Fri Apr  6 13:49:15 2001] [error] PHP Warning:  3 is not a valid 
PostgreSQL lin
k resource in /usr/local/apache/htdocs/ltt-dev/htdocs/formproc.php3 
on line 134

It worked fine until I upgraded to PHP4 and now a bunch of code is 
broken - so I'm having to rewrite it.  That really sucks.  Anybody 
else have this problem?  I really would like to get in touch with 
someone who uses postgres with php but i dont know any one else 
that uses this software.  Any help is appreciated
kris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Close Window script

2001-04-06 Thread Wee Chua

Hi all,
Can anyone tell me how to write a script to close the current opened window
with hyperlink? Thank you.

Calvin Chua
Systems Analyst
InterClean Equipment, Inc.
734-975-2967
www.InterClean.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Extension_dir in php.ini?

2001-04-06 Thread Lindsay Adams

Okay, you may call me an idiot all you want,
But if the extension_dir= ./
In php.ini
And PHP is loaded as an apxs module in apache, then just where does ./ point
to?

ServerRoot?
DocumentRoot?
Some other directory?

Having a major brain  in getting my .so into the right place.

Also, how can I compile libpdf.so (version 3) to work with PHP4.0.4pl1?

If I have to go backwards in PHP (say to 4.0.3pl1) to be able to get PDF
support compiled into PHP (because it just isn't working for me on 4.0.4pl1)
then somebody please tell me that.

I have read through all the suggestions in the list archive
I have downloaded the latest versions of files pertaining to pdf and
4.0.4pl1 from cvs.php.net and yet, I still get the problem, during
./configure, of it complaing about my version 3 pdflib, not being version 3
because it can't find pdf_show_boxed().

I _NEED_ pdf support, so any help in choosing the right set of versions
would be greatly helpful!

Thanks gang!

Ps- yes, I also changed ext/crypt.c php_srand... On line 150(or thereabouts)
to make php work at all on my box (Qube2)


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Close Window script

2001-04-06 Thread Lindsay Adams

This is offtopic, but easy

User javascript
Make your link =
a href="javascript:window.close();"linked item /a

If you are wanting to do it with PHP, stop.
PHP is server side only
http is connectionless, the server can't tell the client to close it's
window.

On 4/6/01 11:45 AM, "Wee Chua" [EMAIL PROTECTED] wrote:

 Hi all,
 Can anyone tell me how to write a script to close the current opened window
 with hyperlink? Thank you.
 
 Calvin Chua
 Systems Analyst
 InterClean Equipment, Inc.
 734-975-2967
 www.InterClean.com
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /ext/gd gd.c php_gd.h

2001-04-06 Thread Jani Taskinen

sniper  Fri Apr  6 11:01:52 2001 EDT

  Modified files:  
/php4/ext/gdgd.c php_gd.h 
  Log:
  Killed some compile warnings.
  
Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.120 php4/ext/gd/gd.c:1.121
--- php4/ext/gd/gd.c:1.120  Sat Mar 31 22:20:45 2001
+++ php4/ext/gd/gd.cFri Apr  6 11:01:52 2001
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.120 2001/04/01 06:20:45 sniper Exp $ */
+/* $Id: gd.c,v 1.121 2001/04/06 18:01:52 sniper Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, 
Cold Spring Harbor Labs. */
@@ -92,6 +92,11 @@
 #define CTX_PUTC(c,fp) fputc(c, fp)
 #endif
 
+gdImagePtr _php_image_create_from_string ( zval **Data, char *tn, gdImagePtr 
+(*ioctx_func_p)() );
+static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type, char 
+*tn, gdImagePtr (*func_p)(), gdImagePtr (*ioctx_func_p)());
+static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char *tn, 
+void (*func_p)());
+static int _php_image_type ( char data[8] );
+static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type);
 static void _php_image_bw_convert(gdImagePtr im_org, gdIOCtx *out, int threshold);
 
 #ifdef THREAD_SAFE
Index: php4/ext/gd/php_gd.h
diff -u php4/ext/gd/php_gd.h:1.25 php4/ext/gd/php_gd.h:1.26
--- php4/ext/gd/php_gd.h:1.25   Sat Mar 31 21:42:07 2001
+++ php4/ext/gd/php_gd.hFri Apr  6 11:01:52 2001
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: php_gd.h,v 1.25 2001/04/01 05:42:07 sniper Exp $ */
+/* $Id: php_gd.h,v 1.26 2001/04/06 18:01:52 sniper Exp $ */
 
 #ifndef PHP_GD_H
 #define PHP_GD_H
@@ -142,13 +142,6 @@
 PHP_FUNCTION(jpeg2wbmp);
 PHP_FUNCTION(png2wbmp);
 PHP_FUNCTION(image2wbmp);
-
-
-gdImagePtr _php_image_create_from_string ( zval **Data, char *tn, gdImagePtr 
(*ioctx_func_p)() );
-static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type, char 
*tn, gdImagePtr (*func_p)(), gdImagePtr (*ioctx_func_p)());
-static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char *tn, 
void (*func_p)());
-static int _php_image_type ( char data[8] );
-static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type);
 
 PHPAPI int phpi_get_le_gd(void);
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Close Window script

2001-04-06 Thread Sam Masiello


You need to do this using Javascript since it is a client side function.

window.close() is the function you are looking for.

HTH

Sam Masiello
Systems Analyst
Chek.Com
(716) 853-1362 x289
[EMAIL PROTECTED]

 -Original Message-
From:   Wee Chua [mailto:[EMAIL PROTECTED]] 
Sent:   Friday, April 06, 2001 2:46 PM
To: PHP (E-mail)
Subject:[PHP] Close Window script

Hi all,
Can anyone tell me how to write a script to close the current opened window
with hyperlink? Thank you.

Calvin Chua
Systems Analyst
InterClean Equipment, Inc.
734-975-2967
www.InterClean.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Close Window script

2001-04-06 Thread Pierre-Yves Lemaire

You could do it only in javavascript

or in php

echo "a href=\"javascript://\" OnClick=\"self.close\"Close this 
window/a\n";

py

At 02:45 PM 4/6/01 -0400, you wrote:
Hi all,
Can anyone tell me how to write a script to close the current opened window
with hyperlink? Thank you.

Calvin Chua
Systems Analyst
InterClean Equipment, Inc.
734-975-2967
www.InterClean.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


+ ==
+ Pierre-Yves Lem@ire
+ E-MedHosting.com
+ (514) 729-8100
+ [EMAIL PROTECTED]
+ ==


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] FORM input type=image ... with a posting value

2001-04-06 Thread Jared Howard

I have a page with multiple form submit buttons that carry different values
to do different functions and such.

form name="bidfile" method=post action="?=$ME?"
input type=submit name="mode" value="Edit Contacts"
input type=submit name="mode" value="Add Products"
input type=text name="something" value="?=$something?"
...
/form

?
switch (nvl($mode)) {
case "Edit Contacts" :
save_changes($HTTP_POST_VARS);
add_contact_info($bid_id);
break;
case "Add Products" :
save_changes($HTTP_POST_VARS);
add_bid_items($bid_id);
break;
...
}
?

Which works great!!  However, I grow tiresome of the typical button "look",
and in my attempt to use an image instead:

input type=image name="mode" value="Edit Contacts" src="contacts.png"

failed.  Is there a way to do this?  I have changed my stylesheet to have
the form inputs and whatnot to view smaller which I like.  But not small
enough in some instances, forcing me to look to other ways, such as an
image.  So as I asked before, is there a way to do this or any other
suggestions?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] FORM input type=image ... with a posting value

2001-04-06 Thread Johnson, Kirk

Yes, but you no longer check the value of "value" to determine which button
was clicked. Instead, give each button a unique *name* attribute, then check
if $name_x is set. The browser returns the x,y coordinates of the point
where the user clicks the button, in variables named name_x and name_y.

So,

input type=submit name="modeEdit" value="Edit Contacts"
input type=submit name="modeAdd" value="Add Products"

if($modeEdit_x)
  blah
elseif ($modeAdd_x)
  blah

Kirk

 -Original Message-
 From: Jared Howard [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 06, 2001 1:07 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] FORM input type=image ... with a posting value
 
 
 I have a page with multiple form submit buttons that carry 
 different values
 to do different functions and such.
 
 form name="bidfile" method=post action="?=$ME?"
 input type=submit name="mode" value="Edit Contacts"
 input type=submit name="mode" value="Add Products"
 input type=text name="something" value="?=$something?"
 ...
 /form

 Which works great!!  However, I grow tiresome of the typical 
 button "look",
 and in my attempt to use an image instead:
 
 input type=image name="mode" value="Edit Contacts" 
 src="contacts.png"
 
 failed.  Is there a way to do this?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] FORM input type=image ... with a posting value

2001-04-06 Thread Johnson, Kirk

Oops. You do need the type=image and src= attributes, instead of what I
wrote in the example. Good thing it's Friday :)

 -Original Message-
 From: Johnson, Kirk 
 Sent: Friday, April 06, 2001 1:29 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP] FORM input type=image ... with a posting value
 
 
 Yes, but you no longer check the value of "value" to 
 determine which button
 was clicked. Instead, give each button a unique *name* 
 attribute, then check
 if $name_x is set. The browser returns the x,y coordinates of 
 the point
 where the user clicks the button, in variables named name_x 
 and name_y.
 
 So,
 
 input type=submit name="modeEdit" value="Edit Contacts"
 input type=submit name="modeAdd" value="Add Products"
 
 if($modeEdit_x)
   blah
 elseif ($modeAdd_x)
   blah
 
 Kirk
 
  -Original Message-
  From: Jared Howard [mailto:[EMAIL PROTECTED]]
  Sent: Friday, April 06, 2001 1:07 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP] FORM input type=image ... with a posting value
  
  
  I have a page with multiple form submit buttons that carry 
  different values
  to do different functions and such.
  
  form name="bidfile" method=post action="?=$ME?"
  input type=submit name="mode" value="Edit Contacts"
  input type=submit name="mode" value="Add Products"
  input type=text name="something" value="?=$something?"
  ...
  /form
 
  Which works great!!  However, I grow tiresome of the typical 
  button "look",
  and in my attempt to use an image instead:
  
  input type=image name="mode" value="Edit Contacts" 
  src="contacts.png"
  
  failed.  Is there a way to do this?
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: 
 [EMAIL PROTECTED]
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Again about PHP + IRC

2001-04-06 Thread Marius Petraviius

Hello php,

  Soeey but I can't find anyexample abot PHP + IRC..
  Please help me.

_
 2001 m. balandþio 6 d.
 Marius  
 [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] FastTemplate strange Error

2001-04-06 Thread Gustavo Vieira Goncalves Coelho Rios

Hi folks, i writing in order to get a simple problem i am facing with
FastTemplate PHP lib.

I am trying to get my template parsed, but when i access the url, i get
an error:

Warning: Undefined property: table in
/usr/home/grios/.public_html/php_inc/FastTemplate.inc on line 376
0 0
1 10
2 20
3 30
4 40
5 50
6 60
7 70
8 80
9 90


Here is my t.php:

?
require ("FastTemplate.inc");
 
$tpl = new FastTemplate("tpl");
 
$tpl-define(array("table" = "t.tpl"));
$tpl-define_dynamic("row", "table");
 
for ($i = 0; $i  10; $i++) {
$tpl-assign(array("NUMBER" = $i, "RESULT" = $i * 10));
$tpl-parse("ROWS", ".row");
}

$tpl-parse("MAIN", "table");
$tpl-FastPrint();
 
?


Here is my template t.tpl:

table

!-- BEGIN DYNAMIC BLOCK: row --
tr
td{NUMBER}/td
td{RESULT}/td
/tr
!-- END DYNAMIC BLOCK: row --

/table


Very simple, no? But what is wrong?
May some one in this mailing list help me?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP Magazines?

2001-04-06 Thread Chris Anderson

Are there any PHP magazines stateside? I see all kinds of ASP mags, but none for PHP



[PHP] Decode ?iso strings?

2001-04-06 Thread Jeroen Geusebroek

Hello,

I'm creating a mailinglist archive in PHP, and all is going
very well. I'm planning to release it open source when 
version 1.0 is ready.

I have a question, when i get emails and parse them sometimes the
name of the sender is in this format:

=?iso-8859-13?B?TWFyaXVzIFBldHJhdmnoaXVz?=

How do i decode this?

Same goes for mime messages, is there any excisting code that 
decodes mime messages?

Thanks for the help,

Jeroen Geusebroek


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Tutorial for a php based chat enviroment

2001-04-06 Thread Lars Reith

Hi, has someone an idea where to find a tutorial to
build a php based chat enviroment (both implementation
and, very important, the logical background)

Many thank in advance

Lars ;-)

__
Do You Yahoo!?
Gesendet von Yahoo! Mail - http://mail.yahoo.de

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Newsletter on the way..stuck in the moment!

2001-04-06 Thread Boaz Yahav

300 recipients is allot. I would not use a script for so many.
Why don't you use a program that was designed to send
many emails such as Group Mail : 

http://www.sellshareware.com/CustomView.asp?PrID=34604AfID=2407PageID=1

I use it to send mail to tens of thousands of recipients and it's great.

Sincerely

  berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.
 

-Original Message-
From: Steve Werby [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 06, 2001 8:41 PM
To: Dhaval Desai; [EMAIL PROTECTED]
Subject: Re: [PHP] Newsletter on the way..stuck in the moment!


"Dhaval Desai" [EMAIL PROTECTED] wrote:
 Well, I want to send an email to about 300 people. The
 problem is that if I use  this method people can see
 all the email address of the people whoever it is sent
 to.

Add the addresses to the bcc: field instead of the to: field.  I believe
this is covered in an example right in the manual.  See mail() in the manual
online.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] mail() limit?

2001-04-06 Thread Chris

Hi,
Does anyone know if and what the limit is of bcc that can be used in the mail() 
function? Hundreds, thousands?

Thanks,
Chris



RE: [PHP] Which is better??

2001-04-06 Thread Jonathan Sharp

 My forms page is named "submit.phtml"
 form action="submit.phtml" method="post"

and if you use the ? echo $PHP_SELF; ? then you don't even need to wory
about the file name, as it will always submit to itself...

form action="? echo $PHP_SELF; ?" method="POST"

-js

 -Original Message-
 From: Curtis [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 06, 2001 9:27 AM
 To: php
 Subject: [PHP] Which is better??


 Hello,

 I am wondering witch way is that best to go with my forms..

 Self Referenceing or have the data sent to another page for the
 processing.

 i.e.
 (option one)
 My forms page is named "submit.phtml"
 form action="submit.phtml" method="post"

 OR
 (option two)
 My forms page name is "enterdata.phtml"
 form action="submit.phtml" method="post"

 and it uses another page to submit the data.
 that displays  "DATA SUBMITTED"

 Make sense?

 The reason I ask is that I am having problems making a field REQUIRED
 with option one.
 But all of my forms are set up that way.

 Thanks for any input.

 Curtis



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Variables

2001-04-06 Thread Jonathan Sharp

Have you looked at php.net/manual/ ? Just read through the variables portion
and it goes over it.

-js

 -Original Message-
 From: Cheng, Kynan (London) [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 06, 2001 9:54 AM
 To: '[EMAIL PROTECTED]'
 Subject: RE: [PHP] Variables


 Thanks for the tips guys,
 but I'm also new to the coding...
 can anyone tell me what the script to accept the variable might be?


 Geocities does do lots of Cgi scripts - is that better/easier?

  -Original Message-
  From:   Jon Haworth [SMTP:[EMAIL PROTECTED]]
  Sent:   06 April 2001 17:20
  To: '[EMAIL PROTECTED]'
  Subject:RE: [PHP] Variables
 
  But members.evolt.org does, along with MySQL, Cold Fusion, and a heap of
  other goodies.
 
  HTH
  Jon
 
  -Original Message-
  From: Joe Stump [mailto:[EMAIL PROTECTED]]
  Sent: 06 April 2001 17:03
 
  I'm not sure about Freeserve, but I don't think that Geocities supports
  PHP
  on their webpages (at least not for users ...).
 
  --Joe
 
  On Fri, Apr 06, 2001 at 10:05:14AM +0100, Cheng, Kynan (London) wrote:
   Hello,
  
   Can anyone help me to achieve this using PHP:
  
   I would like to have a personal photographic portfolio site with
  thumbnails.
   Clicking on the thumbnail would bring up another page which has an
  enlarged
   version of the photo on a standard 'template page'.  In other
 words the
   photo src is a variable.
  
   Thing is I know not much about PHP/CGI/JS and I am using free
 ISPs like
   Freeserve (UK) and Yahoo Geocities, so I don't know what is
 the best way
  to
   approach this.
  
   Thanks for any pointers.
  
   Kynan
 
 
  **
  'The information included in this Email is of a confidential
 nature and is
 
  intended only for the addressee. If you are not the intended addressee,
  any disclosure, copying or distribution by you is prohibited and may be
  unlawful. Disclosure to any party other than the addressee, whether
  inadvertent or otherwise is not intended to waive privilege or
  confidentiality'
 
  **
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Array of words in textfile?

2001-04-06 Thread Jonathan Sharp

If you're splitting by a defined pattern (such as a space " ") explode is
quite a bit faster...and i believe that if you need reg exps. you can use
split() (which will take a regex as the pattern)...

-js

 -Original Message-
 From: Plutarck [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, April 05, 2001 11:11 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Array of words in textfile?


 If they are all in a format like that, first just read the text file with
 fopen/fread into one big string.

 Then use:

 $refined_string = explode(" ", $bigstring);

 That's the main way to do it, but the preferable way is using a regular
 expression with either the ereg or preg functions.


 --
 Plutarck
 Should be working on something...
 but forgot what it was.


 "Jan Grafstrm" [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Hi!
  I want to read a textfile (cat, dog, rat,) and get it like this:
  $namesArray = array("cat,", "dog,", "rat,");
  If I can do this than I can go on and make changes in my array.
  Like the examples in php manual.
 
 
  Thanks in advance for any tips.
 
  Regards
  Jan
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




  1   2   >