[PHP] Modssl & php 4 fears

2001-07-23 Thread Jason Rennie

Hi again all,

I recompiled apache with modssl and it works.

(Well the snake oil inc cert's work ;)

But i get a warning on apache load about, loading a standard module
(php4.so) and how this may crash becasue it isn't compiled to work with
EAPI. Please comile with -DEAPI

Now the question is, do i need to worry about this ?

I just did a quick recompile of PHP but didn't change the config at all.

Hence no -DEAPI. 

Jason


-- 
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] When did this become the advertising Mailing List

2001-07-23 Thread ReDucTor

When?!?


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

2001-07-23 Thread Yamin Prabudy

Hi,
how do i check that the current date is the end of month ?
thanks in advance


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

2001-07-23 Thread Yamin Prabudy

hi, 
how do i check that the current date is the end of month

Thanks in Advance


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

2001-07-23 Thread ReDucTor

$todaydate = date("m");
$tomorrowdate = date("m",time() + 86400); 
if($todaydate != $tomorrowdate){
   echo "Tomorrow is a new month";
}
- Original Message - 
From: Yamin Prabudy <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 23, 2001 5:27 PM
Subject: [PHP] date HELP !


> hi, 
> how do i check that the current date is the end of month
> 
> Thanks in Advance
> 
> 
> -- 
> 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 HELP !!!!!

2001-07-23 Thread Daniel Rezny

Hello Yamin,

Monday, July 23, 2001, 9:27:46 AM, you wrote:

YP> hi, 
YP> how do i check that the current date is the end of month

YP> Thanks in Advance


If you want to check how long is current month and use this value
later you can use this:

$month=("m"); //can be like this depend on if you scrolling between
moths. If yes variable $month must be recieved from link.

$d=27;
while ($d <= 32) {
$mon = date("m",mktime(0,0,0,$month,$d,$rok));
if ($month != $mon) {
$daylast = $d-1; $d=33;
}
else {
$d++;
  }
}

I hope it helps.
-- 
Best regards,
 Danielmailto:[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 HELP !!!!!

2001-07-23 Thread Henrik Hansen

[EMAIL PROTECTED] (Reductor) wrote:

 > $todaydate = date("m");
 > $tomorrowdate = date("m",time() + 86400); 
 > if($todaydate != $tomorrowdate){
 >echo "Tomorrow is a new month";
>}

or 

if (date("d") == date("j"))
echo "last day";

or something else :)


 > - Original Message - 
 > From: Yamin Prabudy <[EMAIL PROTECTED]>
 > To: <[EMAIL PROTECTED]>
 > Sent: Monday, July 23, 2001 5:27 PM
 > Subject: [PHP] date HELP !
 > 
>> hi, 
>> how do i check that the current date is the end of month
>> 
>> Thanks in Advance
>> 
>> 
>> -- 
>> 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]
>> 

-- 
Henrik Hansen

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

2001-07-23 Thread James Holloway

Better still, use the date("t"); to find out how many days are in the given
month. This part of the date function is a blessing, given the varying days
in months, and the fact that we've a leap year every four years.

James

"Daniel Rezny" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello Yamin,
>
> Monday, July 23, 2001, 9:27:46 AM, you wrote:
>
> YP> hi,
> YP> how do i check that the current date is the end of month
>
> YP> Thanks in Advance
>
>
> If you want to check how long is current month and use this value
> later you can use this:
>
> $month=("m"); //can be like this depend on if you scrolling between
> moths. If yes variable $month must be recieved from link.
>
> $d=27;
> while ($d <= 32) {
> $mon = date("m",mktime(0,0,0,$month,$d,$rok));
> if ($month != $mon) {
> $daylast = $d-1; $d=33;
> }
> else {
> $d++;
>   }
> }
>
> I hope it helps.
> --
> Best regards,
>  Danielmailto:[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 4.0.6

2001-07-23 Thread Adrian D'Costa

Hi,

It works now.  I did a stupid mistake instead of putting --enable-sockets
I put --with-sockets 

Adrian

On Sat, 21 Jul 2001, E. Peter K. Chan wrote:

> Hi
> 
> Try going to the source directory ie where you unzipped the tarball for php.
> May as well upgrade to php4.0.6 - that could save you some problems now and
> later.  Type in:
> 
> # ./configure --help
> 
> it says --with-readline[=DIR] so maybe you need to install readline first or
> point php to where it is? (FYI, I just installed 4.0.6 and it did not
> automatically install readline - I didn't include --with-readline in my
> options)
> 
> if this doesn't help out then the only thing I can suggest is to start from
> scratch, but BACKUP first!
> See:
> http://www.devshed.com/Server_Side/PHP/SoothinglySeamless/page1.html
> 
> It's an excellent tutorial on setting up mysql, php,apache and even openssl.
> And it works.
> 
> Peter
> 
> 
> - Original Message -
> From: "Adrian D'Costa" <[EMAIL PROTECTED]>
> To: "E. Peter K. Chan" <[EMAIL PROTECTED]>
> Cc: "php general list" <[EMAIL PROTECTED]>
> Sent: Saturday, July 21, 2001 4:48 PM
> Subject: Re: [PHP] php 4.0.6
> 
> 
> > Hi Peter,
> >
> > I think the guru of php on the list can tell us what the problem is.  I am
> > going to compile 4.0.4pl2 and see if I get that error.  In fact I am
> > unable to access mysql now even though I have given --with-mysql.
> >
> > Any clues
> >
> > Adrian
> >
> > On Fri, 20 Jul 2001, E. Peter K. Chan wrote:
> >
> > > Hi Adrian
> > >
> > > I just rebuilt my PHP to 4.0.6 and get a similar message with the bcmath
> > > functions.  I don't have an answer for you at the moment.  it may be the
> > > configure options selected.  If you find out the answer please tell me
> and
> > > I'll do like wise.
> > >
> > > Peter
> > > - Original Message -
> > > From: "Adrian D'Costa" <[EMAIL PROTECTED]>
> > > To: "php general list" <[EMAIL PROTECTED]>
> > > Sent: Thursday, July 19, 2001 7:12 PM
> > > Subject: [PHP] php 4.0.6
> > >
> > >
> > > > Hi,
> > > >
> > > > I am trying to use the socket or readline functions but get a message:
> > > > call to undefined function readline().  Why?  Is this not implemented
> in
> > > > 4.0.6.
> > > >
> > > > Adrian
> > > >
> > > >
> > > > --
> > > > 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: reg exp help

2001-07-23 Thread James Holloway

Hi Justin,

for the username, you can use:

if (!preg_match("/^[a-z0-9]*$/", $username)) {
// error
} else {
// ok
}

The ^ means start of the string, the characters between the [ and ] are ones
that we want, the * means however many times, and the $ means the end of the
line / string.  So if there isn't a match against lower case letters and
numbers throughout the string (from start to finish), there's an error.

I'd advise you to go more complex with the email address.

James.

"Justin French" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi all,
>
> two quick reg exp problems:
>
> one:
> $username must only contain a-z lowercase, 0-9, no spaces, no other
characters.
> what would the regexp be?
>
> if(ereg("", $username)) { $valid = "yes" } else { $valid
> = "no")
>
>
> two:
> i want to do a really small email validation, just to make sure the
> email probably right, as in:
> [EMAIL PROTECTED]
>
> what's the best reg exp to use.
>
>
> i'm aware there are email validating script out there, but I want to
> learn for myself
>
>
>
> many thanks in advance
>
>
> justin french



-- 
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: Replace ANYTHING between

2001-07-23 Thread James Holloway

Hi Dan,

maybe something like:

$newvariablethatwewantbetweenthetags = "Long variable!";

$string = preg_replace("/()(.*?)(<\/TAG>)/i",
\\1$newvariablethatwewantbetweenthetags\\2, $string));

There should be a " after and before the second part of that statement, but
my email proggy strips them.

James

"Dan Krumlauf" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I've been trying this one for a bit and Im in a twist.
>
> I need to replace ANYTHING or even nothing between two tags
> with the contents of a variable and just havent been
> able to get the expression right for all cases.
>
>
> As an example concept follows:
>
> 
>
> Nothing between the tags variable is $varname="some junk"
>
> so after the function
> some junk
>
> run it again after making variable $varname="some completly different
junk"
>
> so now the tags would be
>
> some completly different junk
>
> and so on and so on.
>
> One other breaker Ive had, it needs to always replace no matter whats
> between the tags, whats not between the tags or even if its 1000s of
> characters. My code kept breaking when it was alot of characters.
>
> Any funtions or even just the right regex would be appreciated
>
> Thanks



-- 
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] number generator

2001-07-23 Thread Yamin Prabudy

Hi there
I would like to generate numbers (random) like a credit card number
and can be check is the number valid or not
how can i do that..

yamin prabudy



-- 
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] limit items per page

2001-07-23 Thread Steph

Ive got an image gallery, and rather than having one really long page of thumbnails, 
I'd like to have around 25 thumbnails (5 rows of 5 thumbs) per page. Can you guys 
point me in the right direction??

Steph



[PHP] Re: limit items per page

2001-07-23 Thread James Holloway

Hi Steph,

as the name suggests, use LIMIT ;)

Ie,

SELECT * FROM TABLE LIMIT 0,25

The 0 (or other number) is optional, and tells the table which row to start
limiting from, the secon number is the number of rows to limit to.. So:

SELECT * FROM TABLE LIMIT 25,25

Would bring out 25 rows, starting from row 25 (rows 25 to 50).  See the
documentation at the mysql site for more info.

Cheers,
James.


"Steph" <[EMAIL PROTECTED]> wrote in message
001701c11354$db6b2fa0$ab8d7a3f@vaio">news:001701c11354$db6b2fa0$ab8d7a3f@vaio...
Ive got an image gallery, and rather than having one really long page of
thumbnails, I'd like to have around 25 thumbnails (5 rows of 5 thumbs) per
page. Can you guys point me in the right direction??

Steph




-- 
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] limit items per page

2001-07-23 Thread ReDucTor

What sort of database do you have, and what is your current source?!?
- Original Message -
From: Steph <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 23, 2001 6:52 PM
Subject: [PHP] limit items per page


Ive got an image gallery, and rather than having one really long page of
thumbnails, I'd like to have around 25 thumbnails (5 rows of 5 thumbs) per
page. Can you guys point me in the right direction??

Steph



-- 
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: regex for cleaning up username

2001-07-23 Thread maatt

> thinking it may be easier to parse for only allowed characters.

*much* better idea. Try:

preg_match('/[^\w]/', $string)

to find all non-alphanumeric+underscore



-- 
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] question about forum

2001-07-23 Thread Sandeep Hundal

have a look at other people's codes. you can start by looking at my forum,
which is pretty simple to install and work with
: http://www.wde.org/me/php/

/sunny


-Original Message-
From: Jason Wang [mailto:[EMAIL PROTECTED]]
Sent: 23 July 2001 08:06
To: [EMAIL PROTECTED]
Subject: [PHP] question about forum


Dear all,

I want to set up an online forum by using PHP.
But I don't have a clue.
Could somebody kind enough tell me where to start?

thanks in advance.


-- 
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: limit items per page

2001-07-23 Thread Henrik Hansen

[EMAIL PROTECTED] (James Holloway) wrote:

 > Hi Steph,
 > 
 > as the name suggests, use LIMIT ;)

AFAIK it's mysql specific (at least it does not work with mssql)

-- 
Henrik Hansen

-- 
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] number generat {Luhn algorithm}

2001-07-23 Thread Yamin Prabudy

anybody know about the Luhn algorithm ??
how can i do that in php

yamin


-- 
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: limit items per page

2001-07-23 Thread James Holloway

Perhaps I shouldn't have made the assumption that steph was using mysql :)

"Henrik Hansen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> [EMAIL PROTECTED] (James Holloway) wrote:
>
>  > Hi Steph,
>  >
>  > as the name suggests, use LIMIT ;)
>
> AFAIK it's mysql specific (at least it does not work with mssql)
>
> --
> Henrik Hansen



-- 
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: number generat {Luhn algorithm}

2001-07-23 Thread Henrik Hansen

[EMAIL PROTECTED] (Yamin Prabudy) wrote:

 > anybody know about the Luhn algorithm ??
 > how can i do that in php

google is your friend

http://px.sklar.com/code-pretty.html?code_id=234
http://perl.about.com/library/weekly/aa073000a.htm
http://www.phpbuilder.com/mail/php3-list/199807/2939.php

and many more

-- 
Henrik Hansen

-- 
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] holding values in a select list on a form

2001-07-23 Thread Mark Bayfield

Some help please...

I am creating a select list from a database, and I am trying to hold the
value of what has been selected by a user, while I do some error checking.
It is searching a mysql db to pull out the list. It will then need to pass
values back into the database. The code I am using is this...

