Re: [PHP] IIS Quit Working

2002-12-29 Thread Jason Wong
On Sunday 29 December 2002 09:14, Stephen wrote:
 Since I like new things and all, I decided to download and install PHP 4.3.
 Before, I had the latest (4.2.3) and IIS worked fine. But then, after
 uninstalling PHP and installing the new one, it just quit working. I go to
 http://localhost/ and nothing comes up except a This page cannot be
 displayed thing since I'm using IE. Any ideas why this is happening?

Turn on error reporting and log to file and examine it for any clues.

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

/*
You can tell how far we have to go, when FORTRAN is the language of
supercomputers.
-- Steven Feiner
*/


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




[PHP] Warning: 1 is not a valid File-Handle resource - HELP!

2002-12-29 Thread Phil Powell
Ok, I am a bad coder. :(  I can't figure this out at all:

   $fileID = fopen(nicknames.txt, 'r');
$stuff = fread($fileID, filesize(nicknames.txt)); fclose($fileID);
if (strlen($stuff)  0) $priorNickNewLine = \n; 
$nicks = explode(\n, $stuff);

The last line produces the Warning.. why?  I am trying to read contents from 
nicknames.txt and split according to the newline character so that each nickname is an 
array element.

What did I do wrong? :(

Phil



[PHP] European daylight saving summer-time.

2002-12-29 Thread Martin Thoma
Hello!

I just want to get the actual date and time which works fine with
date(). The problem is that php doesn't give the european
daylight-saving-time in summer, so the time shown is offset by 1 hour in
summer. It seems that my internet service provider doesn't adjust the
clock of the server to this. How can I avoid this without manually
correct it every spring/autumn?

Martin



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




php-general Digest 29 Dec 2002 14:53:59 -0000 Issue 1791

2002-12-29 Thread php-general-digest-help

php-general Digest 29 Dec 2002 14:53:59 - Issue 1791

Topics (messages 129556 through 129579):

unpack() - how to handle bitfields??
129556 by: Tim Molendijk

Form duplicate post problem
129557 by: Pag
129558 by: Timothy Hitchens (HiTCHO)
129559 by: Pag
129561 by: John W. Holmes
129562 by: Timothy Hitchens (HiTCHO)
129568 by: Pag
129570 by: Michael J. Pawlowsky

Directing to a URL from a radio group
129560 by: Denis L. Menezes
129563 by: John W. Holmes

php.ini ignored!  Re: [PHP] PHP 4.3.0 released
129564 by: omer k

include option and calling only part of a file.
129565 by: Stephen of Blank Canvas
129572 by: John W. Holmes

snmpget
129566 by: Gareth Hastings

PHP 4.3.0, function removed?
129567 by: Detritus
129569 by: Sterling Hughes
129571 by: Detritus
129573 by: gamin

Re: [PHP-DEV] Re: [PHP] PHP 4.3.0 released
129574 by: Rick Widmer

preg_split
129575 by: Mr Nik Frengle

Re: IIS Quit Working
129576 by: Jason Wong

Warning: 1 is not a valid File-Handle resource - HELP!
129577 by: Phil Powell

European daylight saving summer-time.
129578 by: Martin Thoma

PHP 4.3 unable to load php_domxml.dll in WinXP Apache 2.0.43
129579 by: Rui Costa

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--

---BeginMessage---
Hi all,

I'm wrestling with this problem for a while now. I want to read a binary
file (created by C software) using PHP. I know of unpack(). But the C struct
that is stored in the binary file contains variables with bitfields:

struct some_struct {
char val_a : 2
int val_b : 7
}

Such a construct means that val_a is char with a bitfield of 2 and therefore
can contain values between 0 (00 binary) and 3 (11 binary). val_b is an
integer with a range of 0 (000) to 127 (111).

Now the problem is: how on earth do I handle those values with PHP's
unpack()?!? I've tried a lot of syntaxes but none of them seem to work. Can
someone please shortcut whether it is possible or not and if yes, *how*?

Thanks in advance,
Tim



---End Message---
---BeginMessage---

	Hi,

	I am having some problems with duplicate form input.
	I have a form that adds comments to an article, works fine, but if the 
user clicks on refresh, having added a comment previously, the same 
comment is added again. I tried clearing the variables after the database 
write, but the refresh somehow resends the previous values.
	Roughly, heres how my script works: (not using actual code syntax here)

	--
	if {$flag=1 AND $name!='' AND $commentbody!=''){

	inserts the comment into the database
	$flag = 0
	$name = ''
	$comment = ''
	}
	--
	routine to display the article and the existing comments here
	--
	form here
	if user clicks send, puts $flag=1 and calls same page
	--


	How can i prevent these double entries? Some command to definitely clear 
the variables?
	Thanks.

	Pag


---End Message---
---BeginMessage---
There is a very simple solution to this on the page that
does the entries into the database simply to a header redirect
to a new page that displays the success notices etc and if they
do a back or a refresh nothing will happen as the POST data
is on the previous now removed from history page.

header('Location: http://www.yourdomain.com/success.html');

* you will need to put some GET data in the URL to show the correct page.

That will do it for you.

Remember that you can't send output on the database entry page simple
to the database calls and they do the header call as above.



Timothy Hitchens (HiTCHO)
[EMAIL PROTECTED]


If you need PHP hosting with an experienced
support team 24/7 then email me today.

On Sun, 29 Dec 2002, Pag wrote:


   Hi,

   I am having some problems with duplicate form input.
   I have a form that adds comments to an article, works fine, but if the
 user clicks on refresh, having added a comment previously, the same
 comment is added again. I tried clearing the variables after the database
 write, but the refresh somehow resends the previous values.
   Roughly, heres how my script works: (not using actual code syntax here)

   --
   if {$flag=1 AND $name!='' AND $commentbody!=''){

   inserts the comment into the database
   $flag = 0
   $name = ''
   $comment = ''
   }
   --
   routine to display the article and the existing comments here
   --
   form here
   if user clicks send, puts $flag=1 and calls same page
   --


   How can i prevent these double entries? Some command to 

Re: [PHP] Warning: 1 is not a valid File-Handle resource - HELP!

2002-12-29 Thread Rick Emery
The last line cannot be producing the warning; it does not refer to a file.
Please show us the EXACT error message.

Are you certain the file was opened?  Did you try to print $stuff after reading it?  
Did it have the
info you thought it should?

- Original Message -
From: Phil Powell [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Sunday, December 29, 2002 3:08 AM
Subject: [PHP] Warning: 1 is not a valid File-Handle resource - HELP!


Ok, I am a bad coder. :(  I can't figure this out at all:

   $fileID = fopen(nicknames.txt, 'r');
$stuff = fread($fileID, filesize(nicknames.txt)); fclose($fileID);
if (strlen($stuff)  0) $priorNickNewLine = \n;
$nicks = explode(\n, $stuff);

The last line produces the Warning.. why?  I am trying to read contents from 
nicknames.txt and split
according to the newline character so that each nickname is an array element.

What did I do wrong? :(

Phil



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




RE: [PHP] Form duplicate post problem

2002-12-29 Thread Pag



You can still use one page and use a middle-man technique. The part
that processes the form input would redirect back to itself after the
data is inserted into the database, thus getting rid of the post data.
So subsequent refreshes of the page will refresh without attempting to
repost the data.


This post is merely for reference and, hopefully, to help out some 
other person that runs into the same problem.

I solved my duplicate form post problem using that middle-man 
technique you guys mentioned, but i did it in a little more user friendly 
way than using a complete page and redirecting back to the original. (thus 
preventing some design problems on my specific site)

I used some javascript to open a small window, it has the code to 
insert the comment into the database, thanks for the user input and 
immediately closes and refreshes the original, showing that last inserted 
comment. Works very smoothly, and if the user connection is fast enough, he 
doesnt even notice the window.

If anyone needs the code, feel free to email me, ok? I am just not 
posting it because its a bit long, and might unnecessarily clutter the 
list. :-)

Thanks for all the help, guys, you got me in the right direction.

Pag 



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



[PHP] PHP 4.3 unable to load php_domxml.dll in WinXP Apache 2.0.43

2002-12-29 Thread Rui Costa
hi,

Windows XP, Apache 2.0.43(Win32) with PHP 4.3 can't load DLL
'php_domxml.dll'.
it pops-up: Unknown(): unable to load dll'C:\php\extensions\php_domxml.dll'
if I use the old 'php_domxml.dll' from PHP 4.2.4, it works fine. I'm using
libxml2-2.4.30, expat 1.95.4.

by the way, 'libxml2.dll' is not packed in the PHP 4.3 Windows distribution,
although it mentions that it does in the PHP documentation.

thanks in advance
rui



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




[PHP] Formatting text

2002-12-29 Thread Denis L. Menezes
Hello friends,

I have to put results of various departments in our school website. All results will 
go in the Mysql database. The problem is formatting the output. I have output 
something like this where the numbers shown are student marks :

Quote

Passed with Grade A :
Adm nos : 8177   9822  1750  0059

Passed with Grade B :
Adm nos : 6614 8375 0837 1647 5490 3758 7388 7799

Passed with Grade C :
Adm nos : 9968  0298  1297  1254  4208 4911  6194  9903

Unquote

I made a multiline textboxes and used PHP script and input this in a LONGTEXT field in 
MySQL. Then I used PHP to output this field in a webpage. The formatting, carriage 
return, tabs etc are lost. Formatting is very essential in this document for us.

Can someone tell me how to do this?

Thanks
Denis


Re: [PHP] Formatting text

2002-12-29 Thread Michael J. Pawlowsky
Two ways to do this...

One just use

echo pre;
for($i=0; $i  sql-rows; i++){
echo $values['grade'];
echo $values['admno'];
}
echo /pre;

or create a table

table
for($i=0; $i  sql-rows; i++){
tr

td$value['grade']/tdtd$value['grade2']/tdtd$value['grade3']/tdtd$value['grade4']/td
/tr
}
/table


*** REPLY SEPARATOR  ***

On 29/12/2002 at 11:39 PM Denis L. Menezes wrote:

Hello friends,

I have to put results of various departments in our school website. All
results will go in the Mysql database. The problem is formatting the
output. I have output something like this where the numbers shown are
student marks :

Quote

Passed with Grade A :
Adm nos : 8177   9822  1750  0059

Passed with Grade B :
Adm nos : 6614 8375 0837 1647 5490 3758 7388 7799

Passed with Grade C :
Adm nos : 9968  0298  1297  1254  4208 4911  6194  9903

Unquote

I made a multiline textboxes and used PHP script and input this in a
LONGTEXT field in MySQL. Then I used PHP to output this field in a
webpage. The formatting, carriage return, tabs etc are lost. Formatting is
very essential in this document for us.

Can someone tell me how to do this?

Thanks
Denis





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




RE: [PHP] Formatting text

2002-12-29 Thread John W. Holmes
 I have to put results of various departments in our school website.
All
 results will go in the Mysql database. The problem is formatting the
 output. I have output something like this where the numbers shown are
 student marks :
 
 Quote
 
 Passed with Grade A :
 Adm nos : 8177   9822  1750  0059
 
 Passed with Grade B :
 Adm nos : 6614 8375 0837 1647 5490 3758 7388 7799
 
 Passed with Grade C :
 Adm nos : 9968  0298  1297  1254  4208 4911  6194  9903
 
 Unquote
 
 I made a multiline textboxes and used PHP script and input this in a
 LONGTEXT field in MySQL. Then I used PHP to output this field in a
 webpage. The formatting, carriage return, tabs etc are lost.
Formatting is
 very essential in this document for us.

Your problem is that HTML does not recognize newline or tab characters. 

The easy fix is to just surround the line by pre which will cause the
newline and tab elements to show up.

The hard fix, but nicer looking one, is to output your data in a table. 

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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




RE: [PHP] Form duplicate post problem

2002-12-29 Thread John W. Holmes
 You can still use one page and use a middle-man technique. The part
 that processes the form input would redirect back to itself after the
 data is inserted into the database, thus getting rid of the post
data.
 So subsequent refreshes of the page will refresh without attempting
to
 repost the data.
 
  This post is merely for reference and, hopefully, to help out
 some
 other person that runs into the same problem.
 
  I solved my duplicate form post problem using that middle-man
 technique you guys mentioned, but i did it in a little more user
friendly
 way than using a complete page and redirecting back to the original.
(thus
 preventing some design problems on my specific site)
 
  I used some javascript to open a small window, it has the
code to
 insert the comment into the database, thanks for the user input and
 immediately closes and refreshes the original, showing that last
inserted
 comment. Works very smoothly, and if the user connection is fast
enough,
 he
 doesnt even notice the window.
 

Also for reference, but I would recommend to everyone that they not rely
on Javascript and simply do all of this in the main window. With Pop-Up
Blockers and different browser versions, Javascript should be avoided if
possible unless you really know what your audience will be using (or
don't care).

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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




RE: [PHP] Form duplicate post problem

2002-12-29 Thread Pag



Also for reference, but I would recommend to everyone that they not rely
on Javascript and simply do all of this in the main window. With Pop-Up
Blockers and different browser versions, Javascript should be avoided if
possible unless you really know what your audience will be using (or
don't care).


I subscribe to your opinion, i spoke too soon. It seems i cant 
pass the form vars to the new javascript window, and i dont have a clue why 
not!
Quite simply, if instead of opening a new window, i use the exact 
same code on the main window, all the vars are passed, if i use javascript 
to open a new window, no php vars are passed on.
So i apologize for my early cry of victory, it quickly turned into 
a cry of despair. bah. Any ideas on how to get it working? PHP doesnt pass 
vars to javascript new window?

(going for the main window approach for now, thanks john)

Pag 



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



Re: [PHP] Formatting text

2002-12-29 Thread Denis L. Menezes
Thanks John and Michael.

Please note that the following is my code :
Quote :

 if ($result=mysql_query($sql)) {
   $numofrows=mysql_num_rows($result);
 Print Greengrass database has found the following result that matches
your search;
 print  br\n;
 print  br\n;
  while($row=mysql_fetch_array($result)){
 Print   Identity : .$row[GGID].br\n. ;
 Print  Organisation name : .$row[OrgName]. br\n.;
 Print  Organisation country : .$row[OrgCountry]. br\n.;
 Print  Organisation Address : .$row[OrgAddress].br\n. ;
 Print   Results : .$row[Results].br\n;
  print  br\n;
print  br\n;
}

Unquote.

In the above code, I want to format the text in only one field and that is
the field named Results.
Where do I put the PRE /PRE tags for formatting the text contained in
the mysql field Results?

Thanks
Denis
- Original Message -
From: John W. Holmes [EMAIL PROTECTED]
To: 'Denis L. Menezes' [EMAIL PROTECTED]; 'PHP general list'
[EMAIL PROTECTED]
Sent: Monday, December 30, 2002 12:13 AM
Subject: RE: [PHP] Formatting text


  I have to put results of various departments in our school website.
 All
  results will go in the Mysql database. The problem is formatting the
  output. I have output something like this where the numbers shown are
  student marks :
 
  Quote
 
  Passed with Grade A :
  Adm nos : 8177   9822  1750  0059
 
  Passed with Grade B :
  Adm nos : 6614 8375 0837 1647 5490 3758 7388 7799
 
  Passed with Grade C :
  Adm nos : 9968  0298  1297  1254  4208 4911  6194  9903
 
  Unquote
 
  I made a multiline textboxes and used PHP script and input this in a
  LONGTEXT field in MySQL. Then I used PHP to output this field in a
  webpage. The formatting, carriage return, tabs etc are lost.
 Formatting is
  very essential in this document for us.

 Your problem is that HTML does not recognize newline or tab characters.

 The easy fix is to just surround the line by pre which will cause the
 newline and tab elements to show up.

 The hard fix, but nicer looking one, is to output your data in a table.

 ---John W. Holmes...

 PHP Architect - A monthly magazine for PHP Professionals. Get your copy
 today. http://www.phparch.com/



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




Re: [PHP] Formatting text

2002-12-29 Thread Michael J. Pawlowsky

 if ($result=mysql_query($sql)) {
   $numofrows=mysql_num_rows($result);
 Print Greengrass database has found the following result that matches
your search;
 print  br\n;
 print  br\n;

Add this line here --- print pre\n;
No longer need the BRs below---
  while($row=mysql_fetch_array($result)){
 Print   Identity : .$row[GGID].\n. ;
 Print  Organisation name : .$row[OrgName]. \n.;
 Print  Organisation country : .$row[OrgCountry]. \n.;
 Print  Organisation Address : .$row[OrgAddress].\n. ;
 Print   Results : .$row[Results].\n;
  print \n;
print \n;
}

Add this line here --- print pre\n;




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




Re: [PHP] Form duplicate post problem

2002-12-29 Thread Jason Wong
On Sunday 29 December 2002 23:24, Pag wrote:

  This post is merely for reference and, hopefully, to help out some
 other person that runs into the same problem.

  I solved my duplicate form post problem using that middle-man
 technique you guys mentioned, but i did it in a little more user friendly
 way than using a complete page and redirecting back to the original. (thus
 preventing some design problems on my specific site)

  I used some javascript to open a small window, it has the code to
 insert the comment into the database, thanks for the user input and
 immediately closes and refreshes the original, showing that last inserted
 comment. Works very smoothly, and if the user connection is fast enough, he
 doesnt even notice the window.

Maybe I'm missing something here but I'm not sure why you consider it more 
user friendly to pop-up a window (and have it disappear automatically). If I 
was a user I would be thinking what the hell was that?. And if their 
connection was fast enough that they don't even notice the window pop-up  
disappear, and just see the main page refresh how different is that to the 
'one page and use a middle-man technique'?

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

/*
If *I* had a hammer, there'd be no more folk singers.
*/


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




Re: [PHP] Form duplicate post problem

2002-12-29 Thread Pag



Maybe I'm missing something here but I'm not sure why you consider it more
user friendly to pop-up a window (and have it disappear automatically). If I
was a user I would be thinking what the hell was that?. And if their
connection was fast enough that they don't even notice the window pop-up 
disappear, and just see the main page refresh how different is that to the
'one page and use a middle-man technique'?


Ok, i admit my donkeyness. :-P It takes the same time to popup, 
close and refresh, than it does to redirect and refresh.
One thing that popup would prevent would be the browser history, i 
mean, if that popup method worked, if the user clicked on the back 
browser button, it would take him to where he came from. If i use that 
redirect method, the back button takes him to the redirect. Still trying to 
figure that one out. Would be nice to make the browser history forget 
that redirect. :-P
But you are right, Jason, time wise i was wrong in going for the 
popup, not to mention those other very relevant facts john mentioned too.

Pag 



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



[PHP] lstdc++ problem

2002-12-29 Thread Dmitry Demczuk
Hi there,

I'm trying to get PHP 4.3.0 compiled on a SuSE Linux 8.0 box.
./configure goes well but when I try the make command, I get the following 
error message: php /usr/i486-suse-linux/bin/ld: cannot find -lstdc++, and 
the installation fails. The lstdc++ is in the library libstdc, which is 
under /usr/lib.

Does anyone knows how to solve this?

Thanks and cheers
-- 
Dmitry

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




Re: [PHP] Form duplicate post problem

2002-12-29 Thread Jason Wong
On Monday 30 December 2002 01:40, Pag wrote:

  One thing that popup would prevent would be the browser history, i
 mean, if that popup method worked, if the user clicked on the back
 browser button, it would take him to where he came from. If i use that
 redirect method, the back button takes him to the redirect. Still trying to
 figure that one out. Would be nice to make the browser history forget
 that redirect. :-P

I don't think a server redirect shows up on the browser's history list! Try 
it.

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

/*
Politics, as a practice, whatever its professions, has always been the
systematic organisation of hatreds.
-- Henry Adams, The Education of Henry Adams
*/


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




RE: [PHP] Formatting text

2002-12-29 Thread John W. Holmes
 Please note that the following is my code :
 Quote :
 
  if ($result=mysql_query($sql)) {
$numofrows=mysql_num_rows($result);
  Print Greengrass database has found the following result that
 matches
 your search;
  print  br\n;
  print  br\n;
   while($row=mysql_fetch_array($result)){
  Print   Identity : .$row[GGID].br\n. ;
  Print  Organisation name : .$row[OrgName]. br\n.;
  Print  Organisation country : .$row[OrgCountry]. br\n.;
  Print  Organisation Address : .$row[OrgAddress].br\n. ;
  Print   Results : .$row[Results].br\n;
   print  br\n;
 print  br\n;
 }
 
 Unquote.
 
 In the above code, I want to format the text in only one field and
that is
 the field named Results.
 Where do I put the PRE /PRE tags for formatting the text contained
in
 the mysql field Results?

How about around $row[Results]?

print   Results : pre.$row['Results']./prebr\n;

Note the addition of the single quotes, which you should get in the
habit of using (so you don't get Undefined Constant errors on a machine
with a stricter error_reporting() level).

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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




RE: [PHP] Form duplicate post problem

2002-12-29 Thread John W. Holmes
   One thing that popup would prevent would be the browser
 history, i
  mean, if that popup method worked, if the user clicked on the back
  browser button, it would take him to where he came from. If i use
that
  redirect method, the back button takes him to the redirect. Still
trying
 to
  figure that one out. Would be nice to make the browser history
forget
  that redirect. :-P
 
 I don't think a server redirect shows up on the browser's history
list!
 Try
 it.

Yeah, you should be using a header() redirect, not a javascript or META
REFRESH redirect...

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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




RE: [PHP] Formatting text

2002-12-29 Thread Maciek Ruckgaber Bielecki
have alook at this one, i have one prob, dont know how your 'Results'
field does look like so i used ' '(or space) separator

hope it helps :-)
?php

  if ($result=mysql_query($sql))
  {
$numofrows=mysql_num_rows($result);
Print Greengrass database has found the following result that matches
your search;
print  br\n;
print  br\n;
  }

   $content = table;
  while($row=mysql_fetch_array($result))
  {
$content .= trtdbIdentity : /b.$row['GGID']./td/tr\n
 .= trtdbOrganisation name :/b
.$row['OrgName']./td/tr\n
 .= trtdbOrganisation country :
/b.$row['OrgCountry']. /td/tr\n
 .= trtdbOrganisation Address :
/b.$row['OrgAddress']./td/tr\n;

$content .=trtdtabletrtdbResults:/b/td;

// sorry, dont know which separator you can use exactly, i lost your
previous code
$results = explode(' ',$row['Results']);
foreach($results as $value)
{
  $content .=td$value/td;
}

$content .=/tr/table/td/tr/tablebr /;
  }
?

--
Few are those who see with their own eyes and feel with their own
hearts.
Albert Einstein
-
Maciek Ruckaber Bielecki





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




Re: [PHP] IIS Quit Working

2002-12-29 Thread Stephen
Ok, I reinstalled IIS 5 and PHP 4.3 and it's working but the sessions
aren't.  I get this error:


Warning: session_start() [function.session-start]:
open(/tmp\sess_b400575a818f9bb0361b06dad912410c, O_RDWR) failed: No such
file or directory (2) in c:\inetpub\wwwroot\pcu\index.php on line 1

I haven't edited the php.ini file yet but I'm not sure what to set it to.
Right now it says this:

session.save_path = /tmp

What should it be for Windows XP Pro?


- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, December 29, 2002 3:16 AM
Subject: Re: [PHP] IIS Quit Working


: On Sunday 29 December 2002 09:14, Stephen wrote:
:  Since I like new things and all, I decided to download and install PHP
4.3.
:  Before, I had the latest (4.2.3) and IIS worked fine. But then, after
:  uninstalling PHP and installing the new one, it just quit working. I go
to
:  http://localhost/ and nothing comes up except a This page cannot be
:  displayed thing since I'm using IE. Any ideas why this is happening?
:
: Turn on error reporting and log to file and examine it for any clues.
:
: --
: Jason Wong - Gremlins Associates - www.gremlins.biz
: Open Source Software Systems Integrators
: * Web Design  Hosting * Internet  Intranet Applications Development *
:
: /*
: You can tell how far we have to go, when FORTRAN is the language of
: supercomputers.
: -- Steven Feiner
: */
:
:
: --
: PHP General Mailing List (http://www.php.net/)
: To unsubscribe, visit: http://www.php.net/unsub.php
:
:
:



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




RE: [PHP] IIS Quit Working

2002-12-29 Thread John W. Holmes
 Ok, I reinstalled IIS 5 and PHP 4.3 and it's working but the sessions
 aren't.  I get this error:
 
 
 Warning: session_start() [function.session-start]:
 open(/tmp\sess_b400575a818f9bb0361b06dad912410c, O_RDWR) failed: No
such
 file or directory (2) in c:\inetpub\wwwroot\pcu\index.php on line 1
 
 I haven't edited the php.ini file yet but I'm not sure what to set it
to.
 Right now it says this:
 
 session.save_path = /tmp
 
 What should it be for Windows XP Pro?

It can be any directory that IIS can write to. 

c:/php/sessions/ (if that folder exists)

works just fine. The IUSR_computername user on your computer must have
permission to write to that directory. 

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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




Re: [PHP] IIS Quit Working

2002-12-29 Thread Stephen
I found on the official site that C:\WINDOWS\Temp works well too...


- Original Message - 
From: John W. Holmes [EMAIL PROTECTED]
To: 'Stephen' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Sunday, December 29, 2002 2:05 PM
Subject: RE: [PHP] IIS Quit Working


:  Ok, I reinstalled IIS 5 and PHP 4.3 and it's working but the sessions
:  aren't.  I get this error:
:  
:  
:  Warning: session_start() [function.session-start]:
:  open(/tmp\sess_b400575a818f9bb0361b06dad912410c, O_RDWR) failed: No
: such
:  file or directory (2) in c:\inetpub\wwwroot\pcu\index.php on line 1
:  
:  I haven't edited the php.ini file yet but I'm not sure what to set it
: to.
:  Right now it says this:
:  
:  session.save_path = /tmp
:  
:  What should it be for Windows XP Pro?
: 
: It can be any directory that IIS can write to. 
: 
: c:/php/sessions/ (if that folder exists)
: 
: works just fine. The IUSR_computername user on your computer must have
: permission to write to that directory. 
: 
: ---John W. Holmes...
: 
: PHP Architect - A monthly magazine for PHP Professionals. Get your copy
: today. http://www.phparch.com/
: 
: 
: 
: -- 
: PHP General Mailing List (http://www.php.net/)
: To unsubscribe, visit: http://www.php.net/unsub.php
: 
: 
: 


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




RE: [PHP] Form duplicate post problem

2002-12-29 Thread Pag



Yeah, you should be using a header() redirect, not a javascript or META
REFRESH redirect...


Well, i tried, but i get an error saying that all the headers were 
already sent to the browser. :-P
I used:

header('Location: http://www.blahblah.com etc');


I placed this header right after all the database writes.

Pag 



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



Re: [PHP] IIS Quit Working

2002-12-29 Thread Michael J. Pawlowsky
Wherever you want them...  C:\windows\temp if you have that.

win??? does not have a /tmp directory link *nix boxes do, so just give it a valid 
directory to write to where you don;t mind having a bunch of session files.



session.save_path = /tmp

What should it be for Windows XP Pro?


- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, December 29, 2002 3:16 AM
Subject: Re: [PHP] IIS Quit Working


: On Sunday 29 December 2002 09:14, Stephen wrote:
:  Since I like new things and all, I decided to download and install PHP
4.3.
:  Before, I had the latest (4.2.3) and IIS worked fine. But then, after
:  uninstalling PHP and installing the new one, it just quit working. I go
to
:  http://localhost/ and nothing comes up except a This page cannot be
:  displayed thing since I'm using IE. Any ideas why this is happening?
:
: Turn on error reporting and log to file and examine it for any clues.
:
: --
: Jason Wong - Gremlins Associates - www.gremlins.biz
: Open Source Software Systems Integrators
: * Web Design  Hosting * Internet  Intranet Applications Development *
:
: /*
: You can tell how far we have to go, when FORTRAN is the language of
: supercomputers.
: -- Steven Feiner
: */
:
:
: --
: PHP General Mailing List (http://www.php.net/)
: To unsubscribe, visit: http://www.php.net/unsub.php
:
:
:



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





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




RE: [PHP] Form duplicate post problem

2002-12-29 Thread Michael J. Pawlowsky
2 ways around that.. make sure you send that before any other ouput...  Even empty 
lines etc In other words nothing before ?php and nothing after ? Not ever a 
carriage return.

or start of with ob_start() and end with ob_end_flush();



*** REPLY SEPARATOR  ***

On 29/12/2002 at 7:12 PM Pag wrote:


Yeah, you should be using a header() redirect, not a javascript or META
REFRESH redirect...

 Well, i tried, but i get an error saying that all the headers
were
already sent to the browser. :-P
 I used:

 header('Location: http://www.blahblah.com etc');


 I placed this header right after all the database writes.

 Pag



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





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




RE: [PHP] Form duplicate post problem

2002-12-29 Thread John W. Holmes
 Yeah, you should be using a header() redirect, not a javascript or
META
 REFRESH redirect...
 
  Well, i tried, but i get an error saying that all the headers
 were
 already sent to the browser. :-P
  I used:
 
  header('Location: http://www.blahblah.com etc');
 
 
  I placed this header right after all the database writes.

Well, yeah, the idea is that you don't output anything on the
middle-man page, only do your inserts and that's it. 

The error message tells you exactly where the output is starting, if
that's a mystery to you (output started in file.php:2 means line 2 of
file.php).

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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




[PHP] Re: Problem with REQUIRE in PHP 4.3.0

2002-12-29 Thread gamin

Bi®‰øáÎ ë‰ërÏ èÊ [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello,

   I try to compile PHP 4.3.0 on OpenBSD 3.1. Compilation is OK, PHP
   runs, but not work REQUIRE and INCLUDE

   Fatal error: main() [function.main]: Failed opening required
'./libraries/grab_globals.lib.php' (include_path='.:/usr/local/lib/php')


You could try adding the path of the grab_globals.lib.php (or that of all of
all the lib files) in the php.ini file in the directive include_path like
this :

include_path =
.:/usr/local/lib/php:/some/other/path:/absoute/path/to/your/lib/dir

I dont yet have PHP 4.3.0 so this is from ver 4.0.6

HTH
gamin.



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




RE: [PHP] Form duplicate post problem

2002-12-29 Thread Jason Sheets
You can also enable output buffering on your middle page, this will
allow you to output data and set cookies, send headers, etc at any point
in your script.

You can enable output buffering globally with php.ini, with an .htaccess
for specific directories or use the output buffering functions to enable
them for just a script or even part of a script.


Jason
On Sun, 2002-12-29 at 12:29, John W. Holmes wrote:
  Yeah, you should be using a header() redirect, not a javascript or
 META
  REFRESH redirect...
  
   Well, i tried, but i get an error saying that all the headers
  were
  already sent to the browser. :-P
   I used:
  
   header('Location: http://www.blahblah.com etc');
  
  
   I placed this header right after all the database writes.
 
 Well, yeah, the idea is that you don't output anything on the
 middle-man page, only do your inserts and that's it. 
 
 The error message tells you exactly where the output is starting, if
 that's a mystery to you (output started in file.php:2 means line 2 of
 file.php).
 
 ---John W. Holmes...
 
 PHP Architect - A monthly magazine for PHP Professionals. Get your copy
 today. http://www.phparch.com/
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


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




[PHP] Re: Warning: 1 is not a valid File-Handle resource - HELP!

2002-12-29 Thread gamin

Phil Powell [EMAIL PROTECTED] wrote in message
021801c2af19$e05909d0$2aaf6244@scandinawa1bo6">news:021801c2af19$e05909d0$2aaf6244@scandinawa1bo6...
Ok, I am a bad coder. :(  I can't figure this out at all:

   $fileID = fopen(nicknames.txt, 'r');
$stuff = fread($fileID, filesize(nicknames.txt)); fclose($fileID);
if (strlen($stuff)  0) $priorNickNewLine = \n;
$nicks = explode(\n, $stuff);

--snip--

I would recommend you to always check if the file was opened successfully.
Simply add this after your fopen..
if ($fileID === false) { // 3 '=' signs checks
variable type and value
die(Error opening file. $php_errormsg); // you will need
track_errors = ON in php.ini to use $php_errormsg.

HTN

gamin.



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




RE: [PHP] Form duplicate post problem

2002-12-29 Thread Pag

	Got it to work. I removed everything except the PHP script. Works like a 
charm, no problem on the browser back button.
	Great help from you guys. Thanks a lot!

	Pag



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



[PHP] Re: php.ini ignored! Re: [PHP] PHP 4.3.0 released

2002-12-29 Thread Michael Mauch
In php.dev Omer K [EMAIL PROTECTED] wrote:
 redhat, apache2.0.43 (as dso).  compiles and runs without a problem
 
 php4.3.0release fails to utilize php.ini settings. ignores changes to the
 ini file.
 
 ./configure --with-config-file-path=/usr/local/apache2/conf/php.ini --with-a
 pxs2=/usr/local/apache2/bin/apxs --with-mysql   (got no errors)

Does it help if you use --with-config-file-path=/usr/local/apache2/conf
instead?

Regards...
Michael

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




[PHP] Embedding image a PHP file

2002-12-29 Thread empty
Hi

Anybody knows how to embed a image file to a php file, not as html;

for example;

img src=yy.php /

embedding a image file in yy.php file.

Thanks everybody


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




Re: [PHP] Embedding image a PHP file

2002-12-29 Thread justin gruenberg
yy.php should contain
?php
header(Content-type: image/jpeg);  /* or gif or whatever... you can 
also take a look at getimagesize() to get the type of the image 
automatically */
readfile(THE FILE);
?

it's extremely important that there is no whitespace before the ?php 
tag and after the ? tag.

empty wrote:

Hi

Anybody knows how to embed a image file to a php file, not as html;

for example;

img src=yy.php /

embedding a image file in yy.php file.

Thanks everybody


 



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




[PHP] Load Data Infile

2002-12-29 Thread Anthony Ritter
Off topic but I hope somebody can help.

Using MS Win98 / mySQL.

I'm trying to use LOAD DATA INFILE and coming up empty.

My text file is named:

test.txt
..

and is stored in C:\TextFiles

on the command line I type:
..
mysql  LOAD DATA INFILE C:\TextFiles\test.txt INTO TABLE tony;

...
I get:

ERROR 1105 File c:\TextFile\ est.txt not found (Errcode:2)

\\please note that the t in test is not there.

Any help would be greatly appreciated.
Happy holidays,
Tony Ritter



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




Re: [PHP] Load Data Infile

2002-12-29 Thread Marco Tabini
I'm not sure how MySQL works under Windows, but you should either use
double backslashes (\\) instead of single backslashes or use forward
slashes (/) instead. MySQL is trying to escape your string.

Cheers,


Marco
-- 

php|architect - The Magazine for PHP Professionals
The monthly magazine dedicated to the world of PHP programming

Check us out on the web at http://www.phparch.com!

---BeginMessage---
Off topic but I hope somebody can help.

Using MS Win98 / mySQL.

I'm trying to use LOAD DATA INFILE and coming up empty.

My text file is named:

test.txt
..

and is stored in C:\TextFiles

on the command line I type:
..
mysql  LOAD DATA INFILE C:\TextFiles\test.txt INTO TABLE tony;

...
I get:

ERROR 1105 File c:\TextFile\ est.txt not found (Errcode:2)

\\please note that the t in test is not there.

Any help would be greatly appreciated.
Happy holidays,
Tony Ritter



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



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


[PHP] Re: PHP 4.3 unable to load php_domxml.dll in WinXP Apache 2.0.43

2002-12-29 Thread Dirk Schiefke
Same applies here using
XP pro SP1, apache 1.3.27

no dll will load even if the extensions path is set to the correct dir
in this case 
J:\php-4.3.0\extensions - where they reside

dirk


On Sun, 29 Dec 2002 14:38:51 -, [EMAIL PROTECTED] (Rui Costa) wrote:
 hi,
 
 Windows XP, Apache 2.0.43(Win32) with PHP 4.3 can't load DLL
 'php_domxml.dll'.
 it pops-up: Unknown(): unable to load dll'C:\php\extensions\php_domxml.dll'
 if I use the old 'php_domxml.dll' from PHP 4.2.4, it works fine. I'm using
 libxml2-2.4.30, expat 1.95.4.
 
 by the way, 'libxml2.dll' is not packed in the PHP 4.3 Windows distribution,
 although it mentions that it does in the PHP documentation.
 
 thanks in advance
 rui
 
 




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




[PHP] using mail() with .info emails?

2002-12-29 Thread Joe Popovich
Im trying to send email using mail() to a .info email address and get an 
error message. I assume the function parses the email address and doesnt 
accept anything that isnt the customary .net, .com, etc. addresses. How can 
I get around this?

Thanks

joe Popovich





_
The new MSN 8: smart spam protection and 3 months FREE*. 
http://join.msn.com/?page=features/junkmailxAPID=42PS=47575PI=7324DI=7474SU= 
http://www.hotmail.msn.com/cgi-bin/getmsgHL=1216hotmailtaglines_smartspamprotection_3mf


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



Re: [PHP] Load Data Infile

2002-12-29 Thread Anthony Ritter
Marco Tabini [EMAIL PROTECTED] wrote in message:

 I'm not sure how MySQL works under Windows, but you should either use
 double backslashes (\\) instead of single backslashes or use forward
 slashes (/) instead. MySQL is trying to escape your string.

 Cheers,
 Marco


Thanks Marco.

C:\\TextFiles\\test.txt

works now

Happy new year to you and yours...
TR




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




Re: [PHP] using mail() with .info emails?

2002-12-29 Thread Johannes Schlueter
On Sunday 29 December 2002 23:45, Joe Popovich wrote:
 Im trying to send email using mail() to a .info email address and get an
 error message. I assume the function parses the email address and doesnt
 accept anything that isnt the customary .net, .com, etc. addresses. How can
 I get around this?

Usually it should work. Maybe a spam-filter from your provider or sth. like 
that. What kind of error message do you recieve?

johannes

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




[PHP] Rookie mail() q's .. can't find answer after RTFM...

2002-12-29 Thread -[ Rene Brehmer ]-
Hi y'all

I'm probably trying to do something ridicolously trivial, but here goes:

I'm building a form for sending mail of my website. The idea is simply
that people plop in their address, the message, and pick a subject line,
and then click send.

It will then show how the message will look, and people will then have the
option to either correct it, send it there and then, or just dump the
whole enchilada...

Q 1:

Well, building the form and making the page preview the message is the
easy part. But how do I make the page retain the message so that I can 1.
actually send the thing after the second submit, and 2. make it fill out
the form when user wish to alter message (or there's an error) ???

This is the code for the preview part (HTML + PHP):

span class=txtThis is the message as it will look with all
headers:/span
pre?php
$to = [EMAIL PROTECTED];
$from = Metalbunny website [EMAIL PROTECTED];
$replyto = $HTTP_POST_VARS['sender'];
$subject = $HTTP_POST_VARS['subject'];
$message = $HTTP_POST_VARS['message'];
$headers = MIME-Version: 1.0\r\n;
$headers .= Content-type: text/ascii;
charset=iso-8859-1\r\n;
$headers .= From: .$from.\r\n;
$headers .= Reply-to: .$replyto.\r\n;

echo(To: .$to.\n);
echo(From: .$from.\n);
echo(Reply-to: .$replyto.\n);
echo(Subject: .$subject.\n);
echo(X-Mailer: PHP/.phpversion().\n);
echo(MIME-version: 1.0\n);
echo(Content-type: text/ascii; charset=iso-8859-1\n);
echo(\n.$message);
  ?
/prebr
br
span class=txtDo you wish to send this message?/spanbr
form method=post
  button name=send value=true type=submitYes, send
it/button
  button name=correct value=true type=submitNah, let me
correct it/button
  button name=cancel value=true type=submitNever
mind.../button
/form

The first button is to actually send the message, and show the Thank you
page, the second is to reload the form and fill out the fields. Haven't
figured out how to work the last button.

Q 2:

The manual doesn't really say it that clearly, but do I need to have the
content-type field when the message is plain text already?
And should I be adding a Date: field, or does the mail() function figure
that out itself?

My incoming mail server does not accept messages without a date field, so
if I need to add it, I'd really like to know. It also doesn't like
messages with more than 1 of each field...(except received-by).


TIA

Rene
-- 
Rene Brehmer

This message was written on 100% recycled spam.

Come see! My brand new site is now online!
http://www.metalbunny.net

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




Re: [PHP] Rookie mail() q's .. can't find answer after RTFM...

2002-12-29 Thread Sean Burlington
-[ Rene Brehmer ]- wrote:



Q 1:

Well, building the form and making the page preview the message is the
easy part. But how do I make the page retain the message so that I can 1.
actually send the thing after the second submit, and 2. make it fill out
the form when user wish to alter message (or there's an error) ???



either put the fields you want as hidden fields in the preview page

or

store them as session variables



Q 2:

The manual doesn't really say it that clearly, but do I need to have the
content-type field when the message is plain text already?


plain text is the default


And should I be adding a Date: field, or does the mail() function figure
that out itself?


I'm not sure - have you tried it ?



My incoming mail server does not accept messages without a date field, so
if I need to add it, I'd really like to know. It also doesn't like
messages with more than 1 of each field...(except received-by).



just look at an email in your inbox and copy the format of the date field.

--

Sean :)



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




Re: [PHP] Rookie mail() q's .. can't find answer after RTFM...

2002-12-29 Thread Michael J. Pawlowsky

You will need to edit it for your server, remove some stuff etc...
But this should get you going...


HTML
HEAD
TITLERC Online Canada - Feedback Form/TITLE
link href=../style.html rel=stylesheet type=text/css
/HEAD

body

center
H1Contact RC Online Canada/H1
/center
p
center
img src=../images/bpix.gif height=2 width=80%
/center
p

center

?php

require(../lib/util.php);

function is_valid_email($email) {
if(ereg(([[:alnum:]\.\-]+)(\@[[:alnum:]\.\-]+\.+), $email)) {
return 1;
} else {
return 0;
}
}

if (isset($_POST['action'])) {

$sql = new MySQL_class;
$sql-Create(rconline_ca);

// Lets get some info on who we have
$sql-QueryRow(SELECT contact_fname, contact_lname, contact_email FROM 
club_info WHERE TRIM(LOWER(uname)) LIKE TRIM(LOWER('$_SERVER[PHP_AUTH_USER]')));
if ($sql-rows == 0) {
ErrorMsg($_SERVER[PHP_AUTH_USER] was not found in the database);
Exit();
}
$row=$sql-data;

if (!(is_valid_email($row[contact_email]))) {
ErrorMsg(Invalid e-mail address '$row[contact_email]' in database. 
Please update you information before using this service.);
Exit();
}

$frommail = strtolower(trim($row[contact_email]));
$fromname = $row[contact_fname] $row[contact_lname];

ini_set(sendmail_path, /usr/lib/sendmail -t -i);
ini_set(sendmail_from, $frommail);

$tomail = [EMAIL PROTECTED];
$toname = Webmaster;

$message = $_POST[comment]\n\n;
$subject = $_POST[subject];

$headers= MIME-Version: 1.0\r\n;
$headers.= From: $fromname $frommail\r\n;
if ($_POST[cc]){
$headers.= Cc: $fromname $frommail\r\n;
}
$headers.= Reply-To: $fromname $frommail\r\n;
$headers.= X-Mailer: R/C Online Canada WebMail v1.B\r\n;
$headers.= Content-type: text/plain; charset=iso-8859-1\r\n;
$headers.= X-Priority: 1\r\n;
$headers.= X-MSMail-Priority: High\r\n;

if (mail($toname $tomail, $subject, $message, $headers))
{
echo pbYour comments have been sent/b/p;
echo pThank you for your interest in RC Online Canada/p;
if ($_POST[cc]){
echo pA copy has also been sent to: $fromname 
$frommail/p\r\n;
}
}else{
echo Failed to send e-mail.;
echo p;
echo Please contact [EMAIL PROTECTED];
echo p FORMINPUT TYPE=\Button\ VALUE=\Back\ 
onClick=\history.go(-1)\/FORM;
}


} else {

echo form action=\$PHP_SELF\ method=\post\;
echo input type=\hidden\ name=\action\ value=\1\;

echo p;

echo table;
echo trtd;
echo Subject: /tdtd;
echo select name=\subject\\n;
echo   optionBug Report/option\n;
echo   optionGeneral Comment/option\n;
echo   option selectedNew Forum Request/option\n;
echo   optionFeature Request/option\n;
echo /select\n;
echo /td/tr\n;

echo tr;
echo td valign=\top\Message:/td;
echo tdtextarea  name=\comment\ cols=\60\ 
rows=\10\/textarea/td;
echo /tr;

echo trtd;
echo Copy to myself: /tdtd;
echo input name=\cc\ type=\checkbox\ value=\1\ checked\n;
echo /td/tr\n;


echo /table;

echo p;
echo center;
echo img src=\/images/bpix.gif\ height=\2\ width=\80%\;
echo /center;
echo p;

echo input type=\submit\ value=\Submit\;

echo /form;

}
?

/center
/BODY
/HTML


*** REPLY SEPARATOR  ***

On 30/12/2002 at 1:30 AM -[ Rene Brehmer ]- wrote:

Hi y'all

I'm probably trying to do something ridicolously trivial, but here goes:

I'm building a form for sending mail of my website. The idea is simply
that people plop in their address, the message, and pick a subject line,
and then click send.




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




Re: [PHP] Dropping Tables

2002-12-29 Thread Michael J. Pawlowsky


Basically just do a a php script the sends the sql show tables;

Then do a strchr() to see if a is the first letter in the resuts and if so do a 
delete table.

Just yo play safe do a dump of your db first.





Cheers,
Mike




*** REPLY SEPARATOR  ***

On 29/12/2002 at 7:57 PM Steve Buehler wrote:

I have researched this and can't find an answer.  Maybe I am just looking
in the wrong places or not putting the correct keywords into the search
engines.  So any help would be greatly appreciated.  I am using MySQL with
PHP.
   I have some PHP scripts that create tables in a database that are meant
to
be temporary but can't actually create TEMPORARY tables to do the
job.  That isn't the problem in itself.  The problem is that sometimes if
the script is stopped prematurely, it doesn't get to the drop table
function in it.  All of the tables that are created for this start with an
a and follow with a random number.  What I need to do is to create a
script that I can run that will delete all tables that start with an a
in
the database.  Again, since the table name is randomly generated except
for
the starting a, I will need the script to find them and drop them.
   Has anybody done this before?  I would sure appreciate some help here.

Thanks
Steve


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
ow3


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





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




[PHP] imap_set_quota function

2002-12-29 Thread Roger Thomas
an excerpt from php man pages says that:

This function requires the imap_stream to have been opened as the mail
administrator account. It will not work if opened as any other user.
...
...
$mbox = imap_open ({your.imap.host:143}, mailadmin, password);



my question is, where do i set this admin called 'mailadmin' with password
'password'. do i set it in courier/uw for example? 

--




__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




RE: [PHP] Dropping Tables

2002-12-29 Thread John W. Holmes
 Basically just do a a php script the sends the sql show tables;
 
 Then do a strchr() to see if a is the first letter in the resuts and
if
 so do a delete table.
 
 Just yo play safe do a dump of your db first. 


Or even better, use SHOW TABLES LIKE 'a%' to just get the a* tables and
drop each one. 

How do you know whether it's an active a* table or not? Will you be
dropping a table that someone is actually using?

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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




php-general Digest 30 Dec 2002 03:21:26 -0000 Issue 1792

2002-12-29 Thread php-general-digest-help

php-general Digest 30 Dec 2002 03:21:26 - Issue 1792

Topics (messages 129580 through 129622):

Re: Warning: 1 is not a valid File-Handle resource - HELP!
129580 by: Rick Emery
129605 by: gamin

Re: Form duplicate post problem
129581 by: Pag
129585 by: John W. Holmes
129586 by: Pag
129589 by: Jason Wong
129590 by: Pag
129592 by: Jason Wong
129594 by: John W. Holmes
129599 by: Pag
129601 by: Michael J. Pawlowsky
129602 by: John W. Holmes
129604 by: Jason Sheets
129606 by: Pag

Formatting text
129582 by: Denis L. Menezes
129583 by: Michael J. Pawlowsky
129584 by: John W. Holmes
129587 by: Denis L. Menezes
129588 by: Michael J. Pawlowsky
129593 by: John W. Holmes
129595 by: Maciek Ruckgaber Bielecki

lstdc++ problem
129591 by: Dmitry Demczuk

Re: IIS Quit Working
129596 by: Stephen
129597 by: John W. Holmes
129598 by: Stephen
129600 by: Michael J. Pawlowsky

Re: Problem with REQUIRE in PHP 4.3.0
129603 by: gamin

Re: php.ini ignored!  Re: [PHP] PHP 4.3.0 released
129607 by: Michael Mauch

Embedding image a PHP file
129608 by: empty
129610 by: justin gruenberg

Re: PHP 4.3 unable to load php_domxml.dll in WinXP Apache 2.0.43
129609 by: Dirk Schiefke

Load Data Infile
129611 by: Anthony Ritter
129612 by: Marco Tabini
129614 by: Anthony Ritter

using mail() with .info emails?
129613 by: Joe Popovich
129615 by: Johannes Schlueter

Rookie mail() q's .. can't find answer after RTFM...
129616 by: -[ Rene Brehmer ]-
129617 by: Sean Burlington
129618 by: Michael J. Pawlowsky

Dropping Tables
129619 by: Steve Buehler
129620 by: Michael J. Pawlowsky
129622 by: John W. Holmes

imap_set_quota function
129621 by: Roger Thomas

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--

---BeginMessage---
The last line cannot be producing the warning; it does not refer to a file.
Please show us the EXACT error message.

Are you certain the file was opened?  Did you try to print $stuff after reading it?  
Did it have the
info you thought it should?

- Original Message -
From: Phil Powell [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Sunday, December 29, 2002 3:08 AM
Subject: [PHP] Warning: 1 is not a valid File-Handle resource - HELP!


Ok, I am a bad coder. :(  I can't figure this out at all:

   $fileID = fopen(nicknames.txt, 'r');
$stuff = fread($fileID, filesize(nicknames.txt)); fclose($fileID);
if (strlen($stuff)  0) $priorNickNewLine = \n;
$nicks = explode(\n, $stuff);

The last line produces the Warning.. why?  I am trying to read contents from 
nicknames.txt and split
according to the newline character so that each nickname is an array element.

What did I do wrong? :(

Phil



---End Message---
---BeginMessage---

Phil Powell [EMAIL PROTECTED] wrote in message
021801c2af19$e05909d0$2aaf6244@scandinawa1bo6">news:021801c2af19$e05909d0$2aaf6244@scandinawa1bo6...
Ok, I am a bad coder. :(  I can't figure this out at all:

   $fileID = fopen(nicknames.txt, 'r');
$stuff = fread($fileID, filesize(nicknames.txt)); fclose($fileID);
if (strlen($stuff)  0) $priorNickNewLine = \n;
$nicks = explode(\n, $stuff);

--snip--

I would recommend you to always check if the file was opened successfully.
Simply add this after your fopen..
if ($fileID === false) { // 3 '=' signs checks
variable type and value
die(Error opening file. $php_errormsg); // you will need
track_errors = ON in php.ini to use $php_errormsg.

HTN

gamin.



---End Message---
---BeginMessage---



You can still use one page and use a middle-man technique. The part
that processes the form input would redirect back to itself after the
data is inserted into the database, thus getting rid of the post data.
So subsequent refreshes of the page will refresh without attempting to
repost the data.


This post is merely for reference and, hopefully, to help out some 
other person that runs into the same problem.

I solved my duplicate form post problem using that middle-man 
technique you guys mentioned, but i did it in a little more user friendly 
way than using a complete page and redirecting back to the original. (thus 
preventing some design problems on my specific site)

I used some javascript to open a small window, it has the code to 
insert the comment into the database, thanks for the user input and 
immediately closes and refreshes the original, showing that last inserted 
comment. Works very 

Re: [PHP] imap_set_quota function

2002-12-29 Thread Michael Sims
On Sun, 29 Dec 2002 18:26:01 -0800 (PST), you wrote:

This function requires the imap_stream to have been opened as the mail
administrator account. It will not work if opened as any other user.
[...]
my question is, where do i set this admin called 'mailadmin' with password
'password'. do i set it in courier/uw for example? 

Yes, you need to give imap_set_quota() a username and password of an
account that has administrator privileges on your IMAP server.  If you
were using Cyrus IMAP you'd use an account that's specified in the
admins section of /etc/imapd.conf.  I don't know how this is handled
in Courier or UW, but I assume the mechanisms are similar.  I suggest
checking the documentation for your particular IMAP server...

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




[PHP] Dropping Tables

2002-12-29 Thread Steve Buehler
	I have researched this and can't find an answer.  Maybe I am just looking 
in the wrong places or not putting the correct keywords into the search 
engines.  So any help would be greatly appreciated.  I am using MySQL with PHP.
	I have some PHP scripts that create tables in a database that are meant to 
be temporary but can't actually create TEMPORARY tables to do the 
job.  That isn't the problem in itself.  The problem is that sometimes if 
the script is stopped prematurely, it doesn't get to the drop table 
function in it.  All of the tables that are created for this start with an 
a and follow with a random number.  What I need to do is to create a 
script that I can run that will delete all tables that start with an a in 
the database.  Again, since the table name is randomly generated except for 
the starting a, I will need the script to find them and drop them.
	Has anybody done this before?  I would sure appreciate some help here.

Thanks
Steve


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
ow3


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



RE: [PHP] Dropping Tables

2002-12-29 Thread Steve Buehler
Thank You so much John and Michael.  SHOW TABLES LIKE 'a%' worked like a 
charm and was exactly what I was looking for.  I guess my searches were 
using the wrong keywords.  Kind of figures.  Some of my searches were 
turning up 1000's of results.


How do you know whether it's an active a* table or not?  Will you be
dropping a table that someone is actually using?


I will be shutting down the script at a certain time each day to run some 
things like this for maintenance.  So none of these should be active and if 
they are, it won't hurt anything.   The customer can just wait until the 
maintenance time is over.  Approximately 10 mintues.

At 10:21 PM 12/29/2002 -0500, you wrote:
 Basically just do a a php script the sends the sql show tables;

 Then do a strchr() to see if a is the first letter in the resuts and
if
 so do a delete table.

 Just yo play safe do a dump of your db first.


Or even better, use SHOW TABLES LIKE 'a%' to just get the a* tables and
drop each one.

How do you know whether it's an active a* table or not? Will you be
dropping a table that someone is actually using?

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
ow3




--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
ow3


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




Re: [PHP] PHP 4.3 unable to load php_domxml.dll in WinXP Apache 2.0.43

2002-12-29 Thread Davy Obdam
Hi Rui,

I have Windows XP, Apache 2.0.43 and PHP 4.3.0 also. My php_domxml.dll 
extension works just fine. Did u copy all files from c:\php\dlls to your 
c:\WINDOWS\system32 directory? Also is your extensions path is set to 
c:\php\extensions in your php.ini file? I hope that works.

Best regards,

Davy Obdam
mailto:[EMAIL PROTECTED]

Rui Costa wrote:
hi,

Windows XP, Apache 2.0.43(Win32) with PHP 4.3 can't load DLL
'php_domxml.dll'.
it pops-up: Unknown(): unable to load dll'C:\php\extensions\php_domxml.dll'
if I use the old 'php_domxml.dll' from PHP 4.2.4, it works fine. I'm using
libxml2-2.4.30, expat 1.95.4.

by the way, 'libxml2.dll' is not packed in the PHP 4.3 Windows distribution,
although it mentions that it does in the PHP documentation.

thanks in advance
rui








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




Re: [PHP] Re: Problem with REQUIRE in PHP 4.3.0

2002-12-29 Thread Bc. Radek Krejca
Hello,

  no, I didn't try it. But I compile all versions before and no
  problem. And I have computer with very similar configuration - work.
  On machine with OpenBSD 3.0 PHP 4.3.0 works, on machines with BSD
  3.1 not but I don't know why. What I may check?

g You could try adding the path of the grab_globals.lib.php (or that of all of
g all the lib files) in the php.ini file in the directive include_path like
g this :

g include_path =
g .:/usr/local/lib/php:/some/other/path:/absoute/path/to/your/lib/dir

g I dont yet have PHP 4.3.0 so this is from ver 4.0.6

Thanks
Radek



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




[PHP] Clear file or write to file erasing all old content

2002-12-29 Thread Noodle Snacks
I can't seem to figure out how to write to a file deleting the old content.
Sorry I can't find which function/functions to RTFM




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




Re: [PHP] Clear file or write to file erasing all old content

2002-12-29 Thread jason perkins
on 12/30/02 at 6:02 PM, Noodle Snacks [EMAIL PROTECTED] wrote:


 I can't seem to figure out how to write to a file deleting the old content.
 Sorry I can't find which function/functions to RTFM

It's specified with the mode parameter in the fopen function:

http://www.php.net/manual/en/function.fopen.php



--
Jason Perkins
url - http://www.somebodydial911.com/

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




Re: [PHP] Clear file or write to file erasing all old content

2002-12-29 Thread Noodle Snacks
Thanks,

Its just one of those things I miss sometimes...

Jason Perkins [EMAIL PROTECTED] wrote in message
news:r01050400-1023-A17E17A81BC511D7B4D4000393D5F61C@[192.168.1.3]...
 on 12/30/02 at 6:02 PM, Noodle Snacks [EMAIL PROTECTED] wrote:


  I can't seem to figure out how to write to a file deleting the old
content.
  Sorry I can't find which function/functions to RTFM

 It's specified with the mode parameter in the fopen function:

 http://www.php.net/manual/en/function.fopen.php



 --
 Jason Perkins
 url - http://www.somebodydial911.com/



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




[PHP] PHP and XML parser (expat)

2002-12-29 Thread Lasse Tarp
Hello PHP.

I'm running Linux Mandrake 9.0 with Apache 1.3.26 and PHP 4.2.3 and I'm
trying to get the XML parser expat to work. I get this error:
Call to undefined function: xml_parser_create()
I have installed expat from the Mandrake Control center, but I dont
think PHP found that out  :-)
I checked out the manual and found a tip:
libexpat.a: $(OBJS)
ar -rc $@ $(OBJS)
ranlib $@
but i do not know what to do with it ?

How do I get the XML parser to work with PHP ???

Kind Regards Lasse Tarp