";
   print "Select";
   for ($index = 0; $index < mysql_num_rows($query); $index++) {
   $row =  mysql_fetch_row ($query) or die (mysql_error());
   print "$row[1]";
   }
   echo "";
   ?>

If there is an easier way, let me know

Mark



-- 
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] User ID's

2001-07-23 Thread Saquib Farooq

Hi all,
I need store all the userid's connected to my site, in a
database. the database, if the user has closed his browser a php script
will check after intervals of a few minutes, if the user is not logged in,
then changed relating to that user, will be undone.
my quesiotns are ,

1) how do i get a user's ID.
2) what sort of check do i put to see if the variable is destroyed or not.

thanx in advance

-- 
Saquib Farooq
@
Systems @ SDNPK 
Islamabad



-- 
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] MySQL PRIVILEGES problem

2001-07-23 Thread Manu Verhaegen

Dear all,

I have the following problem :
I want change te root password for mysql and we receive the following error message
ERROR 1064: parse error near 'FLUSH PRIVILEGES' at line 1


I login to my MySQL server and type the following commands
shell> mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('new_password') where user='root';
mysql> FLUSH PRIVILEGES;
ERROR 1064: parse error near 'FLUSH PRIVILEGES' at line 1


thanks in advance.






Re: [PHP] PHP & MySQL

2001-07-23 Thread Steve Brett

'order by text asc' will sort in alphabetical order A-Z

.. and your query should be select [campo] from table where campo like 'A%'

... seems like an expensive way of sorting ...

i think mysql has natural order sorting functions in there somewhere ...

Steve

"Marisol díaz e." <[EMAIL PROTECTED]> wrote in message
000e01c1113b$5df255f0$[EMAIL PROTECTED]">news:000e01c1113b$5df255f0$[EMAIL PROTECTED]...
> select [campo] from [tabla] order by [campo]
>
> if you want for each leter
>
> select [campo] from [tabla] where  [campo] like 'A'
>
> Marisol
> - Original Message -
> From: "Erich Kolb" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, July 20, 2001 11:32 AM
> Subject: [PHP] PHP & MySQL
>
>
> > When you query a MySQL Database, how do you set the order
alphabetically?
> >
> > --
> > 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 with html

2001-07-23 Thread Adrian D'Costa

Hi,

I know this subject had been discussed here before.  Tried searching in
list.php.net, I get a message search not setup (or something).

I want to send html mails thru php using mail().  Could someone tell me
where I can study some scripts or tutorials.

TIA

Adrian


-- 
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] mail with html

2001-07-23 Thread Sandeep Hundal

here's a script i wrote a while back.  copied and pasted.


-
http://www.wde.org/me/";);
mail($to, $subject, $message, $headers); 
}

else {
echo "";
$myemail1 = "nothing <[EMAIL PROTECTED]>";

echo " 


from which account :

[EMAIL PROTECTED]






email to :



copy to :



blind copy to :



subject :



email message :



 



";
}
?>
-

that should work as a page in itself let me know if you have
problems

/sunny


-Original Message-
From: Adrian D'Costa [mailto:[EMAIL PROTECTED]]
Sent: 23 July 2001 11:09
To: php general list
Subject: [PHP] mail with html


Hi,

I know this subject had been discussed here before.  Tried searching in
list.php.net, I get a message search not setup (or something).

I want to send html mails thru php using mail().  Could someone tell me
where I can study some scripts or tutorials.

TIA

Adrian


-- 
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: One2Many Logic Problem - phpMySQL bibliography

2001-07-23 Thread Steve Brett

wouldn't the structure of the database be determined by the fact you have a
many to many relationship ?
i.e. the two tables would decompose into three with a 'link' table defining
the many to may part ?

steve

"Mike Gifford" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I'm not sure if anyone else as the need for a php/MySQL based
bibliography, but
> the application that I am developing (which is basically a module for
phpSlash)
> is coming along fairly well.  If anyone is interested in seeing the code I
can
> bundle it up and send it out to them (still a long way from finished
mind).  The
> draft version of it is up and running here:
> http://openconcept.ca/WLP/biblio/index.php3
>
> I'm running into a couple problems though that I don't have the logic
language
> for and I was hoping folks here could help me (as you have done in the
past).
>
> The problem is that I've set up a many to many table to ensure that I can
have
> an author be listed as writing many books and a book be written by many
authors.
>
> However in listing the books as a bibliography (as the URL above), I want
to be
> able to list multiple authors, and do so in a different format for the
first
> author than for all subsequent ones.
>
> I'm hoping to be able to produce output like this:
> Young, D. and N. Dixon. Helping Leaders Take Effective Action: A Program
> Evaluation. Greensboro, North Carolina: Center for Creative Leadership,
> 1996.
>
>
> So, I think the first challenge should be to calculate which books have
multiple
> authors by doing something like this (It's using phplib structures,
sorry):
>
> $q2  = "SELECT * FROM WLPbib2profile ORDER BY bibID";
> $this->db->query($q2);  // Performs above query
> while ($this->db->next_record()) {
> if ($this->db->Record["bibID"] != $last_bibID) {
> echo "" . $this->db->Record["bibID"] . " : " .
$this->db->Record["profileID"];
> } else { // Multiple Authors
> echo ", " .  $this->db->Record["profileID"];
> $multiple_profileID .= array ($this->db->Record["bibID"] =>
> $this->db->Record["profileID"]);
> $multiple_profileID .= array($this->db->Record["bibID"] =>
> "yes");
> }
> $last_bibID = $this->db->Record["bibID"];
> }
> }
>
> With this I can then use the value $multiple_profileID to determine if
this
> record has duplicates or not and use something like this to include both
authors
> and not repeat the bibliography item:
>
> if ($multiple_profileID[$bibID]=="yes") {
> while (list($key, $val) = each($multiple_profileID)) {
> $written_by =  $key . " : " . $val . "";
> if ($this->db->Record["firstName"]) {
> $written_by .= stripslashes($this->db->Record["firstName"]) . " ";
> }
> if($this->db->Record["lastName"]) {
> $written_by .=  stripslashes($this->db->Record["lastName"]);
> }
> }
> } else {
>
> if($this->db->Record["lastName"]) {
> $written_by .=  stripslashes($this->db->Record["lastName"]) . ", ";
> }
> if ($this->db->Record["firstName"]) {
> $written_by .= stripslashes($this->db->Record["firstName"]);
> }
> }
>
> But this seems really awkward (at the best of times) and (worst of all) it
isn't
> working.
>
> I've got another related problem in that I've set up the following fields
in one
> table:
> firstName
> lastName
> organization
>
> and I need to be able to order them by a combination of lastName &
organization.
>   I could list the organization field simply as the lastName, but that
seems
> like it would be confusing the data types...  Must be a way around this..
I
> suspect it is limited by my logic & not PHP's.
>
> Any ideas would be appreciated.
>
> Mike
> --
> Mike Gifford, OpenConcept Consulting, http://openconcept.ca
> Offering everything your organization needs for an effective web site.
> Abolish Nuclear Weapons Now!: http://pgs.ca/petition/
> It is a miracle that curiosity survives formal education. - A Einstein
>



-- 
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] mail with html

2001-07-23 Thread Sandeep Hundal

oh yeah, you might want to tidy up the code a bit... the email has put in
line breaks.

and replace [EMAIL PROTECTED] with your own email... 
the mail() command does all the work...
the header command redirects the page.. you might want to change the address
or remove it.

/sunny

-Original Message-
From: Sandeep Hundal [mailto:[EMAIL PROTECTED]]
Sent: 23 July 2001 11:06
To: 'Adrian D'Costa'; php general list
Subject: RE: [PHP] mail with html


here's a script i wrote a while back.  copied and pasted.


-
http://www.wde.org/me/";);
mail($to, $subject, $message, $headers); 
}

else {
echo "";
$myemail1 = "nothing <[EMAIL PROTECTED]>";

echo " 


from which account :

[EMAIL PROTECTED]






email to :



copy to :



blind copy to :



subject :



email message :



 



";
}
?>
-

that should work as a page in itself let me know if you have
problems

/sunny


-Original Message-
From: Adrian D'Costa [mailto:[EMAIL PROTECTED]]
Sent: 23 July 2001 11:09
To: php general list
Subject: [PHP] mail with html


Hi,

I know this subject had been discussed here before.  Tried searching in
list.php.net, I get a message search not setup (or something).

I want to send html mails thru php using mail().  Could someone tell me
where I can study some scripts or tutorials.

TIA

Adrian


-- 
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] MySQL PRIVILEGES problem

2001-07-23 Thread Balaji Ankem



Hi,
  u have to change the database first and then try to 
update.
 
Plz do the following.
shell> mysql -u root mysql
mysql>use mysql;
mysql> UPDATE user SET Password=PASSWORD('new_password') 
where user='root';mysql> FLUSH PRIVILEGES;
 
Regards
-Balaji    


  - Original Message - 
  From: 
  Manu 
  Verhaegen 
  To: [EMAIL PROTECTED] 
  Sent: Monday, July 23, 2001 3:19 PM
  Subject: [PHP] MySQL PRIVILEGES 
  problem
  Dear all,I have the following problem :I want 
  change te root password for mysql and we receive the following error 
  message    ERROR 1064: parse error near 'FLUSH PRIVILEGES' 
  at line 1I login to my MySQL server and type the following 
  commands    shell> mysql -u root 
  mysql    mysql> UPDATE user SET 
  Password=PASSWORD('new_password') where user='root';    
  mysql> FLUSH PRIVILEGES;    ERROR 1064: parse error near 
  'FLUSH PRIVILEGES' at line 1thanks in 
advance.

The Information contained and transmitted by this E-MAIL is proprietary to 
Wipro Limited and is intended for  use only by the individual or entity to which 
it is addressed, and may contain information that is privileged, confidential or 
exempt from disclosure under applicable law. If this is a forwarded message, 
the content of this E-MAIL may not have been sent with the authority of the 
Company. If you are not the intended recipient, an agent of the intended 
recipient or a  person responsible for delivering the information to the named 
recipient,  you are notified that any use, distribution, transmission, printing, 
copying or dissemination of this information in any way or in any manner is 
strictly prohibited. If you have received this communication in error, please 
delete this mail & notify us immediately at [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] Networking

2001-07-23 Thread ReDucTor

Hey does any one know if it is possible to do something like

read stuff thro file and printer sharing on a remote pc, i tried

\\computer\dir for the dirs but that didn't work any suggestions(btw i did
addslashes :D )

so ne ideas...please


-- 
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: limit items per page

2001-07-23 Thread Martin Cameron

Here's a Quick & Dirty script that I ran up to get a display of 10 items per 
page with each click on a hyper-linked page returning a new page .. if you 
know what I mean. I've even included the headers so that any newbies can see 
the complete script and not just bits. The theory is that the first sql 
statement goes and gets the total number of rows for the display. This is 
then held in a global variable. The second query goes and gets the rows 
limited by an incrementing number. Simple, huh!

";
   }
   $k=0;
   while($i <= $num_rows){
  print " [$k] \n";
  $k++;
  $i+=10;
   }
}
 
switch($action){
 case INITIAL_PAGE:
   initial_page();
   break;
 default:
   die ("Could not find function number $action");
}
?>


On Mon, 23 Jul 2001 21:25, you wrote:
> Perhaps I shouldn't have made the assumption that steph was using mysql :)
>
> "Henrik Hansen" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> > [EMAIL PROTECTED] (James Holloway) wrote:
> >  > Hi Steph,
> >  >
> >  > as the name suggests, use LIMIT ;)
> >
> > AFAIK it's mysql specific (at least it does not work with mssql)
> >
> > --
> > Henrik Hansen

-- 
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] User ID's

2001-07-23 Thread Martin Cameron

Try Sessions, bud. That's what they're there for.

On Mon, 23 Jul 2001 21:46, you wrote:
> Hi all,
>   I need store all the userid's connected to my site, in a
> database. the database, if the user has closed his browser a php script
> will check after intervals of a few minutes, if the user is not logged in,
> then changed relating to that user, will be undone.
> my quesiotns are ,
>
> 1) how do i get a user's ID.
> 2) what sort of check do i put to see if the variable is destroyed or not.
>
> thanx in advance

-- 
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: mail with html

2001-07-23 Thread Henrik Hansen

[EMAIL PROTECTED] (Adrian D'Costa) wrote:

 > Hi,
 > 
 > I know this subject had been discussed here before.  Tried searching in
 > list.php.net, I get a message search not setup (or something).
 > 
 > I want to send html mails thru php using mail().  Could someone tell me
 > where I can study some scripts or tutorials.
 > 

if I were you i would read the manual page for the mail function,
there is examples of sending html mails and not.

http://php.net/manual/en/function.mail.php

-- 
Henrik Hansen

-- 
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] Check for exist function

2001-07-23 Thread ROsen

Hi,
How can I check, thath some function is declared and to do not declare it
second time ( with "require" ) ?

Thanks,
Rosen Marinov




-- 
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] mail with html

2001-07-23 Thread Adrian D'Costa

Hi Sandeep,

Thanks for your mail but I was looking at something else.  This is what I
need.  

I have a table that I will be selecting certian records and mailing to
clients that have signed up.  The result should be in html and plain
text.  The plain text is working now but I want to put into a table format
to look neater, below is a sample in text format.  Any clues?

Destinazione Periodo Vitofferte
London  2001-07-31  Chf 385
Hammamet2001-07-28  Chf 999

Adrian


On Mon, 23 Jul 2001, Sandeep Hundal wrote:

> oh yeah, you might want to tidy up the code a bit... the email has put in
> line breaks.
> 
> and replace [EMAIL PROTECTED] with your own email... 
> the mail() command does all the work...
> the header command redirects the page.. you might want to change the address
> or remove it.
> 
> /sunny
> 
> -Original Message-
> From: Sandeep Hundal [mailto:[EMAIL PROTECTED]]
> Sent: 23 July 2001 11:06
> To: 'Adrian D'Costa'; php general list
> Subject: RE: [PHP] mail with html
> 
> 
> here's a script i wrote a while back.  copied and pasted.
> 
> 
> -
>  if ($submit) {
>   $headers .= "From: $myemail \n";
>   $headers .= "cc:$cc \n"; 
>   $headers .= "bcc:$bcc \n";
>   // $headers .= "Content-Type: text/html; charset=iso-8859-1\n";
> 
>   $message = stripslashes($contents);
>   header("Location:http://www.wde.org/me/";);
>   mail($to, $subject, $message, $headers); 
> }
> 
> else {
> echo "";
> $myemail1 = "nothing <[EMAIL PROTECTED]>";
> 
>   echo " 
>bgcolor=#ff>
>   
>class=black>from which account :
>   
>value=\"$myemail1\">[EMAIL PROTECTED]
>   
>   
>   
>   
> 
>   
>class=black>email to :
>name=\"to\">
>   
>   
>class=black>copy to :
>name=\"cc\">
>   
>   
>class=black>blind copy to :
>name=\"bcc\">
>   
>   
>class=black>subject :
>name=\"subject\">
>   
>   
>class=black>email message :
>name=\"contents\" wrap=physical>
>   
>   
>    
>type=submit name=submit value=\"send this email\">
>   
>   
>   ";
> }
> ?>
> -
> 
> that should work as a page in itself let me know if you have
> problems
> 
> /sunny
> 
> 
> -Original Message-
> From: Adrian D'Costa [mailto:[EMAIL PROTECTED]]
> Sent: 23 July 2001 11:09
> To: php general list
> Subject: [PHP] mail with html
> 
> 
> Hi,
> 
> I know this subject had been discussed here before.  Tried searching in
> list.php.net, I get a message search not setup (or something).
> 
> I want to send html mails thru php using mail().  Could someone tell me
> where I can study some scripts or tutorials.
> 
> TIA
> 
> Adrian
> 
> 
> 


-- 
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] Check for exist function

2001-07-23 Thread Adrian Ciutureanu

http://php.net/require_once

> -Original Message-
> From: ROsen [mailto:[EMAIL PROTECTED]]
> Sent: 23 iulie 2001 14:17
> To: [EMAIL PROTECTED]
> Subject: [PHP] Check for exist function
> 
> 
> Hi,
> How can I check, thath some function is declared and to do 
> not declare it
> second time ( with "require" ) ?
> 
> Thanks,
> Rosen Marinov
> 
> 
> 
> 
> -- 
> 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: holding values in a select list on a form

2001-07-23 Thread Mark Bayfield

I worked it out by doing something like this...

";
$toplist = mysql_query("select * from wr_country where
wr_country_enabled = 1 ");
echo "Select\n";
while(list($topicid, $topics) = mysql_fetch_row($toplist)) {
if ($topicid==$topic) {
 $sel = "selected ";
 }
 echo "$topics\n";
 $sel = "";
}
?>


"Mark Bayfield" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Some help please...
>
> I am creating a select list from a database, and I am trying to hold the
> value of what has been selected by a user, while I do some error checking.
> It is searching a mysql db to pull out the list. It will then need to pass
> values back into the database. The code I am using is this...
>
> ";
>print "Select";
>for ($index = 0; $index < mysql_num_rows($query); $index++) {
>$row =  mysql_fetch_row ($query) or die (mysql_error());
>print "$row[1]";
>}
>echo "";
>?>
>
> If there is an easier way, let me know
>
> Mark
>
>



-- 
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: Check for exist function

2001-07-23 Thread Henrik Hansen

[EMAIL PROTECTED] (Rosen) wrote:

 > Hi,
 > How can I check, thath some function is declared and to do not declare it
 > second time ( with "require" ) ?

http://dk.php.net/manual/en/function.function-exists.php

-- 
Henrik Hansen

-- 
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] mail with html

2001-07-23 Thread Sandeep Hundal

well all you need to do is use part of the script i sent you.. and in the
header variable, uncomment the bit which says "text/html" and then you can
send html email instead of text email...

i'm assuming you've already written the script to sent plain text email. i
thought you needed that.

/sunny

-Original Message-
From: Adrian D'Costa [mailto:[EMAIL PROTECTED]]
Sent: 23 July 2001 12:26
To: Sandeep Hundal
Cc: php general list
Subject: RE: [PHP] mail with html


Hi Sandeep,

Thanks for your mail but I was looking at something else.  This is what I
need.  

I have a table that I will be selecting certian records and mailing to
clients that have signed up.  The result should be in html and plain
text.  The plain text is working now but I want to put into a table format
to look neater, below is a sample in text format.  Any clues?

Destinazione Periodo Vitofferte
London  2001-07-31  Chf 385
Hammamet2001-07-28  Chf 999

Adrian


On Mon, 23 Jul 2001, Sandeep Hundal wrote:

> oh yeah, you might want to tidy up the code a bit... the email has put in
> line breaks.
> 
> and replace [EMAIL PROTECTED] with your own email... 
> the mail() command does all the work...
> the header command redirects the page.. you might want to change the
address
> or remove it.
> 
> /sunny
> 
> -Original Message-
> From: Sandeep Hundal [mailto:[EMAIL PROTECTED]]
> Sent: 23 July 2001 11:06
> To: 'Adrian D'Costa'; php general list
> Subject: RE: [PHP] mail with html
> 
> 
> here's a script i wrote a while back.  copied and pasted.
> 
> 
> -
>  if ($submit) {
>   $headers .= "From: $myemail \n";
>   $headers .= "cc:$cc \n"; 
>   $headers .= "bcc:$bcc \n";
>   // $headers .= "Content-Type: text/html; charset=iso-8859-1\n";
> 
>   $message = stripslashes($contents);
>   header("Location:http://www.wde.org/me/";);
>   mail($to, $subject, $message, $headers); 
> }
> 
> else {
> echo "";
> $myemail1 = "nothing <[EMAIL PROTECTED]>";
> 
>   echo " 
>bgcolor=#ff>
>   
>class=black>from which account :
>   
>value=\"$myemail1\">[EMAIL PROTECTED]
>   
>   
>   
>   
> 
>   
>class=black>email to :
>name=\"to\">
>   
>   
>class=black>copy to :
>name=\"cc\">
>   
>   
>class=black>blind copy to :
>name=\"bcc\">
>   
>   
>class=black>subject :
>name=\"subject\">
>   
>   
>class=black>email message :
>name=\"contents\" wrap=physical>
>   
>   
>    
>type=submit name=submit value=\"send this email\">
>   
>   
>   ";
> }
> ?>
> -
> 
> that should work as a page in itself let me know if you have
> problems
> 
> /sunny
> 
> 
> -Original Message-
> From: Adrian D'Costa [mailto:[EMAIL PROTECTED]]
> Sent: 23 July 2001 11:09
> To: php general list
> Subject: [PHP] mail with html
> 
> 
> Hi,
> 
> I know this subject had been discussed here before.  Tried searching in
> list.php.net, I get a message search not setup (or something).
> 
> I want to send html mails thru php using mail().  Could someone tell me
> where I can study some scripts or tutorials.
> 
> TIA
> 
> Adrian
> 
> 
> 

-- 
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] mail with html

2001-07-23 Thread Adrian D'Costa

The question is how do I declare the html coding in the message part.  Any
samples

Adrian

On Mon, 23 Jul 2001, Sandeep Hundal wrote:

> well all you need to do is use part of the script i sent you.. and in the
> header variable, uncomment the bit which says "text/html" and then you can
> send html email instead of text email...
> 
> i'm assuming you've already written the script to sent plain text email. i
> thought you needed that.
> 
> /sunny
> 
> -Original Message-
> From: Adrian D'Costa [mailto:[EMAIL PROTECTED]]
> Sent: 23 July 2001 12:26
> To: Sandeep Hundal
> Cc: php general list
> Subject: RE: [PHP] mail with html
> 
> 
> Hi Sandeep,
> 
> Thanks for your mail but I was looking at something else.  This is what I
> need.  
> 
> I have a table that I will be selecting certian records and mailing to
> clients that have signed up.  The result should be in html and plain
> text.  The plain text is working now but I want to put into a table format
> to look neater, below is a sample in text format.  Any clues?
> 
> Destinazione Periodo Vitofferte
> London  2001-07-31  Chf 385
> Hammamet2001-07-28  Chf 999
> 
> Adrian
> 
> 
> On Mon, 23 Jul 2001, Sandeep Hundal wrote:
> 
> > oh yeah, you might want to tidy up the code a bit... the email has put in
> > line breaks.
> > 
> > and replace [EMAIL PROTECTED] with your own email... 
> > the mail() command does all the work...
> > the header command redirects the page.. you might want to change the
> address
> > or remove it.
> > 
> > /sunny
> > 
> > -Original Message-
> > From: Sandeep Hundal [mailto:[EMAIL PROTECTED]]
> > Sent: 23 July 2001 11:06
> > To: 'Adrian D'Costa'; php general list
> > Subject: RE: [PHP] mail with html
> > 
> > 
> > here's a script i wrote a while back.  copied and pasted.
> > 
> > 
> > -
> >  > if ($submit) {
> > $headers .= "From: $myemail \n";
> > $headers .= "cc:$cc \n"; 
> > $headers .= "bcc:$bcc \n";
> > // $headers .= "Content-Type: text/html; charset=iso-8859-1\n";
> > 
> > $message = stripslashes($contents);
> > header("Location:http://www.wde.org/me/";);
> > mail($to, $subject, $message, $headers); 
> > }
> > 
> > else {
> > echo "";
> > $myemail1 = "nothing <[EMAIL PROTECTED]>";
> > 
> > echo " 
> >  > bgcolor=#ff>
> > 
> >  > class=black>from which account :
> > 
> >  > value=\"$myemail1\">[EMAIL PROTECTED]
> > 
> > 
> > 
> > 
> > 
> > 
> >  > class=black>email to :
> >  > name=\"to\">
> > 
> > 
> >  > class=black>copy to :
> >  > name=\"cc\">
> > 
> > 
> >  > class=black>blind copy to :
> >  > name=\"bcc\">
> > 
> > 
> >  > class=black>subject :
> >  > name=\"subject\">
> > 
> > 
> >  > class=black>email message :
> >  > name=\"contents\" wrap=physical>
> > 
> > 
> >  
> >  > type=submit name=submit value=\"send this email\">
> > 
> > 
> > ";
> > }
> > ?>
> > -
> > 
> > that should work as a page in itself let me know if you have
> > problems
> > 
> > /sunny
> > 
> > 
> > -Original Message-
> > From: Adrian D'Costa [mailto:[EMAIL PROTECTED]]
> > Sent: 23 July 2001 11:09
> > To: php general list
> > Subject: [PHP] mail with html
> > 
> > 
> > Hi,
> > 
> > I know this subject had been discussed here before.  Tried searching in
> > list.php.net, I get a message search not setup (or something).
> > 
> > I want to send html mails thru php using mail().  Could someone tell me
> > where I can study some scripts or tutorials.
> > 
> > TIA
> > 
> > Adrian
> > 
> > 
> > 
> 


-- 
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] mail with html

2001-07-23 Thread Sandeep Hundal

you don't. as far as I know, you just put the code in the message like such
:

$message = "


$nameareacode


";

and then send off $message using mail(). You might want to stripslashes() as
I did.

/sunny

-Original Message-
From: Adrian D'Costa [mailto:[EMAIL PROTECTED]]
Sent: 23 July 2001 13:04
To: Sandeep Hundal
Cc: php general list
Subject: RE: [PHP] mail with html


The question is how do I declare the html coding in the message part.  Any
samples

Adrian

On Mon, 23 Jul 2001, Sandeep Hundal wrote:

> well all you need to do is use part of the script i sent you.. and in the
> header variable, uncomment the bit which says "text/html" and then you can
> send html email instead of text email...
> 
> i'm assuming you've already written the script to sent plain text email. i
> thought you needed that.
> 
> /sunny
> 
> -Original Message-
> From: Adrian D'Costa [mailto:[EMAIL PROTECTED]]
> Sent: 23 July 2001 12:26
> To: Sandeep Hundal
> Cc: php general list
> Subject: RE: [PHP] mail with html
> 
> 
> Hi Sandeep,
> 
> Thanks for your mail but I was looking at something else.  This is what I
> need.  
> 
> I have a table that I will be selecting certian records and mailing to
> clients that have signed up.  The result should be in html and plain
> text.  The plain text is working now but I want to put into a table format
> to look neater, below is a sample in text format.  Any clues?
> 
> Destinazione Periodo Vitofferte
> London  2001-07-31  Chf 385
> Hammamet2001-07-28  Chf 999
> 
> Adrian
> 
> 
> On Mon, 23 Jul 2001, Sandeep Hundal wrote:
> 
> > oh yeah, you might want to tidy up the code a bit... the email has put
in
> > line breaks.
> > 
> > and replace [EMAIL PROTECTED] with your own email... 
> > the mail() command does all the work...
> > the header command redirects the page.. you might want to change the
> address
> > or remove it.
> > 
> > /sunny
> > 
> > -Original Message-
> > From: Sandeep Hundal [mailto:[EMAIL PROTECTED]]
> > Sent: 23 July 2001 11:06
> > To: 'Adrian D'Costa'; php general list
> > Subject: RE: [PHP] mail with html
> > 
> > 
> > here's a script i wrote a while back.  copied and pasted.
> > 
> > 
> > -
> >  > if ($submit) {
> > $headers .= "From: $myemail \n";
> > $headers .= "cc:$cc \n"; 
> > $headers .= "bcc:$bcc \n";
> > // $headers .= "Content-Type: text/html; charset=iso-8859-1\n";
> > 
> > $message = stripslashes($contents);
> > header("Location:http://www.wde.org/me/";);
> > mail($to, $subject, $message, $headers); 
> > }
> > 
> > else {
> > echo "";
> > $myemail1 = "nothing <[EMAIL PROTECTED]>";
> > 
> > echo " 
> >  > bgcolor=#ff>
> > 
> >  > class=black>from which account :
> > 
> >  > value=\"$myemail1\">[EMAIL PROTECTED]
> > 
> > 
> > 
> > 
> > 
> > 
> >  > class=black>email to :
> >  > name=\"to\">
> > 
> > 
> >  > class=black>copy to :
> >  > name=\"cc\">
> > 
> > 
> >  > class=black>blind copy to :
> >  > name=\"bcc\">
> > 
> > 
> >  > class=black>subject :
> >  > name=\"subject\">
> > 
> > 
> >  > class=black>email message :
> >  > name=\"contents\" wrap=physical>
> > 
> > 
> >  
> >  > type=submit name=submit value=\"send this email\">
> > 
> > 
> > ";
> > }
> > ?>
> > -
> > 
> > that should work as a page in itself let me know if you have
> > problems
> > 
> > /sunny
> > 
> > 
> > -Original Message-
> > From: Adrian D'Costa [mailto:[EMAIL PROTECTED]]
> > Sent: 23 July 2001 11:09
> > To: php general list
> > Subject: [PHP] mail with html
> > 
> > 
> > Hi,
> > 
> > I know this subject had been discussed here before.  Tried searching in
> > list.php.net, I get a message search not setup (or something).
> > 
> > I want to send html mails thru

[PHP] RE: holding values in a select list on a form

2001-07-23 Thread Tim Ward

";
print "Select";
if($result = mysql_db_query($db, $query))
while($row = mysql_fetch_row($result))
print "{$row[1]}";
echo "";
?>

although personally I use mysql_fetch_array() so I can use the field name to
get the appropriate field rather than getting the second field returned from
the query (as you are doing).

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: Mark Bayfield [mailto:[EMAIL PROTECTED]]
> Sent: 23 July 2001 10:34
> To: [EMAIL PROTECTED]
> Subject: holding values in a select list on a form
> 
> 
> Some help please...
> 
> I am creating a select list from a database, and I am trying 
> to hold the
> value of what has been selected by a user, while I do some 
> error checking.
> It is searching a mysql db to pull out the list. It will then 
> need to pass
> values back into the database. The code I am using is this...
> 
> ";
>print "Select";
>for ($index = 0; $index < mysql_num_rows($query); $index++) {
>$row =  mysql_fetch_row ($query) or die (mysql_error());
>print "$row[1]";
>}
>echo "";
>?>
> 
> If there is an easier way, let me know
> 
> Mark
> 
> 
> 

-- 
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] mail with html

2001-07-23 Thread Jome

Here is an example that I use myself for sending HTML code via email.

 127 || ord($char) == "61")
$result .= sprintf("=%X", ord($char));
 else
$result .= $char;
   }
 return $result;
}
$content = "";
$content = qp_encode($content);

mail("email","subject",$content,"From: someone@someone\nMime-Version: 
1.0\nContent-Type: text/html; charset=\"iso-8859-1\"\nContent-Transfer-Encoding: 
quoted-printable\n");
?>

This encodes the content so email readers like Microsoft Outlook can read the mail.

Best regards,

Jome

- Original Message - 
From: "Adrian D'Costa" <[EMAIL PROTECTED]>
To: "php general list" <[EMAIL PROTECTED]>
Sent: Monday, July 23, 2001 12:08 PM
Subject: [PHP] mail with html


> Hi,
> 
> I know this subject had been discussed here before.  Tried searching in
> list.php.net, I get a message search not setup (or something).
> 
> I want to send html mails thru php using mail().  Could someone tell me
> where I can study some scripts or tutorials.
> 
> TIA
> 
> Adrian
> 
> 
> -- 
> 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] New User - Problem with php and pop3-class...

2001-07-23 Thread Stephan Hübner

Hi all,

I'm new to this ML as well as to php, so I have a problem that someone might
have a solution for.

What I have to do is to get mails from a mail-account and get them into a
flash-movie. The latter thing is not the problem, probably.

I downloaded the pop3-class from Manuel Lemos.

What I have problems with is the use of this pop3-class. I just uploaded
them to the server.
I thought there should come up an error-message, saying something like
"can't find the mail-account" or something like that. But what I got when I
run the script is an output like this:

->hostname="localhost";
 if(($error=$pop3_connection->Open())=="") {
Connected to the POP3 server $pop3_connection->hostname

  if(($error=$pop3_connection->Login($user,$password,$apop))=="") {

...

and so on. So what happens is that part of the php-code written in the
html-site is written to the screen.
It seems that the server is interpreting the php-script, though, as the
echo-commands are executed right. But the first line (starting with "->"
should be written to the screen, right?
Does anyone know what the problem could be? Thanks for any help on this
problem.


Greetings,

Stephan Hübner


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

2001-07-23 Thread Daniel Rezny

Hello Christian,

Monday, July 23, 2001, 3:39:14 PM, you wrote:

CSP> This might sound a little strange but I'd like to query a Filmeker
CSP> database using
CSP> Php. I read in the Filemaker manual that ODBC drivers let us be able to
CSP> query the
CSP> database using basic SQL calls. Meanwhile, I tried to perform the task
CSP> but it
CSP> seems quite complicated to acheive... As anyone done this before ? If
CSP> so, some
CSP> tips would be appreciated.

CSP> Thanks a lot,

CSP> Christ.

Cooperation of filemaker and php together is very hard.
First of all I'd like to write that filemaker is not sql server.
I've done it before but only for a short time. With filemaker I'm
prefering lasso.

I've used MyODBC driver.

-- 
Best regards,
 Danielmailto:[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] Unlink Woes

2001-07-23 Thread Sheridan Saint-Michel

Ok that didn't give any output... and I checked in phpinfo() and found
safe_mode off.

Any other ideas?

Sheridan

- Original Message - 
From: Jack Dempsey <[EMAIL PROTECTED]>
To: 'Sheridan Saint-Michel' <[EMAIL PROTECTED]>
Sent: Friday, July 20, 2001 12:12 PM
Subject: RE: [PHP] Unlink Woes


>  if(get_cfg_var('safe_mode')){
> echo "running in safe mode";
> }
> ?>
> 
> -Original Message-
> From: Sheridan Saint-Michel [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, July 20, 2001 1:04 PM
> To: [EMAIL PROTECTED]
> Cc: php-general
> Subject: Re: [PHP] Unlink Woes
> 
> How can I find out if my server is in Safe mode?  Do I have to call my
> Host
> and ask them?
> 
> Sheridan
> 
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: Sheridan Saint-Michel <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Friday, July 20, 2001 11:25 AM
> Subject: Re: [PHP] Unlink Woes
> 
> 
> > on 7/20/01 11:48 AM, Sheridan Saint-Michel at [EMAIL PROTECTED]
> wrote:
> >
> > > Warning: Unlink failed (Permission denied) in
> > > /home/www/foxjet/employees/admin.php on line 108
> > >
> > > Here's the code
> > >
> > > if($submit == "Delete")
> > > {
> > > for ($j = 0; $j < $numfiles; $j++)
> > > {
> > > $checkname = $files[$j];
> > > if (${$checkname} = "on")
> > > {
> > > $temp = $pwd . $files[$j];
> > > unlink($temp);
> > > }
> > > }
> > > }
> >
> >
> >
> > I had this error to from unlink, it may be because your server is in
> "safe
> > mode"
> >
> > Susan
> 
> 
> 
> 
> 
> 
> -- 
> 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] Speeding up MySQL querys

2001-07-23 Thread Jome

Hello,

for the moment I'm trying to write searchengine kind-of-thing in PHP using MySQL, 
however MySQL tend to be very slow when searching.

My table is about 100 mb and the query is SELECT * FROM search WHERE search.content 
LIKE '%$keyword%' OR search.filnamn LIKE '%$keyword%'

I've tried setting INDEX but it didn't work out since I'm using BLOB-fields. Is there 
any other way than using INDEX?

Thanks,

Jome


--
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] Speeding up MySQL querys

2001-07-23 Thread Miles Thompson


The key to speed with SQL databases is INDEX. You are doing sequential 
reads of the contents of each of these fields; no matter what database you 
used performance would be atrocious.

Can you break some keywords out of your text, and assign them to fields 
like keywd1, keywd2, etc.?

How often does the data change? Could you periodically parse the contents 
of those target fields and create a lookup table, with an exclusion list so 
that you don't index "the", "a" and the like, with pointers from the lookup 
table to the primary key of search?

Semi-finally, this may not be a good scenario for a database. What about 
storing these files as text and using something like htdig to index them 
and return search results.

Finally (you can thell this isn't any logical order), doesn't one of the 
beta versions of MySQL support text indexing?

Anyway - some thought starters. But you will NEVER get good performance 
with sequential reads.

HTH - Miles Thompson

At 03:56 PM 7/23/01 +0200, Jome wrote:
>Hello,
>
>for the moment I'm trying to write searchengine kind-of-thing in PHP using 
>MySQL, however MySQL tend to be very slow when searching.
>
>My table is about 100 mb and the query is SELECT * FROM search WHERE 
>search.content LIKE '%$keyword%' OR search.filnamn LIKE '%$keyword%'
>
>I've tried setting INDEX but it didn't work out since I'm using 
>BLOB-fields. Is there any other way than using INDEX?
>
>Thanks,
>
>Jome
>
>
>--
>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] ignore message - test

2001-07-23 Thread Adi Ciutureanu

testing list



-- 
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] mail with html

2001-07-23 Thread Sheridan Saint-Michel

You just need to have the proper MIME information deopending on what exactly
you are trying to do.
Also, the HTML must be in Quoted Printable Format.  If you have PHP
configured with imap you can
just run your message through the imap_8bit function (or so I am told... I
didn't have that luxury =P ).

If not you just need to read the MIME specifications for quoted printable
and follow all the rules.  The
rules for quoted printable can be found in section 5.1 of this document
http://www.faqs.org/rfcs/rfc1521.html

or section 6.7 of this document
http://www.faqs.org/rfcs/rfc2045.html

The other piece of advice I have to offer (having just finished a fairly
large mail program myself)
is to send yourself html messages in whatever mail reader you use and then
telnet to your mail
server and look at them there.  That should at least give you an idea of
what your message should look like.

Sheridan

- Original Message -
From: Adrian D'Costa <[EMAIL PROTECTED]>
To: Sandeep Hundal <[EMAIL PROTECTED]>
Cc: php general list <[EMAIL PROTECTED]>
Sent: Monday, July 23, 2001 7:03 AM
Subject: RE: [PHP] mail with html


> The question is how do I declare the html coding in the message part.  Any
> samples
>
> Adrian
>
> On Mon, 23 Jul 2001, Sandeep Hundal wrote:
>
> > well all you need to do is use part of the script i sent you.. and in
the
> > header variable, uncomment the bit which says "text/html" and then you
can
> > send html email instead of text email...
> >
> > i'm assuming you've already written the script to sent plain text email.
i
> > thought you needed that.
> >
> > /sunny
> >
> > -Original Message-
> > From: Adrian D'Costa [mailto:[EMAIL PROTECTED]]
> > Sent: 23 July 2001 12:26
> > To: Sandeep Hundal
> > Cc: php general list
> > Subject: RE: [PHP] mail with html
> >
> >
> > Hi Sandeep,
> >
> > Thanks for your mail but I was looking at something else.  This is what
I
> > need.
> >
> > I have a table that I will be selecting certian records and mailing to
> > clients that have signed up.  The result should be in html and plain
> > text.  The plain text is working now but I want to put into a table
format
> > to look neater, below is a sample in text format.  Any clues?
> >
> > Destinazione Periodo Vitofferte
> > London  2001-07-31  Chf 385
> > Hammamet2001-07-28  Chf 999
> >
> > Adrian
> >
> >
> > On Mon, 23 Jul 2001, Sandeep Hundal wrote:
> >
> > > oh yeah, you might want to tidy up the code a bit... the email has put
in
> > > line breaks.
> > >
> > > and replace [EMAIL PROTECTED] with your own email...
> > > the mail() command does all the work...
> > > the header command redirects the page.. you might want to change the
> > address
> > > or remove it.
> > >
> > > /sunny
> > >
> > > -Original Message-
> > > From: Sandeep Hundal [mailto:[EMAIL PROTECTED]]
> > > Sent: 23 July 2001 11:06
> > > To: 'Adrian D'Costa'; php general list
> > > Subject: RE: [PHP] mail with html
> > >
> > >
> > > here's a script i wrote a while back.  copied and pasted.
> > >
> > >
> > > -
> > >  > > if ($submit) {
> > > $headers .= "From: $myemail \n";
> > > $headers .= "cc:$cc \n";
> > > $headers .= "bcc:$bcc \n";
> > > // $headers .= "Content-Type: text/html; charset=iso-8859-1\n";
> > >
> > > $message = stripslashes($contents);
> > > header("Location:http://www.wde.org/me/";);
> > > mail($to, $subject, $message, $headers);
> > > }
> > >
> > > else {
> > > echo "";
> > > $myemail1 = "nothing <[EMAIL PROTECTED]>";
> > >
> > > echo " 
> > >  > > bgcolor=#ff>
> > > 
> > >  > > class=black>from which account :
> > > 
> > >  > > value=\"$myemail1\">[EMAIL PROTECTED]
> > > 
> > > 
> > >
> > > 
> > >
> > > 
> > >  > > class=black>email to :
> > >  > > name=\"to\">
> > > 
> > > 
> > >  > > class=black>copy to :
> > >  > > name=\"cc\">
> > > 
> > > 
> > >  > > class=black>blind copy to :
> > >  > > name=\"bcc\">
> > > 
> > > 
> > >  > > class=black>subject :
> > >  > > name=\"subject\">
> > > 
> > > 
> > >  > > class=black>email message :
> > >  > > name=\"contents\" wrap=physical>
> > > 
> > > 
> > >  
> > >  > > type=submit name=submit value=\"send this email\">
> > > 
> > > 
> > > ";
> > > }
> > > ?>
> > > -
> > >
> > > that should work as a page in itself let me know if you have
> > > problems
> > >
> > > /sunny
> > >
> > >
> > > -Original Message-
> > > From: Adrian D'Costa [mailto:[EMAIL PROTECTED]]
> > > Sent: 23 July 2001 11:09
> > > To: php general list
> > > Subject: [PHP] mail with html
> > >
> > >
> > > Hi,
> > >
> > > I know this subject had been discussed here before.  Tried searching
in
> > > list.php.net, I get a message search not setup (or something).
> > >
> > > I want to send html mails thru php using mail().  Could someone tell
me
> > > where I can study some scripts or tutorials.
> > >
> > > TIA
> > >
> > > Adrian
> > >
> > >
> > >
> >
>

RE: [PHP] date HELP !!!!!

2001-07-23 Thread Andrew Braund

I thought this might do it...

if( date("d") == date("d",mktime (0,0,0,date("n"),0,0)) ){
echo "last day";
}

But it doesn't seem to handle February in non leap years;

8<==
$testMktimeArray = array(
  "7/23/2001",
  "1/1/2001",
  "12/31/2001",
  "2/28/1999", "2/29/1999",
  "2/28/1999", "2/29/1999",
  "2/28/2000", "2/29/2000",
  "2/28/2001", "2/29/2001",
  "2/28/2002", "2/29/2002",
  "2/28/2003", "2/29/2003",
  "2/28/2004", "2/29/2004",
  "2/28/2005", "2/29/2005",
);
foreach( $testMktimeArray as $testDate){
  list($m,$d,$y) = explode("/", $testDate);
  $testTime = mktime (0,0,0,$m,$d,$y);
  echo "test date \"$testDate\" is ".date("d M Y",$testTime);
  echo " month is ".date("n",$testTime);
  echo " End of month is ".date("d",mktime
(0,0,0,date("n",$testTime)+1,0,0))."";
  if( date("d",$testTime) == date("d",mktime
(0,0,0,date("n",$testTime)+1,0,0)) ){
  echo "last day";
  }
}
echo "";
8<==

Output;
8<==
test date "7/23/2001" is 23 Jul 2001 month is 7 End of month is 31
test date "1/1/2001" is 01 Jan 2001 month is 1 End of month is 31
test date "12/31/2001" is 31 Dec 2001 month is 12 End of month is 31
last day
test date "2/28/1999" is 28 Feb 1999 month is 2 End of month is 29
test date "2/29/1999" is 01 Mar 1999 month is 3 End of month is 31
test date "2/28/1999" is 28 Feb 1999 month is 2 End of month is 29
test date "2/29/1999" is 01 Mar 1999 month is 3 End of month is 31
test date "2/28/2000" is 28 Feb 2000 month is 2 End of month is 29
test date "2/29/2000" is 29 Feb 2000 month is 2 End of month is 29
last day
test date "2/28/2001" is 28 Feb 2001 month is 2 End of month is 29
test date "2/29/2001" is 01 Mar 2001 month is 3 End of month is 31
test date "2/28/2002" is 28 Feb 2002 month is 2 End of month is 29
test date "2/29/2002" is 01 Mar 2002 month is 3 End of month is 31
test date "2/28/2003" is 28 Feb 2003 month is 2 End of month is 29
test date "2/29/2003" is 01 Mar 2003 month is 3 End of month is 31
test date "2/28/2004" is 28 Feb 2004 month is 2 End of month is 29
test date "2/29/2004" is 29 Feb 2004 month is 2 End of month is 29
last day
test date "2/28/2005" is 28 Feb 2005 month is 2 End of month is 29
test date "2/29/2005" is 01 Mar 2005 month is 3 End of month is 31

8<==

> -Original Message-
> From: Henrik Hansen [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 23 July 2001 17:22
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] date HELP !
>
>
> [EMAIL PROTECTED] (Reductor) wrote:
>
>  > $todaydate = date("m");
>  > $tomorrowdate = date("m",time() + 86400);
>  > if($todaydate != $tomorrowdate){
>  >echo "Tomorrow is a new month";
> >}
>
> or
>
> if (date("d") == date("j"))
> echo "last day";
>
> or something else :)
>
>
>  > - Original Message -
>  > From: Yamin Prabudy <[EMAIL PROTECTED]>
>  > To: <[EMAIL PROTECTED]>
>  > Sent: Monday, July 23, 2001 5:27 PM
>  > Subject: [PHP] date HELP !
>  >
> >> hi,
> >> how do i check that the current date is the end of month
> >>
> >> Thanks in Advance


-- 
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] session on win32

2001-07-23 Thread Dieter Stolpmann

Hi,

I can't get session_register() to work on a win2k system with
IIS4.
After creating the session 'session_start()' and registering
a variable 'session_register("counter")' which is set a
a non zero value, the only thing, the session data file
contains is:
!counter|

The value never gets stored! On a LINUX system
the very same script behaves like expected.

By the way, I tryed the script with php 4.0.4pl1 and
4.0.6

Is there anything wrong with sessions on win32?

Dieter



-- 
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] Send variables from php to dll and back.

2001-07-23 Thread Ryan Marrs

I'm trying to call a VB DLL to run validation checks on user input.  I know
nothing of VB, or even how to call a DLL for something like this, so I'm
going to need to be shown like a newbie.  I've already read over Luiz
Fernando's request and responses, and they didn't seem to help me.  

For example, I need to send:

$string="Hello World";
$string2="This/Would/Fail">
$string3="Test 3";
$string4="Test%5";


[PHP] templates

2001-07-23 Thread Kurth Bemis

i've been looking for a template site that i used and never bookmarked.

I'll tell you what i remember about the site and hopefully someone will 
know what site i'm talking about.  I've spend the last 5 hours looking for 
this siteso this is my final stab in the dark.

The site had 4 categories of templates.  one was business templates and the 
other was user templates.

most of the designs were linkware.

and most of the templates were in plain html.

the site had a lot of templates...150+?

does anybody remember a free template site like that?  I'm pulling my hair 
out because ti was a good template site...not one of those cheezy one 
design 50 different color template sites.

~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] templates

2001-07-23 Thread Jack Sasportas

Your web browser should have a history option, and you can sift through the
list of domains you surfed that approximate time frame ago...Also you can
search in some applications like  netscape the history file, and look for key
things like templates...

Good Luck



Kurth Bemis wrote:

> i've been looking for a template site that i used and never bookmarked.
>
> I'll tell you what i remember about the site and hopefully someone will
> know what site i'm talking about.  I've spend the last 5 hours looking for
> this siteso this is my final stab in the dark.
>
> The site had 4 categories of templates.  one was business templates and the
> other was user templates.
>
> most of the designs were linkware.
>
> and most of the templates were in plain html.
>
> the site had a lot of templates...150+?
>
> does anybody remember a free template site like that?  I'm pulling my hair
> out because ti was a good template site...not one of those cheezy one
> design 50 different color template sites.
>
> ~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]

--
___
Jack Sasportas
Innovative Internet Solutions
Phone 305.665.2500
Fax 305.665.2551
www.innovativeinternet.com
www.web56.net



-- 
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] Another how do i question

2001-07-23 Thread Kyle Smith

I made this code for a simple for (the end of it) but what do i change in the $message 
variable so there is a new line between each other variable in $message (ive tried 
$name. . $last_name and.  happens)





-legokiller666-
http://www.StupeedStudios.f2s.com
New address new site

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666





Re: [PHP] templates

2001-07-23 Thread Kurth Bemis

At 11:29 AM 7/23/2001, Jack Sasportas wrote:

I last visited this site about 2 months ago...too long for any history :-(

>Your web browser should have a history option, and you can sift through the
>list of domains you surfed that approximate time frame ago...Also you can
>search in some applications like  netscape the history file, and look for key
>things like templates...
>
>Good Luck
>
>
>
>Kurth Bemis wrote:
>
> > i've been looking for a template site that i used and never bookmarked.
> >
> > I'll tell you what i remember about the site and hopefully someone will
> > know what site i'm talking about.  I've spend the last 5 hours looking for
> > this siteso this is my final stab in the dark.
> >
> > The site had 4 categories of templates.  one was business templates and the
> > other was user templates.
> >
> > most of the designs were linkware.
> >
> > and most of the templates were in plain html.
> >
> > the site had a lot of templates...150+?
> >
> > does anybody remember a free template site like that?  I'm pulling my hair
> > out because ti was a good template site...not one of those cheezy one
> > design 50 different color template sites.
> >
> > ~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]
>
>--
>___
>Jack Sasportas
>Innovative Internet Solutions
>Phone 305.665.2500
>Fax 305.665.2551
>www.innovativeinternet.com
>www.web56.net
>
>
>
>--
>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] Another how do i question

2001-07-23 Thread Matt Greer

on 7/23/01 6:25 PM, Kyle Smith at [EMAIL PROTECTED] wrote:

> I made this code for a simple for (the end of it) but what do i change in the
> $message variable so there is a new line between each other variable in
> $message (ive tried $name. . $last_name and.  happens)
> 

Did you try $name . "" . $last_name, etc.

Although the  will just show up as plain text in a text email, so I'd
try the new line character "\n".

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]




Re: [PHP] Another how do i question

2001-07-23 Thread Matt Greer

on 7/23/01 10:49 AM, Matt Greer at [EMAIL PROTECTED] wrote:

> on 7/23/01 6:25 PM, Kyle Smith at [EMAIL PROTECTED] wrote:
> 
>> I made this code for a simple for (the end of it) but what do i change in the
>> $message variable so there is a new line between each other variable in
>> $message (ive tried $name. . $last_name and.  happens)
>> 
> 
> Did you try $name . "" . $last_name, etc.
> 
Er, I mean 

$message = "$name . '' ... ";

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

2001-07-23 Thread Kyle Smith

is there a code to show a users screen resolution and/or make a webpage go to a 
certain page of the site depending on the users screen resolution?


-legokiller666-
http://www.StupeedStudios.f2s.com
New address new site

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666





Re: [PHP] Resolution

2001-07-23 Thread Tyler Longren

I don't believe you can get screen resolution with PHP.  You'd need to use
something client side, such as Javascript.

Tyler

- Original Message -
From: "Kyle Smith" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 23, 2001 6:45 PM
Subject: [PHP] Resolution


is there a code to show a users screen resolution and/or make a webpage go
to a certain page of the site depending on the users screen resolution?


-legokiller666-
http://www.StupeedStudios.f2s.com
New address new site

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666





-- 
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] Keeping fields out of URL

2001-07-23 Thread Shrout, Ryan

How can I keep fields in a form out of the URL?

I am writing a basic PHP/login script to password protect a directory of the
web site (if anyone knows of something pre-made, please do let me know).

But, the first stumbling block is that when sometypes in their
username/password, even when the I use th INPUT Type Password so only
asterics appear when it is typed, the password still appears in the submit
query URL.  How do I stop that?

Ryan Shrout

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

2001-07-23 Thread Jack Sasportas

For future purposes you should set your history to expire some ridiculous time in
the future.  I still reference sites from as far back as 2 years ago...
It's really nice to be able to do that.  I use netscape and my setting is 999
days..

Jack

Kurth Bemis wrote:

> At 11:29 AM 7/23/2001, Jack Sasportas wrote:
>
> I last visited this site about 2 months ago...too long for any history :-(
>
> >Your web browser should have a history option, and you can sift through the
> >list of domains you surfed that approximate time frame ago...Also you can
> >search in some applications like  netscape the history file, and look for key
> >things like templates...
> >
> >Good Luck
> >
> >
> >
> >Kurth Bemis wrote:
> >
> > > i've been looking for a template site that i used and never bookmarked.
> > >
> > > I'll tell you what i remember about the site and hopefully someone will
> > > know what site i'm talking about.  I've spend the last 5 hours looking for
> > > this siteso this is my final stab in the dark.
> > >
> > > The site had 4 categories of templates.  one was business templates and the
> > > other was user templates.
> > >
> > > most of the designs were linkware.
> > >
> > > and most of the templates were in plain html.
> > >
> > > the site had a lot of templates...150+?
> > >
> > > does anybody remember a free template site like that?  I'm pulling my hair
> > > out because ti was a good template site...not one of those cheezy one
> > > design 50 different color template sites.
> > >
> > > ~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]
> >
> >--
> >___
> >Jack Sasportas
> >Innovative Internet Solutions
> >Phone 305.665.2500
> >Fax 305.665.2551
> >www.innovativeinternet.com
> >www.web56.net
> >
> >
> >
> >--
> >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]

--
___
Jack Sasportas
Innovative Internet Solutions
Phone 305.665.2500
Fax 305.665.2551
www.innovativeinternet.com
www.web56.net



-- 
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] Keeping fields out of URL

2001-07-23 Thread Tyler Longren

You forgot to put method=POST in your 

Tyler

- Original Message -
From: "Shrout, Ryan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 23, 2001 10:55 AM
Subject: [PHP] Keeping fields out of URL


> How can I keep fields in a form out of the URL?
>
> I am writing a basic PHP/login script to password protect a directory of
the
> web site (if anyone knows of something pre-made, please do let me know).
>
> But, the first stumbling block is that when sometypes in their
> username/password, even when the I use th INPUT Type Password so only
> asterics appear when it is typed, the password still appears in the submit
> query URL.  How do I stop that?
>
> Ryan Shrout
>
> --
> 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] Resolution

2001-07-23 Thread Gonyou, Austin

If you want to see what you can get from the client, serverside. Please run
the following:




Put that into some php file, and it will tell you what PHP will allow you to
get be default. I feel that the JS answer is about as correct as your going
to get. 
-- 
Austin Gonyou
Systems Architect, CCNA
Coremetrics, Inc.
Phone: 512-796-9023
email: [EMAIL PROTECTED] 

> -Original Message-
> From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 23, 2001 10:54 AM
> To: Kyle Smith; [EMAIL PROTECTED]
> Subject: Re: [PHP] Resolution
> 
> 
> I don't believe you can get screen resolution with PHP.  
> You'd need to use
> something client side, such as Javascript.
> 
> Tyler
> 
> - Original Message -
> From: "Kyle Smith" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, July 23, 2001 6:45 PM
> Subject: [PHP] Resolution
> 
> 
> is there a code to show a users screen resolution and/or make 
> a webpage go
> to a certain page of the site depending on the users screen 
> resolution?
> 
> 
> -legokiller666-
> http://www.StupeedStudios.f2s.com
> New address new site
> 
> ICQ: 115852509
> MSN: [EMAIL PROTECTED]
> AIM: legokiller666
> 
> 
> 
> 
> 
> -- 
> 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] Keeping fields out of URL

2001-07-23 Thread Matt Greer

on 7/23/01 10:55 AM, Shrout, Ryan at [EMAIL PROTECTED] wrote:

> How can I keep fields in a form out of the URL?
> 
> I am writing a basic PHP/login script to password protect a directory of the
> web site (if anyone knows of something pre-made, please do let me know).
> 

If you're on a unix server you can use .htaccess
A search on any search engine should pull up lots of info on it.


> But, the first stumbling block is that when sometypes in their
> username/password, even when the I use th INPUT Type Password so only
> asterics appear when it is typed, the password still appears in the submit
> query URL.  How do I stop that?

Change your method to "post" as in 

Keep in mind that just sticks the variables in the header rather than on the
command line. It's not any more secure than what you had before.

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]




RE: [PHP] Resolution

2001-07-23 Thread Rudolf Visagie

Hi Kyle,

I use the following:




.
.
.





Cheers
Rudolf

-Original Message-
From: Kyle Smith [mailto:[EMAIL PROTECTED]]
Sent: 24 July 2001 01:45
To: [EMAIL PROTECTED]
Subject: [PHP] Resolution


is there a code to show a users screen resolution and/or make a webpage go
to a certain page of the site depending on the users screen resolution?


-legokiller666-
http://www.StupeedStudios.f2s.com
New address new site

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666



-- 
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] Email Software

2001-07-23 Thread Gregor Welters

Am Mittwoch, 18. Juli 2001 14:50 schrieb Wee Chua:
> Hi all,
> I need a little help from you guys. Can anyone tell what is the best
> software for sending million emails at a time or something
> like that? 

sendmail

-- 
mfg Gregor Welters

-- 
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] Send variables from php to dll and back.

2001-07-23 Thread Patrick Lynch

What you are probably looking for is:
http://www.php.net/manual/en/class.com.php

Make a COM object out of your VB DLL (more info on this is available on a VB
faq). You can use the functions on the page above to access the
functionality of the COM object.

Best Regards,
Patrick Lynch.  
==
Eirco
==
Web: http://www.eirco.com


-Original Message-
From: Ryan Marrs [mailto:[EMAIL PROTECTED]] 
Sent: 23 July 2001 16:00
To: [EMAIL PROTECTED]
Subject: [PHP] Send variables from php to dll and back.


I'm trying to call a VB DLL to run validation checks on user input.  I know
nothing of VB, or even how to call a DLL for something like this, so I'm
going to need to be shown like a newbie.  I've already read over Luiz
Fernando's request and responses, and they didn't seem to help me.  

For example, I need to send:

$string="Hello World";
$string2="This/Would/Fail">
$string3="Test 3";
$string4="Test%5";


Re: [PHP] Resolution

2001-07-23 Thread Daniel Rezny

Hello Kyle,

Tuesday, July 24, 2001, 1:45:00 AM, you wrote:

KS> is there a code to show a users screen resolution and/or make a webpage go to a 
certain page of the site depending on the users screen resolution?


KS> -legokiller666-
KS> http://www.StupeedStudios.f2s.com
KS> New address new site

KS> ICQ: 115852509
KS> MSN: [EMAIL PROTECTED]
KS> AIM: legokiller666



Use a javascript code
screen.width();
screen.height();


-- 
Best regards,
 Danielmailto:[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] REPOST: Image color quality problems

2001-07-23 Thread Kurt Lieber

I need to learn to stop posting things over the weekend since they
rarely get a response.  Can anyone help with the below?:

I have the following code that takes an existing image, creates a new
one from it and writes some white text on top of that image:



Problem is, the "white" text isn't white -- it's a dingy gray color.
>From reading around, I thought maybe if I took an existing white pixel
in the image and used that to set white, that might help (hence the
commented out //$white = imageColorAt... line in my code above)  That
didn't help either.  (and the pixel I sampled is exactly the shade of
white I want)

I am almost completely unfamiliar with color pallettes and how to
manipulate them.  Can someone shed some light on how I can get some
clean, bright white text on my image?

Thanks.

--kurt


-- 
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] Another how do i question

2001-07-23 Thread Patrick Lynch

Unless you are sending HTML mail, you need to use newline - not BR




Best Regards,
Patrick Lynch.  
==
Eirco
==

-Original Message-
From: Kyle Smith [mailto:[EMAIL PROTECTED]] 
Sent: 24 July 2001 00:25
To: [EMAIL PROTECTED]
Subject: [PHP] Another how do i question


I made this code for a simple for (the end of it) but what do i change in
the $message variable so there is a new line between each other variable in
$message (ive tried $name. . $last_name and.  happens)

 


-legokiller666-
http://www.StupeedStudios.f2s.com
New address new site

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666



-- 
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] Add system user using php

2001-07-23 Thread Mark Lo

HI,

 I would like to know how to add a system user using php. etc. adduser
mark..and then passwd mark -->password --> password.

Thank you

Mark


-- 
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] Why wont this work?

2001-07-23 Thread Dan Krumlauf


news_publish.php
***
)(.*?)(<\/NEWS>)/i","\\1$news\\2",
$templine));
 print ($templine);
 }
 fclose ($tempfile);
}
$template_dir="/php/work/boz";
$template_filename="news";
$news="SOME STUFF GOES HERE BUILD IT AS A VAR";
DoTemplate($template_dir,$template_filename);
?>
**

news.html
***




 No Title




This is some text





Results in

Parse error: parse error in /php/work/boz/news_publish.php on line 8


-- 
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] Why wont this work?

2001-07-23 Thread Mark Roedel

> -Original Message-
> From: Dan Krumlauf [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 24, 2001 11:24 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Why wont this work?
> 
> 
> news_publish.php
> ***
>
> [snip]
>
>  $templine = preg_replace("/()(.*?)(<\/NEWS>)/i","\\1$news\\2",
> $templine));

Unless my counting skills have gone downhill lately, this line has more
)'s than ('s.


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




Re: [PHP] Why wont this work?

2001-07-23 Thread PatlsSoda

Your line in in news_publish.php is:
while($templine=fgets($tempfile, 4096) ) {

if you want to test if $templine is equal to fgets($tempfile, 4096) then you 
should use 2 equal signs. So,

while($templine==fgets($tempfile, 4096) ) {

1 equal sign sets the value of the right side to the left.

HTH,
Pat

In a message dated 7/23/01 12:18:51 PM Eastern Daylight Time, [EMAIL PROTECTED] 
writes:


> news_publish.php
> ***
>  function DoTemplate() {
> $filedir = func_get_arg(0);
> $filename = func_get_arg(1);
> $news = func_get_arg(2);
> $tempfile = fopen ("$filedir" . "/" . "$filename" . ".html", "r") or die
> ("Failed to open template file $filename");
> while($templine=fgets($tempfile, 4096) ) {
> $templine = preg_replace("/()(.*?)(<\/NEWS>)/i","\\1$news\\2",
> $templine));
> print ($templine);
> }
> fclose ($tempfile);
> }
> $template_dir="/php/work/boz";
> $template_filename="news";
> $news="SOME STUFF GOES HERE BUILD IT AS A VAR";
> DoTemplate($template_dir,$template_filename);
> ?>
> **
> 
> news.html
> ***
> 
> 
> 
> 
> No Title
> 
> 
> 
> 
> This is some text
> 
> 
> 
> 
> 
> Results in
> 
> Parse error: parse error in /php/work/boz/news_publish.php on line 8
> 
> 




RE: [PHP] sleep() function question

2001-07-23 Thread Patrick Lynch

Is 
output_buffering = On
set in the php.ini file?

If it is set to on, no content or headers are sent back to the browser until
the whole page has been processed by PHP.

Best Regards,
Patrick Lynch.  

Eirco
Web: http://www.eirco.com


-Original Message-
From: Andrew Brampton [mailto:[EMAIL PROTECTED]] 
Sent: 23 July 2001 02:38
To: drb
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] sleep() function question


I know very little about PHP, but in other languages, what u describe
happens because the webserver doesn't send the output until the excution is
done...

But you can make it write your output as its generated... check out the
function "flush"

also after 20seconds of looking, I found "ob_implicit_flush" that may help
as well..

Hope I could help
Andrew
- Original Message -
From: "drb" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, July 22, 2001 11:25 PM
Subject: [PHP] sleep() function question


> just wanted to make sure I was not doing anything incorrectly.
>
> I want to return some values to the screen and then sleep(), then
> return more values. It seems that nothing is returned till the sleep 
> is over and then all the values are returned at once.
>
> Is this the natural function of sleep();
>
> thanks,
>
> DRB
>
>
>
> --
> 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] number generat {Luhn algorithm}

2001-07-23 Thread Christopher Ostmo

Yamin Prabudy pressed the little lettered thingies in this order...

> anybody know about the Luhn algorithm ??
> how can i do that in php
> 
> yamin
> 

http://www.zend.com/codex.php?id=31&single=1

Christopher Ostmo
a.k.a. [EMAIL PROTECTED]
AppIdeas.com
Innovative Application Ideas
Meeting cutting edge dynamic
web site needs since the 
dawn of Internet time (1995)

For a good time,
http://www.AppIdeas.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] D d d d database?

2001-07-23 Thread Kyle Smith

ok i dont know the first thing about data bases so could someone please guide me 
through the process of making a score board for a flash game i have made with the 
variables $name and $score??
(note: i have hosting at f2s.com so i have to use myADMIN)

-legokiller666-
http://www.StupeedStudios.f2s.com
New address new site

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666





[PHP] Zip Code Locator?

2001-07-23 Thread Vincent P. Cocciolone

Hi,

Does anyone know where can I find documentation or example scripts for a zip code 
locator. I'm looking for something that will list
other zip codes within a number of miles radius of the zip specified.

Thanks!

Vince


-- 
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] Single Digit in Double digit column

2001-07-23 Thread Rehuel Lobato de Mesquita

guys, I don't know If this is the rigth place to ask this question, but
please help me!

I  have a mySQL table, where the ID field is an auto increment number
(INT(2)). I have a query that selects 2 colunms in the table and the lists
them
But only the items with a double digit id are displayd. it fails to display
items with 1 digit!
What did I do wrong
I want to know where to look.
Stretsh



-- 
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: Another how do i question

2001-07-23 Thread Rehuel Lobato de Mesquita

Hey Kyle...
Try "\r\n" instead of "\n"

I had the same problem, and this fixed it for me! (someone on the net tipped
me on this one!)

Stretsh

"Kyle Smith" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I made this code for a simple for (the end of it) but what do i change in
the $message variable so there is a new line between each other variable in
$message (ive tried $name. . $last_name and.  happens)





-legokiller666-
http://www.StupeedStudios.f2s.com
New address new site

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666






-- 
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] Author.class - Does it exist?

2001-07-23 Thread Mike Gifford

Hello,

Does anyone know if there's a GPL author class out there?

There are online book stores & bibliographies all need to manage author names in 
a similar way (I would think), and I'd just like to not recreate the wheel if I 
don't have to.

Mike
-- 
Mike Gifford, OpenConcept Consulting, http://openconcept.ca
Offering everything your organization needs for an effective web site.
Abolish Nuclear Weapons Now!: http://pgs.ca/petition/
It is a miracle that curiosity survives formal education. - A Einstein


-- 
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: One2Many Logic Problem - phpMySQL bibliography

2001-07-23 Thread Mike Gifford

Hello Steve,

Thanks for the response.  I tried to reply to this earlier, but seems like 
Mozilla ate it.  :(

Steve Brett wrote:

> wouldn't the structure of the database be determined by the fact you have a
> many to many relationship ?
> i.e. the two tables would decompose into three with a 'link' table defining
> the many to may part ?

Sorry if I wasn't clear about this.  You are right there is a linking table to 
manage the relationship.  I can create a query which will find duplicate 
author's for each book listed in this linking table.

However, I don't know how to effectively use this data to affect how information 
is extracted from the database in the second query.

CREATE TABLE WLPprofile (
profileID mediumint(9) NOT NULL,
languageID varchar(5),
addressID mediumint(9),
firstName varchar(255),
middleName varchar(255),
lastName varchar(255),
organization varchar(255),
nationality varchar(255),
professionID smallint(3),
bio text,
status varchar(5),
PRIMARY KEY (profileID)
);

CREATE TABLE WLPbib (
bibID mediumint(9) NOT NULL,
languageID varchar(5),
publisherID mediumint(9),
categoryID smallint(6),
type varchar(55),
title varchar(255),
pageNumber varchar(55),
source_bibID varchar(55),
publicationDate varchar(5),
dateAdded date,
publishedLanguage varchar(5),
URL varchar(100),
status varchar(5),
PRIMARY KEY (bibID)
);

CREATE TABLE WLPbib2profile (
bibID mediumint(9),
profileID mediumint(9)
);

Thanks.

Mike

> "Mike Gifford" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 
>> Hello,
>> 
>> I'm not sure if anyone else as the need for a php/MySQL based
> 
> bibliography, but
> 
>> the application that I am developing (which is basically a module for
> 
> phpSlash)
> 
>> is coming along fairly well.  If anyone is interested in seeing the code I
> 
> can
> 
>> bundle it up and send it out to them (still a long way from finished
> 
> mind).  The
> 
>> draft version of it is up and running here:
>> http://openconcept.ca/WLP/biblio/index.php3
>> 
>> I'm running into a couple problems though that I don't have the logic
> 
> language
> 
>> for and I was hoping folks here could help me (as you have done in the
> 
> past).
> 
>> The problem is that I've set up a many to many table to ensure that I can
> 
> have
> 
>> an author be listed as writing many books and a book be written by many
> 
> authors.
> 
>> However in listing the books as a bibliography (as the URL above), I want
> 
> to be
> 
>> able to list multiple authors, and do so in a different format for the
> 
> first
> 
>> author than for all subsequent ones.
>> 
>> I'm hoping to be able to produce output like this:
>> Young, D. and N. Dixon. Helping Leaders Take Effective Action: A Program
>> Evaluation. Greensboro, North Carolina: Center for Creative Leadership,
>> 1996.
>> 
>> 
>> So, I think the first challenge should be to calculate which books have
> 
> multiple
> 
>> authors by doing something like this (It's using phplib structures,
> 
> sorry):
> 
>> $q2  = "SELECT * FROM WLPbib2profile ORDER BY bibID";
>> $this->db->query($q2);  // Performs above query
>> while ($this->db->next_record()) {
>> if ($this->db->Record["bibID"] != $last_bibID) {
>> echo "" . $this->db->Record["bibID"] . " : " .
> 
> $this->db->Record["profileID"];
> 
>> } else { // Multiple Authors
>> echo ", " .  $this->db->Record["profileID"];
>> $multiple_profileID .= array ($this->db->Record["bibID"] =>
>> $this->db->Record["profileID"]);
>> $multiple_profileID .= array($this->db->Record["bibID"] =>
>> "yes");
>> }
>> $last_bibID = $this->db->Record["bibID"];
>> }
>> }
>> 
>> With this I can then use the value $multiple_profileID to determine if
> 
> this
> 
>> record has duplicates or not and use something like this to include both
> 
> authors
> 
>> and not repeat the bibliography item:
>> 
>> if ($multiple_profileID[$bibID]=="yes") {
>> while (list($key, $val) = each($multiple_profileID)) {
>> $written_by =  $key . " : " . $val . "";
>> if ($this->db->Record["firstName"]) {
>> $written_by .= stripslashes($this->db->Record["firstName"]) . " ";
>> }
>> if($this->db->Record["lastName"]) {
>> $written_by .=  stripslashes($this->db->Record["lastName"]);
>> }
>> }
>> } else {
>> 
>> if($this->db->Record["lastName"]) {
>> $written_by .=  stripslashes($this->db->Record["lastName"]) . ", ";
>> }
>> if ($this->db->Record["firstName"]) {
>> $written_by .= stripslashes($this->db->Record["firstName"]);
>> }
>> }
>> 
>> But this seems really awkward (at the best of times) and (worst of all) it
> 
> isn't
> 
>> working.
>> 
>> I've got another related problem in that I've set up the following fields
> 
> in one
> 
>> table:
>> firstName
>> lastName
>> organization
>> 
>> and I need to be able to order them by a combination of la

RE: [PHP] REPOST: Image color quality problems

2001-07-23 Thread SED

I had the same problem when using JPEG, but having a white pixel in the
picture solved it. But that did obviosly not solve your problem. Perhabs
this is due to "bug-version" of GD library, have you tried a newer one?
Does this also happen if you use JPEG and GIF files?

Let us know if you find solution!

Regards,
Sumarlidi Einar Dadason

SED - Graphic Design

--
Phone:   (+354) 4615501
Mobile:  (+354) 8960376
Fax: (+354) 4615503
E-mail:  [EMAIL PROTECTED]
Homepage:www.sed.is
--

-Original Message-
From: Kurt Lieber [mailto:[EMAIL PROTECTED]] 
Sent: 23. júlí 2001 16:14
To: [EMAIL PROTECTED]
Subject: [PHP] REPOST: Image color quality problems


I need to learn to stop posting things over the weekend since they
rarely get a response.  Can anyone help with the below?:

I have the following code that takes an existing image, creates a new
one from it and writes some white text on top of that image:



Problem is, the "white" text isn't white -- it's a dingy gray color.
>From reading around, I thought maybe if I took an existing white pixel
in the image and used that to set white, that might help (hence the
commented out //$white = imageColorAt... line in my code above)  That
didn't help either.  (and the pixel I sampled is exactly the shade of
white I want)

I am almost completely unfamiliar with color pallettes and how to
manipulate them.  Can someone shed some light on how I can get some
clean, bright white text on my image?

Thanks.

--kurt


-- 
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] PHP Uploads - Sorry!!!

2001-07-23 Thread Corin Rathbone

Sorry to again bring up the subject, but could somebody please help me with
file uploads. I have written the script below, but it doesn't work properly.
please help. Alternatively, could somebody give me a simple upload script.
My system is Win 98, Apache 1.3.17, php 4.0.5, IE5. The code is below.

Thanks,

Corin Rathbone

\n" );
print( "$current_file\n" );
  print( "$current_file_name\n" );
  print( "$current_file_size\n" );
  print( "$current_file_path\n" );

if(!$current_file=""){
  if(!file_exists($current_file_path)){
//copy("$current_file", "$current_file_path");
//unlink($current_file);
  $fp = fopen("$current_file_path", "wb") or die("Could not write
file!");
fwrite($fp, "$current_file") or die("Could not write file!");
  fclose($fp) or die("Could not close file pointer!");
$worked[] = 1;
  }
  else{
//die("File does not exists!");
  }
}
else{
  $worked[] = 0;
}
  }
}
elseif(!isset($uploads_go)){  
$cfg_upload_max_filesize = get_cfg_var("upload_max_filesize");
print( "\n" );
  print( "  \n" );
  print( "  \n" );
  print( "  Upload these files:\n" );
  print( "  File: Path: \n" );
  print( "  File: Path: \n" );
  print( "  File: Path: \n" );
  print( "  File: Path: \n" );
  print( "  File: Path: \n" );
  print( "  File: Path: \n" );
  print( "  File: Path: \n" );
  print( "  File: Path: \n" );
  print( "  File: Path: \n" );
  print( "  File: Path: \n" );
  print( "  \n" );
  print( "" );
}
elseif(isset($worked)){
  for($x=0; $x<9; $x++){
if($worked[$x]){
  print( "The file upload for file $path_to_file[$x] was successful\n" );
}
else{
  print( "The file upload for file $path_to_file[$x] was not 
successful\n" );
}
  }
}
else{
  print( "Please select files to be uploaded" );
}

?>


-- 
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] Using $$ to access a variable

2001-07-23 Thread usenet5

Please forgive my probably newbie question...
I am cycling thru my database using a SQL describe statement and then
am getting values from a form based upon the field name I find.  This
is working up 'til I try to read the form data.

I have defined a variable like this:
$var = $prefix.$table_array[$iCnt][0].$postfix;

If I echo $var the printed result is:
HTTP_POST_VARS["Id_val"]

This is perfect because I want to access a field on the submitted form
named "Id_val", but when I try echoing with a $$ like this:
echo $$var

I get nothing.  I was under the impression that I could access my
variable this way.  Am I missing something basic here??

Thanks!

Mark

-- 
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] javascript ?

2001-07-23 Thread Angel Behar

Hi !!!

I know maybe this is not the right place to make this question but I have
been a PHP user for long time and this list had been very helpful.

I want to create a form which once you select a radio button or a drop down
menu display the proper fields according to the selection.

Let say that we have two options : To go and Pick Up. If the user select to
go then automatically display the address field, zip field etc, if the user
select pick up display the time field etc.

I 've been looking a lot of javascript sites but can't find something
similar to that I want.

Hope any of you can help me.

Thanks in advance.

Angel.



-- 
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: [PHP-DEV] Re: IMAP/POP3 Administration API?

2001-07-23 Thread Vlad Krupin

...None of them will. This is not a part of IMAP protocol; it is part
of the mail server, and each server does that in its own way.

On a brighter note - if you use qmail, there is a very nice patch for
it that will allow to store users in a mysql database, so you can use
php to add/delete users whenever you want. We used that in
production for a couple of years now. Very convenient. Also
patches to make it work with postgres, and it won't take much
time to make it work with the DB of your choice, if you look at
the sources of those patches - they are rather simple.
Website is http://www.qmail.org/.

Now, crossposting is a *really* bad idea, and is not looked well
upon by the developers. You posted to 15(!) different groups
while only one (php-general) is somewhat proper for that question.
This significantly reduces your chances to get an answer to your
question at all.

Vlad


Christopher Cheng wrote:

>Have looked through it already. None of them allows me to add/delete users
>
>
>"Dave Mertens" <[EMAIL PROTECTED]> wrote in message
>news:[EMAIL PROTECTED]...
>
>>On Sun, Jul 22, 2001 at 07:41:01PM +0800, Christopher Cheng wrote:
>>
>>>Is there any IMAP/POP3 API/Modules of Linux email system (Sendmail)
>>>
>written
>
>>>in PHP?
>>>I am looking for API to write a signup page for users.
>>>
>>
>>Have to tried http://www.php.net/imap ?? Great source for API's ;-)
>>
>>Dave Mertens
>>
>
>
>




-- 
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]include question, WHY doesn't this work...

2001-07-23 Thread Chris Cocuzzo

hey-

I have a piece of code which does a simply INSERT query into an mp3 table.
I've tested it out, and it completes the query, however there is one bug
that I just have no clue about.

this code does not work when i try to connect to the db:
include("lib/db_config.php");

$connection = db_connect("fplg");
if(!connection) {
 die(sql_error());
}
the include fails and so the db_connect function is undefined.

this code works:
include("db_config.php");

$connection = db_connect("fplg");
if(!connection) {
 die(sql_error());
}

I DO have a directory called lib in my root folder. am I calling the include
wrong in that first piece. Note that I also tried the first one with a
foward slash in front of the 'lib', but had no luck.

help!
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] Re: Why wont this work?

2001-07-23 Thread James, Yz

Hi Dan,

try changing:
$tempfile = fopen ("$filedir" . "/" . "$filename" . ".html", "r") or die
To:
$tempfile = fopen ($filedir . "/" . $filename . ".html", "r") or die

for starters ;)

James.

"Dan Krumlauf" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> news_publish.php
> ***
>  function DoTemplate() {
> $filedir = func_get_arg(0);
> $filename = func_get_arg(1);
> $news = func_get_arg(2);
> $tempfile = fopen ("$filedir" . "/" . "$filename" . ".html", "r") or die
> ("Failed to open template file $filename");
> while($templine=fgets($tempfile, 4096) ) {
>  $templine = preg_replace("/()(.*?)(<\/NEWS>)/i","\\1$news\\2",
> $templine));
>  print ($templine);
>  }
>  fclose ($tempfile);
> }
> $template_dir="/php/work/boz";
> $template_filename="news";
> $news="SOME STUFF GOES HERE BUILD IT AS A VAR";
> DoTemplate($template_dir,$template_filename);
> ?>
> **
>
> news.html
> ***
> 
>
> 
> 
>  No Title
> 
>
> 
>
> This is some text
>
> 
> 
> 
>
> Results in
>
> Parse error: parse error in /php/work/boz/news_publish.php on line 8
>



-- 
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, Excel, .CSV's, and Regular Expressions Help Needed!

2001-07-23 Thread Jeff Lacy

Hello Everyone,

A client of mine is working with excel, and I need to move the data from
excel to something php can deal with a little better.  Naturally, I figured
using .csv would be easiest, but I am running into several problems.I
can get around them, but I need a regular expression (and I am NOT good at
writing those).

I'm not quite sure how I should explain what the regular expression ought to
do, so I am giving an example of the data ought to look like in php (after
the regular expressions), and how it looks in the .csv.

NOTE: I am exploding the data, so all ,'s must be changed into COMMA's.

+---++
| php  | .cvs
|
+---++
piCOMMA 3.14,hey is for horses"pi, 3.14",hey is for horses
"byeCOMMA bye",ciaoCOMMA ciao"""bye, bye""", "ciao, ciao"
"good morning,I'm Bob """good morning", I'm Bob
sleep is good,IceCOMMACOMMAsleep is good,"Ice,,"


If those four examples aren't enough, please let me know.  I am NOT on the
php mailing list, so PLEASE send messages to me ([EMAIL PROTECTED] AND
to [EMAIL PROTECTED]).

Thank you very much (in advance),

Jeff







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

2001-07-23 Thread Matthew Loff


I don't see why you wouldn't be able to access that share... Did you try
escaping the path?

e.g. chdir("computer\\dir");


-Original Message-
From: ReDucTor [mailto:[EMAIL PROTECTED]] 
Sent: Monday, July 23, 2001 6:20 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Networking


Hey does any one know if it is possible to do something like

read stuff thro file and printer sharing on a remote pc, i tried

\\computer\dir for the dirs but that didn't work any suggestions(btw i
did addslashes :D )

so ne ideas...please


-- 
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] Single Digit in Double digit column

2001-07-23 Thread Mark Roedel

> -Original Message-
> From: Rehuel Lobato de Mesquita [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 23, 2001 12:00 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Single Digit in Double digit column
> 
> 
> I  have a mySQL table, where the ID field is an auto increment
> number (INT(2)). I have a query that selects 2 colunms in the
> table and the lists them, but only the items with a double digit
> id are displayd. it fails to display items with 1 digit!
> What did I do wrong
> I want to know where to look.

It's hard to say for sure what you did wrong, since you really haven't
given us much information on what you did.

My first thought, though, would be to take a closer look at your query
to see if you're perhaps filtering out more than you expected.  Perhaps
if you posted that, along with whatever parts of your source code seem
relevant...


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




RE: [PHP] Networking

2001-07-23 Thread Mark Roedel

> -Original Message-
> From: ReDucTor [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 23, 2001 5:20 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Networking
> 
> 
> Hey does any one know if it is possible to do something like
> read stuff thro file and printer sharing on a remote pc, i tried
> \\computer\dir for the dirs but that didn't work any suggestions
> (btw i did addslashes :D )

Are you trying to access these resources from a Windows machine (in
which case I'd be surprised if something close to what you tried didn't
work), or from something Unix-y?

If it's the latter, probably your best bet is going to be to get a copy
of Sharity or Samba installed and mount the remote-machine resources so
that you can treat them as local resources.


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




Re: [PHP]include question, WHY doesn't this work...

2001-07-23 Thread Unni

Is the lib direcotory under the working directory, I mean, if your 
program is excuting  under temp directory, the lib directory has to be 
below temp directory. If you are running this program from the root 
directory then lib has to be below root directory.
Your code looks good to me.
One more thing I can think of is, do you read access to lib directory, 
just curious.

Chris Cocuzzo wrote:

> hey-
> 
> I have a piece of code which does a simply INSERT query into an mp3 table.
> I've tested it out, and it completes the query, however there is one bug
> that I just have no clue about.
> 
> this code does not work when i try to connect to the db:
> include("lib/db_config.php");
> 
> $connection = db_connect("fplg");
> if(!connection) {
>  die(sql_error());
> }
> the include fails and so the db_connect function is undefined.
> 
> this code works:
> include("db_config.php");
> 
> $connection = db_connect("fplg");
> if(!connection) {
>  die(sql_error());
> }
> 
> I DO have a directory called lib in my root folder. am I calling the include
> wrong in that first piece. Note that I also tried the first one with a
> foward slash in front of the 'lib', but had no luck.
> 
> help!
> 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]




Re: [PHP] PHP, Excel, .CSV's, and Regular Expressions Help Needed!

2001-07-23 Thread Unni

Hi Jeff,

I didn't  get your question. Can you elobrate little bit more, if 
possible? What is the input and what is output you are expecting and 
what do you want to do in the process?

Thanks.

Jeff Lacy wrote:

> Hello Everyone,
> 
> A client of mine is working with excel, and I need to move the data from
> excel to something php can deal with a little better.  Naturally, I figured
> using .csv would be easiest, but I am running into several problems.I
> can get around them, but I need a regular expression (and I am NOT good at
> writing those).
> 
> I'm not quite sure how I should explain what the regular expression ought to
> do, so I am giving an example of the data ought to look like in php (after
> the regular expressions), and how it looks in the .csv.
> 
> NOTE: I am exploding the data, so all ,'s must be changed into COMMA's.
> 
> +---++
> | php  | .cvs
> |
> +---++
> piCOMMA 3.14,hey is for horses"pi, 3.14",hey is for horses
> "byeCOMMA bye",ciaoCOMMA ciao"""bye, bye""", "ciao, ciao"
> "good morning,I'm Bob """good morning", I'm Bob
> sleep is good,IceCOMMACOMMAsleep is good,"Ice,,"
> 
> 
> If those four examples aren't enough, please let me know.  I am NOT on the
> php mailing list, so PLEASE send messages to me ([EMAIL PROTECTED] AND
> to [EMAIL PROTECTED]).
> 
> Thank you very much (in advance),
> 
> Jeff
> 
> 
> 
> 
> 
> 
> 


-- 
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] keeping track of external image linking with php?

2001-07-23 Thread Matt Greer

I don't think that's the best subject, but I'm not really sure how to phrase
it.

I'm not familiar with php's image capabilities. I've read about them a bit,
but never really used them.

I'd like to have an image that when accessed would cause php to kick in and
do a few things before sending the image along to whoever is requesting it.
Basically I'd like to keep a running tally of how many times a website is
accessing an image on my server. Which functionally speaking is identical to
a hit counter I guess.

Is it possible to have on a webpage something like 

and then image.php takes note of the website variable, does a few things
with mysql, then passes on the image that is wanted, utilizing something
from the gd library?

Thanks,
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]




Re: [PHP]include question, WHY doesn't this work...

2001-07-23 Thread Chris Cocuzzo

the lib directory is under the root directory, or the www directory, where
all the normal files have been put. i figured out that the include worked
better when I specified the entire system path.

chris


- Original Message -
From: Unni <[EMAIL PROTECTED]>
To: Chris Cocuzzo <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, July 23, 2001 3:52 PM
Subject: Re: [PHP]include question, WHY doesn't this work...


> Is the lib direcotory under the working directory, I mean, if your
> program is excuting  under temp directory, the lib directory has to be
> below temp directory. If you are running this program from the root
> directory then lib has to be below root directory.
> Your code looks good to me.
> One more thing I can think of is, do you read access to lib directory,
> just curious.
>
> Chris Cocuzzo wrote:
>
> > hey-
> >
> > I have a piece of code which does a simply INSERT query into an mp3
table.
> > I've tested it out, and it completes the query, however there is one bug
> > that I just have no clue about.
> >
> > this code does not work when i try to connect to the db:
> > include("lib/db_config.php");
> >
> > $connection = db_connect("fplg");
> > if(!connection) {
> >  die(sql_error());
> > }
> > the include fails and so the db_connect function is undefined.
> >
> > this code works:
> > include("db_config.php");
> >
> > $connection = db_connect("fplg");
> > if(!connection) {
> >  die(sql_error());
> > }
> >
> > I DO have a directory called lib in my root folder. am I calling the
include
> > wrong in that first piece. Note that I also tried the first one with a
> > foward slash in front of the 'lib', but had no luck.
> >
> > help!
> > 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]




  1   2   >