[PHP] pdf_open_memory_image

2002-02-17 Thread Brent Meshier

I'm running in to the following error message:

Warning: pdf_open_memory_image() is not supported in this PHP build

I have pdflib and gd compiled in to PHP, so I'm sure what to do next.  Any
ideas?

--Brent


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




[PHP] preg_replace problem.

2002-02-17 Thread Paul Roberts

where am i going wrong

i used 
$mail = preg_replace(/p[^]*?/i,\n\n$0, $mail,-1);
and
$mail = preg_replace(/p[^]*?/i,\n\n\\1, $mail,-1);

but i get $0 or \1 inserted, but only on the linux server
not on my win 2000 dev machine!

Paul Roberts
[EMAIL PROTECTED]

- Original Message - 
From: Anas Mughal [EMAIL PROTECTED]
To: Michael Sims [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Sunday, February 17, 2002 8:12 AM
Subject: Re: [PHP] Could this be a configuration directive?


 Thank you very much...
 
 This worked:
 
   $message = ${$this-func_name($string)};
 
 
 and, this worked: (I am going to stick with this)
 
   $message = ${$this-func_name}($string);
 
 
 However, this did NOT work:
 
 $message = ${$this}-func_name($string);
 
 
 Lesson learned: I need to enclose the function name
 variable in curly braces.
 
 Thanks.
 
 
 
 --- Michael Sims [EMAIL PROTECTED] wrote:
  At 11:22 PM 2/16/2002 -0800, Anas Mughal wrote:
  I get a parse error using my CGI version of PHP on
  the
  following line:
  
  $message = $$this-func_name($string);
  
  However, the same above line works fine with my
  ISP's
  CGI version of PHP.
  
  That is strange.  Just for kicks, try using curly
  braces to make the 
  statement less ambiguous.  Is the variable part just
  the object name, or is 
  it the entire method?  See if it works like this:
  
  $message = ${$this}-func_name($string);
  
  or like this:
  
  $message = ${$this-func_name($string)};
  
  Depending on which one you mean.
  
  
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  
 
 
 =
 Anas Mughal
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 Tel: 973-249-6665
 
 __
 Do You Yahoo!?
 Yahoo! Sports - Coverage of the 2002 Olympic Games
 http://sports.yahoo.com
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 



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




[PHP] test for cookies, without reloading

2002-02-17 Thread Bas Jobsen

Hello,

Is there a way to test for cookies enabled/disabled, without reload the page 
and test for the preset cookie?

echo setcookies(test);
seems to be 1 always.

Tnx,

Bas

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




[PHP] How to build PHP on LINUX with GD?

2002-02-17 Thread Andy

Hi there,

Can it be that complicated to build php with gdlib2 on linux?

I thought the gd2 is included in php4.1.1 so just telling php at buildtime
to include it. But this is generating errors.

So I did download gdlib from boutel, compiled it and tryed to configure php
prior build. This does not work. It is never finding the gdlib.so in that
library.

Can somebody please explain how to build php with gd2 and mysql working on
RH7.2 Linux?

Thank you so much for any help. Linux makes frustrated after a while :-(

Andy



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




[PHP] Duplicate e-mails

2002-02-17 Thread Anthony Rodriguez

I've a php script that gets e-mail addresses from a MySQL database and then 
sends the same e-mail message to about 100+ addressees. There are no 
duplicate addresses in the db.

When I call the script the e-mails do get send but in duplicate and, 
instead of linking to a Task Done page,  it shows url not found.  There 
is no duplication within the script and the url called is there in the same 
folder as the script.

Is there a problem with php's mail function when it's used for multiple 
messages?  Or is there a processing time limit that makes the script to be 
processed twice?

Scripts are run using Apache under Unix.

Thank you!

Anthony F. Rodriguez
([EMAIL PROTECTED])


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




[PHP] 4. sample of PHP docs in CHM

2002-02-17 Thread Gabor Hojtsy

Hi!

We released the fourth sample of the PHP Manual
CHM Edition. We beleive it is better then the previous
ones. Go and get it: http://weblabor.hu/php-doc-chm
Discussions at [EMAIL PROTECTED]

Goba



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




[PHP] Sendmail PHP

2002-02-17 Thread Liam MacKenzie

Sorry about this, yet another question about sendmail...

I've spent days on this, read stacks of docs and just can not get it to work!
It sends some emails...  But others it rejects.
Please, if you know of any tutorials on how to set this stuff up, please
tell me!  
If you think you may be able to set it up for me using webmin, I will make
you a temporary account.  I just need it fixed!  By any means!

Thankyou so much for your help, this has frustrated me for too long now!!!

Liam

P.S.  Below is the error dump from sendmail.




From MAILER-DAEMON Sun Feb 17 22:31:20 2002
Return-Path: MAILER-DAEMON
Received: from localhost (localhost)
by apathy (8.11.2/8.11.2) id g1HCVJJ11765;
Sun, 17 Feb 2002 22:31:20 +1000
Date: Sun, 17 Feb 2002 22:31:20 +1000
From: Mail Delivery Subsystem MAILER-DAEMON
Message-Id: 200202171231.g1HCVJJ11765@apathy
To: nobody
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary=g1HCVJJ11765.1013949080/apathy
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)

This is a MIME-encapsulated message

--g1HCVJJ11765.1013949080/apathy

The original message was received at Sat, 16 Feb 2002 09:40:28 +1000
from nobody@localhost

   - The following addresses had permanent fatal errors -
[EMAIL PROTECTED]
(reason: 550 Host unknown)

   - Transcript of session follows -
550 5.1.2 [EMAIL PROTECTED] Host unknown (Name server: 
operationengima.net: host not found)

--g1HCVJJ11765.1013949080/apathy
Content-Type: message/delivery-status

Reporting-MTA: dns; apathy
Arrival-Date: Sat, 16 Feb 2002 09:40:28 +1000

Final-Recipient: RFC822; [EMAIL PROTECTED]
Action: failed
Status: 5.1.2
Remote-MTA: DNS; operationengima.net
Diagnostic-Code: SMTP; 550 Host unknown
Last-Attempt-Date: Sun, 17 Feb 2002 22:31:20 +1000

--g1HCVJJ11765.1013949080/apathy
Content-Type: message/rfc822

Return-Path: nobody
Received: (from nobody@localhost)
by apathy (8.11.2/8.11.2) id g1FNeSk00547;
Sat, 16 Feb 2002 09:40:28 +1000
Date: Sat, 16 Feb 2002 09:40:28 +1000
Message-Id: 200202152340.g1FNeSk00547@apathy
To: [EMAIL PROTECTED]
Subject: Re: A few changes...
From: ert [EMAIL PROTECTED]

This email was sent to you by ert at [EMAIL PROTECTED] because they thought you 
might be interested it this article from http://www.operationenigma.net.  This is not 
SPAM and the email addresses involved in this transaction were not saved to a list or 
stored for later use.
ert wrote: 123124124


A few changes...
Thursday, 07 February 2002 @ 08:16 PM EST
Contributed by: 

Sorry about the downtime people, been doing some serious renovations.  I can't tell 
you about them now, I'll post a link to a page with all the appropriate information on 
it later, maybe in a day or so.

Thanks for your patience, it is greatly appreciated!




Comment on this story at 
http://www.operationenigma.net/article.php?story=20020207201614518#comments

--g1HCVJJ11765.1013949080/apathy--




Re: [PHP] exec on Windows

2002-02-17 Thread DL Neil

Scott,

 I am trying to develop a music scheduling system on Windows using the
 command line to fire off WinAMP.  The first exec works fine, then it
 stops
 and says that program execution time has been exceeded.

 An example would be:

 exec (winamp.exe M01.mp3);

 a while loop kicks off the second.  I tried to send the output to null
 winamp.exe null or nul and no luck.  Anyone else try this on Windows?


Sounds interesting.
I take it that it is the PHP script that stops (not the winamp player)!? Looks like 
you are running into
problems with the script execution time limit. Herewith a couple of theories:

1 what happens if you specify that the winamp is to run in its own cmd shell - will 
control return to PHP
'immediately'?
2 if the problem is time-out, and you can only play one .mp3 at a time, so looping to 
'the next' must be
dependent upon the preceding track finishing first, what happens if you adjust the 
set_time_limit to 0/no limit?
(RTFM: http://www.php.net/manual/en/function.set-time-limit.php)

Regards,
=dn



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




php-general Digest 17 Feb 2002 14:03:39 -0000 Issue 1177

2002-02-17 Thread php-general-digest-help


php-general Digest 17 Feb 2002 14:03:39 - Issue 1177

Topics (messages 85077 through 85102):

Re: file reading and array's
85077 by: Scott

Re: Outputing XML to browser???
85078 by: Jim Hankins

Breadcrumbs in PHP
85079 by: lmlweb.mybc.com

storing arrays
85080 by: Clark
85083 by: CC Zona

Re: Help please
85081 by: Bogdan Stancescu
85082 by: webmaster mbtradingco
85084 by: webmaster mbtradingco
85086 by: Bogdan Stancescu
85091 by: webmaster mbtradingco

Apache.exe fails Java
85085 by: Zlutarch G.

Re: Sessions that last for ever
85087 by: Jason Wong

global variables accesible by any script started by any browser
85088 by: Sofhian Mahat

MySQL error checking/matching
85089 by: Navid Yar

net send/WinPopup code - RFC
85090 by: Garth Dahlstrom

Could this be a configuration directive?
85092 by: Anas Mughal
85093 by: Michael Sims
85094 by: Anas Mughal

pdf_open_memory_image
85095 by: Brent Meshier

preg_replace problem.
85096 by: Paul Roberts

test for cookies, without reloading
85097 by: Bas Jobsen

How to build PHP on LINUX with GD?
85098 by: Andy

Duplicate e-mails
85099 by: Anthony Rodriguez

4. sample of PHP docs in CHM
85100 by: Gabor Hojtsy

Sendmail  PHP
85101 by: Liam MacKenzie

Re: exec on Windows
85102 by: DL Neil

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

Perfect!  Thank you, my mind was out in left field somewhere.


On Tue, 12 Feb 2002, DL Neil wrote:

 Hi Scott,
 
  In my constant effort to improve my perl conversion project, I have a
  question regarding file reading.  I am taking two files and combining
  them in an array and then writing out a new file.  Is there a way to:
  a)strip out the first line of the second file
  b)test for conditions based on what is on the next line on the file
  
  An example, I start the array on file one, then mid-way I start another
  array on the second file (this array within in the first).  I need to
  check the next line in the file for a condition to exist.
  
  I have tried this, but run into the pointer resetting on each pass.
  
  Any thoughts would be appreciated.  Thanks in advance.
 
 
 Use explicitly array pointers instead of the 'built-in' ones, then:
 
 your need to look-ahead becomes array[$ptr + 1] 
 avoiding the first record becomes for ( $i=1; $i$last; $i ++ ) //instead of $i=0
 
 Does that cover things?
 =dn
 
 

-- 



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

More info on my latest issue regarding the integrating of xml and php for
dynamic xml documents

Thanks for help, could use another assist if you have a moment.  When I used
the method of using the application it worked only the output is text not
xml, ie it does update the dynamic information but formats it as text so I
reverted back to the previous configuration of the line in the httpd.conf
file which is

IfModule mod_php4.c
AddType application/x-httpd-php .php .php4 .php3 .phtml
AddType application/x-httpd-php-source .phps
/IfModule

Now as I thought about this, there must be something that tells php that
it's default type is text/html for output.  I perused the php.ini file and
low and behold I find something:

; As of 4.0b4, PHP always outputs a character encoding by default in
; the Content-type: header.  To disable sending of the charset, simply
; set it to be empty.
;
; PHP's built-in default is text/html
default_mimetype = text/xml   I
changed this to xml,

now my xml works but of course I've now broke html formating.  (I need both
of course)

Surely there is someway to tell either with an xml header or something
within the beginning of a file which at this point could be either xml or
php, really doesn't matter. I must be able to tell php either by content, or
by location or something what format the file is to be displayed in so it
works.

Any ideas?



Christian Blichmann [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Whoops, sent you a wrong .htaccess - file, here's
 what I really use (the other one was old):
 AddType application/x-httpd-php .php .php4 .htm .html .xml .xhtml
 DirectoryIndex index.xml index.xhtml
 IndexIgnore .htaccess .htpasswd

 --
 Christian Blichmann

 _
 don't hesitate - email me with your thoughts:
 e-mail: [EMAIL PROTECTED]
  - please remove the .nospam from address.
 _
 do you want to know more?
 web:http://www.blichmann.de





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

Hi,

I was trying out this breadcrumbs code found at evolt.org:


Re: [PHP] Sendmail PHP

2002-02-17 Thread Liam MacKenzie

Very strange indeed...
If I send an email to [EMAIL PROTECTED], it leaves the mailqueue
but I never actually recieve the email in my vectorstar account!
(Vectorstar is a remote mail server)

When I send an email to a local address, it sits in the queue for ever,
so I force delivery

Forcing the attempted delivery of mail with the command
/usr/lib/sendmail -v -q ..


WARNING: local host name (apathy) is not qualified; fix $j in config file

Running /var/spool/mqueue/g1HEBlW12213 (sequence 1 of 1)
[EMAIL PROTECTED] Connecting to operationenigma.net. via esmtp...
[EMAIL PROTECTED] Deferred: Connection timed out with
operationenigma.net.

I'll leave this port open for a few hours.Tell me when you're finished so I
can close it again.http://www.operationenigma.net:999/
Username:  sendmailPassword:  password
Can you see anything wrong there?
Thanks for your help,Liam


- Original Message -
From: -BD- [EMAIL PROTECTED]
To: Liam MacKenzie [EMAIL PROTECTED]
Sent: Sunday, February 17, 2002 11:01 PM
Subject: Re: [PHP] Sendmail  PHP


 it's operationenigma.net, not operationengima.net, isn't it?
 check your sendmail aliases - think you have a typo...

 http://www.rfbdproductions.com
 Web Hosting  Design
 Event Production
 Home Of Radio Free BD

 - Original Message -
 From: Liam MacKenzie [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, February 17, 2002 7:42 AM
 Subject: [PHP] Sendmail  PHP


 Sorry about this, yet another question about sendmail...

 I've spent days on this, read stacks of docs and just can not get it to
 work!
 It sends some emails...  But others it rejects.
 Please, if you know of any tutorials on how to set this stuff up, please
 tell me!
 If you think you may be able to set it up for me using webmin, I will make
 you a temporary account.  I just need it fixed!  By any means!

 Thankyou so much for your help, this has frustrated me for too long now!!!

 Liam

 P.S.  Below is the error dump from sendmail.




 From MAILER-DAEMON Sun Feb 17 22:31:20 2002
 Return-Path: MAILER-DAEMON
 Received: from localhost (localhost)
 by apathy (8.11.2/8.11.2) id g1HCVJJ11765;
 Sun, 17 Feb 2002 22:31:20 +1000
 Date: Sun, 17 Feb 2002 22:31:20 +1000
 From: Mail Delivery Subsystem MAILER-DAEMON
 Message-Id: 200202171231.g1HCVJJ11765@apathy
 To: nobody
 MIME-Version: 1.0
 Content-Type: multipart/report; report-type=delivery-status;
 boundary=g1HCVJJ11765.1013949080/apathy
 Subject: Returned mail: see transcript for details
 Auto-Submitted: auto-generated (failure)

 This is a MIME-encapsulated message

 --g1HCVJJ11765.1013949080/apathy

 The original message was received at Sat, 16 Feb 2002 09:40:28 +1000
 from nobody@localhost

- The following addresses had permanent fatal errors -
 [EMAIL PROTECTED]
 (reason: 550 Host unknown)

- Transcript of session follows -
 550 5.1.2 [EMAIL PROTECTED] Host unknown (Name server:
 operationengima.net: host not found)

 --g1HCVJJ11765.1013949080/apathy
 Content-Type: message/delivery-status

 Reporting-MTA: dns; apathy
 Arrival-Date: Sat, 16 Feb 2002 09:40:28 +1000

 Final-Recipient: RFC822; [EMAIL PROTECTED]
 Action: failed
 Status: 5.1.2
 Remote-MTA: DNS; operationengima.net
 Diagnostic-Code: SMTP; 550 Host unknown
 Last-Attempt-Date: Sun, 17 Feb 2002 22:31:20 +1000

 --g1HCVJJ11765.1013949080/apathy
 Content-Type: message/rfc822

 Return-Path: nobody
 Received: (from nobody@localhost)
 by apathy (8.11.2/8.11.2) id g1FNeSk00547;
 Sat, 16 Feb 2002 09:40:28 +1000
 Date: Sat, 16 Feb 2002 09:40:28 +1000
 Message-Id: 200202152340.g1FNeSk00547@apathy
 To: [EMAIL PROTECTED]
 Subject: Re: A few changes...
 From: ert [EMAIL PROTECTED]

 This email was sent to you by ert at [EMAIL PROTECTED] because they
 thought you might be interested it this article from
 http://www.operationenigma.net.  This is not SPAM and the email addresses
 involved in this transaction were not saved to a list or stored for later
 use.
 ert wrote: 123124124
 

 A few changes...
 Thursday, 07 February 2002 @ 08:16 PM EST
 Contributed by:

 Sorry about the downtime people, been doing some serious renovations.  I
 can't tell you about them now, I'll post a link to a page with all the
 appropriate information on it later, maybe in a day or so.

 Thanks for your patience, it is greatly appreciated!



 
 Comment on this story at

http://www.operationenigma.net/article.php?story=20020207201614518#comments

 --g1HCVJJ11765.1013949080/apathy--








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




Re: [PHP] storing arrays

2002-02-17 Thread Joffrey van Wageningen

- Original Message - 
From: Clark [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, February 17, 2002 3:15 AM
Subject: [PHP] storing arrays


 Two questions:
 
 1) Is it possible to write an array to a file?

not direct, use:

$fp = fopen(/my/file, w);
foreach($filearray as $row)
  fputs($fp, $row.\n);
fclose($fp);

 2) Is it possible to specify the name of the key to each item of an
 array when you get the array using file().

not direct, use:

$keys = array(first, second, third, fourht);
$filearray = file(/my/file);

for($x = 0; $x  count($filearray); $x++)
  $newfilearray[$keys[$x]] = $filearray[$x];

$filearray = $newfilearray;

i think only a write version of file could be a useful function for php...

mvgr,
Joffrey van Wageningen

--
.-[ Joffrey van Wageningen | WoLFjuh | [EMAIL PROTECTED] ]--
| Networking Event 2000 - www.ne2000.nl - IRCnet:#ne2000, Undernet:#clue
| PGP:1024D/C6BA5863 - 3B93 52D3 CB91 9CB7 C50D FA79 865F 628A C6BA 5863
| * We demand guaranteed rigidly defined areas of doubt and uncertainty.
|   -- Douglas Adams



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




Re: [PHP] storing arrays

2002-02-17 Thread Matt


- Original Message -
From: Clark [EMAIL PROTECTED]
Sent: Saturday, February 16, 2002 9:15 PM


 Two questions:

 1) Is it possible to write an array to a file?

Yes, serialize it first with http://www.php.net/serialize.  You can also
place this in a db text field because it will be a character representation.

 2) Is it possible to specify the name of the key to each item of an array
 when you get the array using file().

When retrieving the saved array, unserialize it, and you'll get the same
array back.


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




Re: [PHP] MySQL error checking/matching

2002-02-17 Thread Matt


- Original Message -
From: Navid Yar [EMAIL PROTECTED]
 $query = select email from customers // Check for duplicate
 entry
 . where email = $email;
 $query = stripslashes($query);
 $result = mysql_query($query);

 $num_results = mysql_num_rows($result); // Get the number of
 rows in database (integer)
 And this produces the following error:
 Warning: Supplied argument is not a valid MySQL result resource in
 e:\localhost/book-o-rama/admin/signup_do.php on line 34.

 What am I doing wrong? Any help would be appreciated...

You are not checking to see if the mysql_query completed successfully.  What
you could do is:
$result = mysql_query($query) or die(mysql_error());

http://www.php-faq.com/faq.php#10


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




RE: [PHP] exec on Windows

2002-02-17 Thread Stephano Mariani

Try exec cmd /c start winamp.exe M01.mp3 to avoid blocking...

Stephano Mariani

 -Original Message-
 From: DL Neil [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, 17 February 2002 2 3
 To: Scott; [EMAIL PROTECTED]
 Subject: Re: [PHP] exec on Windows
 
 Scott,
 
  I am trying to develop a music scheduling system on Windows using
the
  command line to fire off WinAMP.  The first exec works fine, then it
  stops
  and says that program execution time has been exceeded.
 
  An example would be:
 
  exec (winamp.exe M01.mp3);
 
  a while loop kicks off the second.  I tried to send the output to
null
  winamp.exe null or nul and no luck.  Anyone else try this on
Windows?
 
 
 Sounds interesting.
 I take it that it is the PHP script that stops (not the winamp
player)!? Looks like you are running
 into
 problems with the script execution time limit. Herewith a couple of
theories:
 
 1 what happens if you specify that the winamp is to run in its own cmd
shell - will control return
 to PHP
 'immediately'?
 2 if the problem is time-out, and you can only play one .mp3 at a
time, so looping to 'the next'
 must be
 dependent upon the preceding track finishing first, what happens if
you adjust the set_time_limit
 to 0/no limit?
 (RTFM: http://www.php.net/manual/en/function.set-time-limit.php)
 
 Regards,
 =dn
 
 
 
 --
 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] session password problems.

2002-02-17 Thread Matthew Darcy

Hi,

I have a php user authorise script.

I have 2 fields in a mysql database. user_name and user_password. Password
is encrypted with the mysql password('$password') function.

This is my PHP authorise section of the script.



$sql_authorisation = SELECT * FROM account_details WHERE
account_name='$login_username' AND
account_password=PASSWORD('$login_password');
$sql_authorisation_result = mysql_query($sql_authorisation);

if (!$sql_authorisation_result) {
error(A Database Error Occurred while trying to authorise login details);
}




if (mysql_num_rows($sql_authorisation_result) == 0) {
session_unregister(login_username);
session_unregister(login_password);
?

HTML
HEAD
TITLE Access Denied /TITLE
/HEAD
BODY BGCOLOR=white
H1 Access Denied /H1
P Your user ID and Password could not be verified. This could be an
incorrect username or password, or you are not a registered user on this
site. Try logging in again checking your details, or enter the signup
process to join us/P
/BODY
/HTML
?php

exit;
}

?




This script does NOT work.

However if I change the sql function $sql_authorisation to

$sql_authorisation = SELECT * FROM account_details WHERE
account_name='$login_username' );

so that is only selects the username - it works. there for there is a
problem with me selecting and comparing the password'd user_password.

Any suggestions.

Thanks,

Matt.


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




[PHP] Re: storing arrays

2002-02-17 Thread Christian Blichmann

Clark [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Two questions:

 1) Is it possible to write an array to a file?
What about using WDDX, an open XML-format for interchanging
data (see http://www.openwddx.org/) ?
You then will be able to do this:
?php
$c = array(blue, orange, violet);

$f = fopen(MyFile.wddx, w);

fwrite($f, wddx_serialize_vars(c));
fclose($f);
?

To unserialize:
?php
$fname = MyFile.wddx;

$f = fopen($fname, rb);

$packet = fread($f, filesize($fname));
$c = wddx_deserialize($packet);

fclose($f);
?

 2) Is it possible to specify the name of the key to each item of an array
 when you get the array using file().

Yep, you'll get the same array back...

--
Christian Blichmann

_
don't hesitate - email me with your thoughts:
e-mail: [EMAIL PROTECTED]
 - please remove the .nospam from address.
_
do you want to know more?
web:http://www.blichmann.de



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




Re: [PHP] How can I?

2002-02-17 Thread Ashley M. Kirchner

Marcus Ouimet wrote:

 How can I unsubscribe to this list thanks in advance.

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

Read the above URLs?


--
H | Life is the art of drawing without an eraser. - John Gardner
  +
  Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
  Director of Internet Operations / SysAdmin. 800.441.3873 x130
  Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave, #6
  http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.



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




[PHP] How can I?

2002-02-17 Thread Marcus Ouimet

How can I unsubscribe to this list thanks in advance.

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




[PHP] Re: Where To Find Resources About Programming Style (my bleedin' code is so darn ugly)

2002-02-17 Thread Christian Blichmann

Hi there!
This is my suggestion for code formatting/commenting/etc.:

if ($var  0  (  // Shortcut, since your're not
calling anything
// that does stuff in
the conditional.
strlen($var) == strlen(intval($var)) ||   // String length is equal
or one less
strlen($var) - 1) == strlen(intval($var))  // than the length of its
integer value
)) {
do stuff;  // Then: Do stuff...
}

Btw, there are canonical texts on this topic, see the PEAR (PHP
Extension and Application Repository) web site:
http://pear.php.net
http://pear.php.net/manual/en/standards.php

I am using the following indentation (as opposed to PEAR):
- One - and only one - tab 4 spaces wide for one level of
   indentation.
- One tab througout the ?php ?- tag.
- if-statements:
?php
if (condition) one_statement();

if (condition)
one_statement();
else
other_statement();

if (condition)
one_statement();
elseif (condition) // or use: else if
other_statement();
else
anything();

if (condition) {
// Multiple Statements
}

if (condition) {
// Multiple Statements
} else {
// Multiple Statements
}

if (condition) {
// Multiple Statements
} else if (condition) {
// Multiple Statements
} else {
// Multiple Statements
}
?
- One blank line between variable declarations / inclusions:
?php
$a = don't know;

function do_stuff() {
global $a;

// use $a;
}
?

You should also have a look at the operator precedence (this can
be really annoying, but it saves you brackets - thus resulting in
cleaner code).
Its also always a good idea to comment your code (yes, that's
annoying, too, but saves you _much_ time when resuming your
work after a longer interruption /  when working in a team). My
suggestions for comments are as follows:

?php
/*
 * Caption of a larger section or a function
 */
function do_stuff() {
echo Now, this does stuff...;
}
?

?php
/* Multi-line comment to explain why you do certain things the
way you do them, if this belongs to a function call, then nicely
arrange it to 80 chars on the right, otherwise leave it
left-aligned
to the indentation.
*/

do_stuff();
do_more_stuff();
?

?php
// One line comment as the caption of a small code block
// that doesn't need comments in each line;
do_stuff();
do_more_stuff();
?

?php
do_stuff();  // Longest comment right-aligned to 80
chars |||
do_more_stuff();// But: // should be in one column.
?

Ok, sorry for this mega-posting, hope it helps.

P.S.: Your code _always_ works? -Wow...

--
Christian Blichmann

_
don't hesitate - email me with your thoughts:
e-mail: [EMAIL PROTECTED]
 - please remove the .nospam from address.
_
do you want to know more?
web:http://www.blichmann.de



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




RE: [PHP] Sessions that last for ever

2002-02-17 Thread Jaime Bozza

Actually, sites that remember you don't typically keep the same
session around.  They send a separate cookie that contains just userid
information and when you return, they just set the session variables in
such a way based off of the userid cookie.

If you really want to keep the same session around, just use the
function 'session_set_cookie_params()' and set the lifetime to be some
huge number, or use the session.cookie_lifetime setting in php.ini.

Jaime Bozza


-Original Message-
From: Nigel Gilbert [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, February 16, 2002 2:10 PM
To: Erik Price
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Sessions that last for ever


But very many commercial sites, including Apple and Amazon to name two, 
do exactly this.  When you re-enter the site they 'remember' who you are

using a cookie.  In my case, I'm building a multi-player strategy game 
and while I want the players to go through an initial briefing the first

time they ever join the game, thereafter they should be able to get 
straight into the game if they are still using the same PC.  But as I 
said, the specifics of my use aren't so important - lots of sites leave 
permanent cookies around and the results don't seem to be catastrophic.

The question is still: how to do it?

Nigel




On Saturday, February 16, 2002, at 07:52 PM, Erik Price wrote:


 On Saturday, February 16, 2002, at 07:43  AM, Nigel Gilbert wrote:

 By default, a session (created with session_register) seems to last
 just as long as the user has their browser open.  If a user quits the

 browser, the session is automatically destroyed.

 I want a session to last indefinitely (or until my program destroys
 it).  There are some hints about how this could be done with cookies 
 in the documentation, but not a clear recipe.  What sequence of PHP 
 statements should I use to achieve this?

 I don't have the answer you're looking for (maybe it's a php.ini
 setting), but I suspect that it might be a dangerous idea.  The longer

 a session ID is hanging about, the easier it is for a cracker to
hijack 
 it and use it for evil intent.

 Remember, every time a page is requested within any given session,
 either a cookie variable or a GET variable is being sent along with
the 
 HTTP headers.  Keeping a session going for more time than needed means

 that the variable representing the session ID is leaving footprints
all 
 over the place.


 Erik -- who has become overcautious lately upon learning how HTTP 
 works



 

 Erik Price
 Web Developer Temp
 Media Lab, H.H. Brown
 [EMAIL PROTECTED]



__
Professor Nigel Gilbert, FREng, AcSS, Pro Vice-Chancellor and Professor 
of
Sociology, University of Surrey, Guildford GU2 7XH, UK. +44 (0)1483 
689173


-- 
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] must I use var

2002-02-17 Thread Peter J. Schoenster

HI,

I was reading the docs and I see this:

 /* This is how it should be done. */
 class Cart
 {
 var $todays_date;
 var $name;
 var $owner;
 var $items;
 
 function Cart()
 {
 $this-todays_date = date(Y-m-d);
 $this-name = $GLOBALS['firstname'];
 /* etc. . . */
 }

I don't see the point in doing 

var $todays_date;

and 

$this-todays_date = date(Y-m-d);

The latter works without the need for the var. Why should i use 
var?

Thanks,

Peter
http://www.readbrazil.com/
Answering Your Questions About Brazil

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




[PHP] Re: session password problems.

2002-02-17 Thread Michael Kimsal

Matthew Darcy wrote:
 Hi,
 
snip

 This script does NOT work.
 
 However if I change the sql function $sql_authorisation to
 
 $sql_authorisation = SELECT * FROM account_details WHERE
 account_name='$login_username' );
 
 so that is only selects the username - it works. there for there is a
 problem with me selecting and comparing the password'd user_password.
 
 Any suggestions.
 


Print out the SQL statement that it's running, then execute it directly
yourself in the database.  See if it's returning something unexpected.



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




[PHP] Pass Cookie? (Snoopy)

2002-02-17 Thread Jeff Oien

I want to grab info from a Web page where I am a logged in user.
How do I pass cookie info along with the grabber script? I looked
at Snoopy but the code is too complex for me to learn how to 
use it. 
http://turma.sourceforge.net/web/urlator/snoopy.html
Is there any example code out there on how to use Snoopy?
Thanks for any help.
Jeff Oien

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




Re: [PHP] Re: Where To Find Resources About Programming Style (mybleedin' code is so darn ugly)

2002-02-17 Thread Lars Torben Wilson

On Sun, 2002-02-17 at 11:05, Christian Blichmann wrote:
 Hi there!

[snip]

 if (condition) one_statement();
 
 if (condition)
 one_statement();
 else
 other_statement();
 
 if (condition)
 one_statement();
 elseif (condition) // or use: else if
 other_statement();
 else
 anything();

I don't see the benefit of leaving the braces out when there is only
one statement, and there is potential harm: it's fairly easy to get 
hard-to-track errors when you add more statements to the conditional
but forget to add braces (which might as well have been there to
start with):

if (contition)
$foo = 'bar';
echo $foo
else
baz();

I've seen it happen. :) Besides, if code block are always braced, it's
one less inconsistency in the code.

[snip]

One other thing I'd mention is when people go to great lengths to format
columns in their code:

$foo= 'Foo';
$bar= 'Bar';
$foobar = 'FooBar';
 
This is a small example, but despite the fact that it's sort of  
aesthetically pleasing, what happens when you have a long list of 
those and then come back and need to add one which is one character
longer than the rest? You have to update *every* line. Not a code
problem per se, but a tedious mess.

An excellent book on coding practices is 'Code Complete', by Steve C
McConnell.
 
http://www.amazon.com/exec/obidos/ASIN/1556154844/qid=1013978113/sr=8-1/ref=sr_8_67_1/102-2030399-6728144

There is also the Indian Hill style guide--for C, but highly 
transferrable to PHP:

http://dogbert.comsc.ucok.edu/~mccann/cstyle.html

For a whole list of 'em, check out:

http://www.cs.umd.edu/users/cml/cstyle/


Hope this helps,

Torben

-- 
 Torben Wilson [EMAIL PROTECTED]
 http://www.thebuttlesschaps.com
 http://www.hybrid17.com
 http://www.inflatableeye.com
 +1.604.709.0506


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




[PHP] Re: must I use var

2002-02-17 Thread Raymond Lilleodegard

Hi Peter!

The var $somevariable means that the variable is defined. You only need to
use var in classes. So if you only write ordinary scrpits, you dont need to
use it.

Regards Raymond

Peter J. Schoenster [EMAIL PROTECTED] wrote in message
3C6FC20B.3856.610F245@localhost">news:3C6FC20B.3856.610F245@localhost...
 HI,

 I was reading the docs and I see this:

  /* This is how it should be done. */
  class Cart
  {
  var $todays_date;
  var $name;
  var $owner;
  var $items;
 
  function Cart()
  {
  $this-todays_date = date(Y-m-d);
  $this-name = $GLOBALS['firstname'];
  /* etc. . . */
  }

 I don't see the point in doing

 var $todays_date;

 and

 $this-todays_date = date(Y-m-d);

 The latter works without the need for the var. Why should i use
 var?

 Thanks,

 Peter
 http://www.readbrazil.com/
 Answering Your Questions About Brazil



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




RE: [PHP] Polymorphism question

2002-02-17 Thread Martin Towell

A bit late in replying - but what the hay (or is that hey??) oh well...

From my understanding of virtual functions (and it's been at least 3 to 4
years since I've done C++) is that a virtual function has basic
functionality and a pure virtual function has no, and can't have, and
code.

Please correct me if I'm wrong

Martin

-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 16, 2002 3:31 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Polymorphism question


I've also done C and C++ since the 80's.

My experience with virtual, is that there is no base implementation for a
function.  Rather, the function is expected to be defined in the derived
class.

The inheritance you describe would have a base implementation (no virtual
declaration), which could be over-ridden in the derived class.

Yes, PHP does have the latter capability.

-Original Message-
From: Richard Fox [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 9:01 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Polymorphism question




I am new to PHP but 10 years in C++

One of the cool/powerful things you can do in C++ is the following:

class DrawPlainDialog {
public:
...
   virtual Draw(); // implementation draws a vanilla dialog box
   };

class DrawStyleDialog : public DrawPlainDialog {
public:
...
   virtual Draw(); // implementation draws better dialog
   };

Somewhere in my code I have a function like:

void ShowGUI( DrawPlainDialog dd ) {
   dd.Draw();
   }

ShowGUI can be called with any object that is derived from DrawPlainDialog,
obviously. Only code that calls ShowGUI must be changed when a new
implementation of DrawPlainDialog is used. This feature of C++ to have a
base class pointer (or reference) be able to access derived class
functionality is not something I've seen in any PHP documentation. Does it
exist, and if not is there a workaround for this highly desirable feature?

TIA

Rich

PS Can anyone point me to the most comprehensive OOP documentation for 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] Re: The ASP application object in PHP?

2002-02-17 Thread Martin Towell

Isn't this something to do with shared memory? I haven't played with shared
memory before, but this sounds like it might work.

Martin

-Original Message-
From: Philip Hallstrom [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 16, 2002 8:37 AM
To: Peter J. Schoenster
Cc: [EMAIL PROTECTED]
Subject: [PHP] Re: The ASP application object in PHP?


Not that I'm an ASP expert, but I asked someone about this once and was
told that the application object is really just a session for that section
of the website.

In other words you configure IIS so that say /foobar is an application.
Then in /foobar/global.asa you do some stuff that sets up this application
object.  Now anyone who accesses /foobar has access to that object.  So
using this you could keep track of how many people are on the site ,etc...

While it's magic in ASP land, it is easily done with a bit of work in
PHP..

On Fri, 15 Feb 2002, Peter J. Schoenster wrote:

 On 15 Feb 2002, at 14:43, Bendik Simonsen wrote:


  I have however, noticed one feature that ASP has that I have not found
  an equal for in PHP: the application object.
 
  For those of you not familiar with ASP, the lowdown is this: The
  application object acts like a global session. You assign it variables
  and values like you would a session, but those variables are available
  to all instances and sessions. It is for example very useful to track
  different users at the same time, or to send messages from one session
  to another, or the likes.
 
  Anything like this in PHP, or will I have to find a workaround for it,
  or *ick* do that little sniplet in ASP?

 Well how does it work? Is it advertised as M$ magic in the class?
 Is http not stateless?

 I don't follow your description and I don't believe in magic.

 Is it using cookies? If not what? It must be using something?

 I bet it's using cookies. Sounds a lot like what you normally do with
 sessions. I don't follow the send message from one session to
 another ... is this not just normal course for sessions?  I'd like
 more explanation before I believe that this is any more than just a
 module.

 Peter
 http://www.readbrazil.com/
 Answering Your Questions About Brazil

 --
 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] zend studio 2.0

2002-02-17 Thread robert janeczek

hi
i write in php about 1.5 years. from the beginning i use macromedia homesite
and i`m quite content of it. but...debugger, environment not optimized for
php developers etc. so i wanted to try zend studio, i downloaded it,
installed (w2k, i already had an apache, so i deleted what came with
installer). then: apache unstability, server downs, generaly - not usable.
so i uninstalled everything and came back to homesite.

i`ve read this (http://www.byte.com/documents/s=6975/byt1013213009328/)
article and now i look different on all of this. so - what`s your opinion -
is it good or bad tool. should i try again or wait for next version?

rashid



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




Re: [PHP] Re: must I use var

2002-02-17 Thread Peter J. Schoenster

On 17 Feb 2002, at 23:20, Raymond Lilleodegard wrote:

 The var $somevariable means that the variable is defined. You only
 need to use var in classes. So if you only write ordinary scrpits, you
 dont need to use it.

Raymond,

Thanks. Someone else said it just helped to see what your class 
variables where (but I can see this easily enough).

I don't NEED to use var even in classes. I'm writing a class right 
now without it. But perhaps there is a SHOULD that I am not aware 
of (just helping me see .. well I don't need that).

Peter
http://www.readbrazil.com/
Answering Your Questions About Brazil

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




[PHP] form submission error trapping

2002-02-17 Thread Jason Dulberg

I am working on some error trapping for several forms on my site. After
visiting a bunch of websites, I've noticed 2 common methods of displaying
error messages.

1. display an error box on a new page and force the user to hit the back
button

2. display the form again with appropriate error text and pre-filled fields.

I have part of the error on the new page working but I'm running into the
infamous no contents in the form after going back.

There are some useability issues with forcing the user to hit the back
button -- some just don't want to bother.

Is there a way to display the form w/original contents and error messages
'without' having to code the entire form twice? I have about 5 forms with 50
fields or so each.

What would be the best way to go about redrawing the form with the errors
shown beside each field?

Any suggestions are greatly appreciated.

__
Jason Dulberg
Extreme MTB
http://extreme.nas.net


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




RE: [PHP] form submission error trapping

2002-02-17 Thread Martin Towell

submit back to the same page - or include that page

Martin

-Original Message-
From: Jason Dulberg [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 18, 2002 9:23 AM
To: [EMAIL PROTECTED]
Subject: [PHP] form submission error trapping


I am working on some error trapping for several forms on my site. After
visiting a bunch of websites, I've noticed 2 common methods of displaying
error messages.

1. display an error box on a new page and force the user to hit the back
button

2. display the form again with appropriate error text and pre-filled fields.

I have part of the error on the new page working but I'm running into the
infamous no contents in the form after going back.

There are some useability issues with forcing the user to hit the back
button -- some just don't want to bother.

Is there a way to display the form w/original contents and error messages
'without' having to code the entire form twice? I have about 5 forms with 50
fields or so each.

What would be the best way to go about redrawing the form with the errors
shown beside each field?

Any suggestions are greatly appreciated.

__
Jason Dulberg
Extreme MTB
http://extreme.nas.net


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



[PHP] Running php from shell - passing parameters

2002-02-17 Thread Bostjan Marusic

I have to run php script from Linux shell.

I have no trouble except with passing the parameters.
What is the right sintax to pass them to the script?

I would like to do something like this:
/usr/local/bin/php ./test.php param=value


Best Regards,
   Bostjan Marusic


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




Re: [PHP] zend studio 2.0

2002-02-17 Thread Peter J. Schoenster

On  at , Unknown wrote:

 i write in php about 1.5 years. from the beginning i use macromedia
 homesite and i`m quite content of it. but...debugger, environment not

 optimized for php developers etc. so i wanted to try zend studio, i

 i`ve read this
 (http://www.byte.com/documents/s=6975/byt1013213009328/) article and
 now i look different on all of this. so - what`s your opinion - is it
 good or bad tool. should i try again or wait for next version?

Well I was hoping that article was interesting. It wasn't. I should 
have known when I saw the use of homesite as an alternative. 

The article had this one interesting line:

 Like many open-source languages, the biggest problem with PHP up until
 recently has been a lack of tools.

I guess knowledge and imagination doesn't count as tools. 

I could be wrong. I've been developing websites for the last 7 years. 
I still use TextPad (coupled with Perl, and UNIX/LINUX) yet I 
develop on a windoze platform with cygwin installed.

I'd suggest using Perl to improve your productivity which I assume 
is the real question at hand. Will Zend make your more productive 
than homesite?

Now I may be completely wrong. It's just that I've worked with 
people who use these GUI centric tools and they spend half their 
time in the air, waiting for their hand to move to and from mouse to 
keyboard.

Learn Perl, not to write cgi (god forbid, even I prefer PHP for this) or 
necessarily for mod_perl (very good) but just to generate code for 
yourself. Perl is an excellent tool but you can't get it with a GUI. 
You use text editors for which there is keyboard command for 99% 
of the actions you do.  If you already KNOW PHP then Perl will be 
simple.

Peter

http://www.readbrazil.com/
Answering Your Questions About Brazil

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




RE: [PHP] Running php from shell - passing parameters

2002-02-17 Thread Martin Towell

$argv and $argc are prob. what you're after - dunno if there's any parameter
parsing functions - but it's a start

HTH
Martin

-Original Message-
From: Bostjan Marusic [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 18, 2002 10:00 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Running php from shell - passing parameters


I have to run php script from Linux shell.

I have no trouble except with passing the parameters.
What is the right sintax to pass them to the script?

I would like to do something like this:
/usr/local/bin/php ./test.php param=value


Best Regards,
   Bostjan Marusic


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



Re: [PHP] form submission error trapping

2002-02-17 Thread Steven Walker

Jason,

I just finished one of my form pages, and I'm really happy with how it 
turned out.

I created one php page that both displays the form and validates the 
input. When the user hits the submit button, it submits the data to 
itself. If anything is missing from the page, the form is reshown with 
missing fields highlighted and the other fields filled in. If on the 
other hand the info passes the validation test, the information is shown 
to screen a new button (hidden form) allows the user to continue.

If you want, I can send you a link to my test site so you can check it 
out.

Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]

On Sunday, February 17, 2002, at 02:22  PM, Jason Dulberg wrote:

 I am working on some error trapping for several forms on my site. After
 visiting a bunch of websites, I've noticed 2 common methods of 
 displaying
 error messages.

 1. display an error box on a new page and force the user to hit the 
 back
 button

 2. display the form again with appropriate error text and pre-filled 
 fields.

 I have part of the error on the new page working but I'm running into 
 the
 infamous no contents in the form after going back.

 There are some useability issues with forcing the user to hit the back
 button -- some just don't want to bother.

 Is there a way to display the form w/original contents and error 
 messages
 'without' having to code the entire form twice? I have about 5 forms 
 with 50
 fields or so each.

 What would be the best way to go about redrawing the form with the 
 errors
 shown beside each field?

 Any suggestions are greatly appreciated.

 __
 Jason Dulberg
 Extreme MTB
 http://extreme.nas.net


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




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




RE: [PHP] form submission error trapping

2002-02-17 Thread Jason Dulberg

Ya, it would be cool if you could how do you submit the form to itself?

Right now, I have something like 

if (!$submit) {
display form
}
else {
process
if (trim($email)==) {
echo error, hit back button to fix;
}
}

Thanks

Jason


 -Original Message-
 From: Steven Walker [mailto:[EMAIL PROTECTED]]
 Sent: February 17, 2002 6:18 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] form submission error trapping
 
 
 Jason,
 
 I just finished one of my form pages, and I'm really happy with how it 
 turned out.
 
 I created one php page that both displays the form and validates the 
 input. When the user hits the submit button, it submits the data to 
 itself. If anything is missing from the page, the form is reshown with 
 missing fields highlighted and the other fields filled in. If on the 
 other hand the info passes the validation test, the information is shown 
 to screen a new button (hidden form) allows the user to continue.
 
 If you want, I can send you a link to my test site so you can check it 
 out.
 
 Steven J. Walker
 Walker Effects
 www.walkereffects.com
 [EMAIL PROTECTED]
 
 On Sunday, February 17, 2002, at 02:22  PM, Jason Dulberg wrote:
 
  I am working on some error trapping for several forms on my site. After
  visiting a bunch of websites, I've noticed 2 common methods of 
  displaying
  error messages.
 
  1. display an error box on a new page and force the user to hit the 
  back
  button
 
  2. display the form again with appropriate error text and pre-filled 
  fields.
 
  I have part of the error on the new page working but I'm running into 
  the
  infamous no contents in the form after going back.
 
  There are some useability issues with forcing the user to hit the back
  button -- some just don't want to bother.
 
  Is there a way to display the form w/original contents and error 
  messages
  'without' having to code the entire form twice? I have about 5 forms 
  with 50
  fields or so each.
 
  What would be the best way to go about redrawing the form with the 
  errors
  shown beside each field?
 
  Any suggestions are greatly appreciated.
 
  __
  Jason Dulberg
  Extreme MTB
  http://extreme.nas.net
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 

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




RE: [PHP] form submission error trapping

2002-02-17 Thread Martin Towell

something like:

?
  // filename: here.html

  if ($submit)
  {
$error = false;
if (trim($email) == )
{
  $error = true;
}
// process more...
if (!$error)
{
  // do stuff here, maybe a header(location:);
  exit;
}
  }
?
html
  form action=here.html method=post
input type=text name=email value=?= $email; ?
input type=submit name=submit value=Go For It!!!
  /form
/html

not tested but should work - just expand on it

Martin


-Original Message-
From: Jason Dulberg [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 18, 2002 10:22 AM
To: Steven Walker
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] form submission error trapping


Ya, it would be cool if you could how do you submit the form to itself?

Right now, I have something like 

if (!$submit) {
display form
}
else {
process
if (trim($email)==) {
echo error, hit back button to fix;
}
}

Thanks

Jason


 -Original Message-
 From: Steven Walker [mailto:[EMAIL PROTECTED]]
 Sent: February 17, 2002 6:18 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] form submission error trapping
 
 
 Jason,
 
 I just finished one of my form pages, and I'm really happy with how it 
 turned out.
 
 I created one php page that both displays the form and validates the 
 input. When the user hits the submit button, it submits the data to 
 itself. If anything is missing from the page, the form is reshown with 
 missing fields highlighted and the other fields filled in. If on the 
 other hand the info passes the validation test, the information is shown 
 to screen a new button (hidden form) allows the user to continue.
 
 If you want, I can send you a link to my test site so you can check it 
 out.
 
 Steven J. Walker
 Walker Effects
 www.walkereffects.com
 [EMAIL PROTECTED]
 
 On Sunday, February 17, 2002, at 02:22  PM, Jason Dulberg wrote:
 
  I am working on some error trapping for several forms on my site. After
  visiting a bunch of websites, I've noticed 2 common methods of 
  displaying
  error messages.
 
  1. display an error box on a new page and force the user to hit the 
  back
  button
 
  2. display the form again with appropriate error text and pre-filled 
  fields.
 
  I have part of the error on the new page working but I'm running into 
  the
  infamous no contents in the form after going back.
 
  There are some useability issues with forcing the user to hit the back
  button -- some just don't want to bother.
 
  Is there a way to display the form w/original contents and error 
  messages
  'without' having to code the entire form twice? I have about 5 forms 
  with 50
  fields or so each.
 
  What would be the best way to go about redrawing the form with the 
  errors
  shown beside each field?
 
  Any suggestions are greatly appreciated.
 
  __
  Jason Dulberg
  Extreme MTB
  http://extreme.nas.net
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 

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



RE: [PHP] form submission error trapping

2002-02-17 Thread Ken


  -Original Message-
  From: Steven Walker [mailto:[EMAIL PROTECTED]]
  
  I created one php page that both displays the form and validates the 
  input. When the user hits the submit button, it submits the data to 
  itself. If anything is missing from the page, the form is reshown with 
  missing fields highlighted and the other fields filled in. If on the 
  other hand the info passes the validation test, the information is shown 
  to screen a new button (hidden form) allows the user to continue.

Only catch is, you have to build all that logic to populate your fields.  Piece of 
cake when you have a simple form, not so easy when you have a dynamically-generated 
form (with a variable number of inputs) including multi-select buttons and the like.

I guess the real challenge is converting a pre-existing page like the one I've 
described into one that can re-populate itself on an error condition.  Building it 
that way from scratch is merely a programming task.

- Ken
[EMAIL PROTECTED]


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




RE: [PHP] form submission error trapping

2002-02-17 Thread Jason Dulberg

RE: [PHP] form submission error trappingThanks for the code Is there a
way to keep track of what fields had the errors as its possible for people
to have like 5 errors?

Thanks again.

Jason
  -Original Message-
  From: Martin Towell [mailto:[EMAIL PROTECTED]]
  Sent: February 17, 2002 6:41 PM
  To: '[EMAIL PROTECTED]'; Steven Walker
  Cc: [EMAIL PROTECTED]
  Subject: RE: [PHP] form submission error trapping


  something like:

  ?
// filename: here.html

if ($submit)
{
  $error = false;
  if (trim($email) == )
  {
$error = true;
  }
  // process more...
  if (!$error)
  {
// do stuff here, maybe a header(location:);
exit;
  }
}
  ?
  html
form action=here.html method=post
  input type=text name=email value=?= $email; ?
  input type=submit name=submit value=Go For It!!!
/form
  /html

  not tested but should work - just expand on it

  Martin



  -Original Message-
  From: Jason Dulberg [mailto:[EMAIL PROTECTED]]
  Sent: Monday, February 18, 2002 10:22 AM
  To: Steven Walker
  Cc: [EMAIL PROTECTED]
  Subject: RE: [PHP] form submission error trapping



  Ya, it would be cool if you could how do you submit the form to
itself?

  Right now, I have something like

  if (!$submit) {
  display form
  }
  else {
  process
  if (trim($email)==) {
  echo error, hit back button to fix;
  }
  }

  Thanks

  Jason



   -Original Message-
   From: Steven Walker [mailto:[EMAIL PROTECTED]]
   Sent: February 17, 2002 6:18 PM
   To: [EMAIL PROTECTED]
   Cc: [EMAIL PROTECTED]
   Subject: Re: [PHP] form submission error trapping
  
  
   Jason,
  
   I just finished one of my form pages, and I'm really happy with how it
   turned out.
  
   I created one php page that both displays the form and validates the
   input. When the user hits the submit button, it submits the data to
   itself. If anything is missing from the page, the form is reshown with
   missing fields highlighted and the other fields filled in. If on the
   other hand the info passes the validation test, the information is shown
   to screen a new button (hidden form) allows the user to continue.
  
   If you want, I can send you a link to my test site so you can check it
   out.
  
   Steven J. Walker
   Walker Effects
   www.walkereffects.com
   [EMAIL PROTECTED]
  
   On Sunday, February 17, 2002, at 02:22  PM, Jason Dulberg wrote:
  
I am working on some error trapping for several forms on my site.
After
visiting a bunch of websites, I've noticed 2 common methods of
displaying
error messages.
   
1. display an error box on a new page and force the user to hit the
back
button
   
2. display the form again with appropriate error text and pre-filled
fields.
   
I have part of the error on the new page working but I'm running into
the
infamous no contents in the form after going back.
   
There are some useability issues with forcing the user to hit the back
button -- some just don't want to bother.
   
Is there a way to display the form w/original contents and error
messages
'without' having to code the entire form twice? I have about 5 forms
with 50
fields or so each.
   
What would be the best way to go about redrawing the form with the
errors
shown beside each field?
   
Any suggestions are greatly appreciated.
   
__
Jason Dulberg
Extreme MTB
http://extreme.nas.net
   
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
   
   
  

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




Re: [PHP] form submission error trapping

2002-02-17 Thread Steven Walker

 I guess the real challenge is converting a pre-existing page like the 
 one I've described into one that can re-populate itself on an error 
 condition.  Building it that way from scratch is merely a programming 
 task.

That's true, however there are a few ways to cheat :). For example, in 
my form I have a State and Country popup menu. Rather than trying to 
write code that selects the proper one to match the post data, I simply 
create a new entry at the top:

   select name=state
 ?
 if(isset($state)) {
$statename = GetStateName($state);
echo option selected value='$state'$statename;
 }
 ?
 option value=Select a state
 option value=ALAlabama

This works because I've already verified the data. If the data doesn't 
pass verification, it would be reset and would fail the isset($state) 
test.

Otherwise, most form elements are pretty easy to assign values to.

Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]

On Sunday, February 17, 2002, at 03:42  PM, Ken wrote:


 -Original Message-
 From: Steven Walker [mailto:[EMAIL PROTECTED]]

 I created one php page that both displays the form and validates the
 input. When the user hits the submit button, it submits the data to
 itself. If anything is missing from the page, the form is reshown with
 missing fields highlighted and the other fields filled in. If on the
 other hand the info passes the validation test, the information is 
 shown
 to screen a new button (hidden form) allows the user to continue.

 Only catch is, you have to build all that logic to populate your 
 fields.  Piece of cake when you have a simple form, not so easy when 
 you have a dynamically-generated form (with a variable number of 
 inputs) including multi-select buttons and the like.

 I guess the real challenge is converting a pre-existing page like the 
 one I've described into one that can re-populate itself on an error 
 condition.  Building it that way from scratch is merely a programming 
 task.

 - Ken
 [EMAIL PROTECTED]





RE: [PHP] form submission error trapping

2002-02-17 Thread Martin Towell

sure - $error could be an array, so the code I supplied could be changed to:
if you're email client supports rich text, then the changed lines are in
green
? 
  // filename: here.html 

  if ($submit) 
  { 
$error = array(); 
if (trim($email) == ) 
{ 
  $error[email] = true; 
} 
// process more... 
if (count($error) == 0) 
{ 
  // do stuff here, maybe a header(location:); 
  exit; 
} 
  } 
? 
html 
  form action=here.html method=post 
? if ($error[email])  echo Error: please fill in your email
address; ?
input type=text name=email value=?= $email; ? 
input type=submit name=submit value=Go For It!!! 
  /form 
/html 

 
-Original Message-
From: Jason Dulberg [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 18, 2002 10:40 AM
To: Martin Towell
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] form submission error trapping


Thanks for the code Is there a way to keep track of what fields had the
errors as its possible for people to have like 5 errors?
 
Thanks again.
 
Jason

-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: February 17, 2002 6:41 PM
To: '[EMAIL PROTECTED]'; Steven Walker
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] form submission error trapping



something like: 

? 
  // filename: here.html 

  if ($submit) 
  { 
$error = false; 
if (trim($email) == ) 
{ 
  $error = true; 
} 
// process more... 
if (!$error) 
{ 
  // do stuff here, maybe a header(location:); 
  exit; 
} 
  } 
? 
html 
  form action=here.html method=post 
input type=text name=email value=?= $email; ? 
input type=submit name=submit value=Go For It!!! 
  /form 
/html 

not tested but should work - just expand on it 

Martin 


-Original Message- 
From: Jason Dulberg [  mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]] 
Sent: Monday, February 18, 2002 10:22 AM 
To: Steven Walker 
Cc: [EMAIL PROTECTED] 
Subject: RE: [PHP] form submission error trapping 


Ya, it would be cool if you could how do you submit the form to itself? 

Right now, I have something like 

if (!$submit) { 
display form 
} 
else { 
process 
if (trim($email)==) { 
echo error, hit back button to fix; 
} 
} 

Thanks 

Jason 


 -Original Message- 
 From: Steven Walker [  mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]] 
 Sent: February 17, 2002 6:18 PM 
 To: [EMAIL PROTECTED] 
 Cc: [EMAIL PROTECTED] 
 Subject: Re: [PHP] form submission error trapping 
 
 
 Jason, 
 
 I just finished one of my form pages, and I'm really happy with how it 
 turned out. 
 
 I created one php page that both displays the form and validates the 
 input. When the user hits the submit button, it submits the data to 
 itself. If anything is missing from the page, the form is reshown with 
 missing fields highlighted and the other fields filled in. If on the 
 other hand the info passes the validation test, the information is shown 
 to screen a new button (hidden form) allows the user to continue. 
 
 If you want, I can send you a link to my test site so you can check it 
 out. 
 
 Steven J. Walker 
 Walker Effects 
 www.walkereffects.com 
 [EMAIL PROTECTED] 
 
 On Sunday, February 17, 2002, at 02:22  PM, Jason Dulberg wrote: 
 
  I am working on some error trapping for several forms on my site. After 
  visiting a bunch of websites, I've noticed 2 common methods of 
  displaying 
  error messages. 
  
  1. display an error box on a new page and force the user to hit the 
  back 
  button 
  
  2. display the form again with appropriate error text and pre-filled 
  fields. 
  
  I have part of the error on the new page working but I'm running into 
  the 
  infamous no contents in the form after going back. 
  
  There are some useability issues with forcing the user to hit the back 
  button -- some just don't want to bother. 
  
  Is there a way to display the form w/original contents and error 
  messages 
  'without' having to code the entire form twice? I have about 5 forms 
  with 50 
  fields or so each. 
  
  What would be the best way to go about redrawing the form with the 
  errors 
  shown beside each field? 
  
  Any suggestions are greatly appreciated. 
  
  __ 
  Jason Dulberg 
  Extreme MTB 
   http://extreme.nas.net http://extreme.nas.net 
  
  
  -- 
  PHP General Mailing List (  http://www.php.net/ http://www.php.net/) 
  To unsubscribe, visit:  http://www.php.net/unsub.php
http://www.php.net/unsub.php 
  
  
 

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




Re: [PHP] form submission error trapping

2002-02-17 Thread Steven Walker

Yeah, for buttons (radio/checkboxes) I had to put an if statement on 
each one:

   td width=84%
 input type=radio name=formatting value=unformatted
   ?
if($format == unformatted) echo checked;
   ?
 unformatted
 input type=radio name=formatting value=table
   ?
if($format == table) echo checked;
   ?

You're right... it's not as easy.

Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]


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




Re: [PHP] zend studio 2.0

2002-02-17 Thread robert janeczek

 Well I was hoping that article was interesting. It wasn't. I should
 have known when I saw the use of homesite as an alternative.

sure, it was just simple look at zend studio, but it made me wonder why the
tool didn`t work on my system :) [yes - i think i know what was wrong, no
need to look for bugs in zs2.0 :)]

 The article had this one interesting line:

  Like many open-source languages, the biggest problem with PHP up until
  recently has been a lack of tools.

 I guess knowledge and imagination doesn't count as tools.

debugger integrated with IDE does...

 I could be wrong. I've been developing websites for the last 7 years.
 I still use TextPad (coupled with Perl, and UNIX/LINUX) yet I
 develop on a windoze platform with cygwin installed.

what i need from my editor is:
- debugger
- color coding
- syntax check, just to spare time waiting for page showing that i forgot
')' in code

 I'd suggest using Perl to improve your productivity which I assume
 is the real question at hand.

hmmmlet`s say i prefer php.

 Will Zend make your more productive
 than homesite?

maybe...that`s what i want to know.

 Now I may be completely wrong. It's just that I've worked with
 people who use these GUI centric tools and they spend half their
 time in the air, waiting for their hand to move to and from mouse to
 keyboard.

i don`t want to have delphi-like ide, i want just a nice debugger with basic
options.

 Learn Perl, not to write cgi (god forbid, even I prefer PHP for this) or
 necessarily for mod_perl (very good) but just to generate code for
 yourself. Perl is an excellent tool but you can't get it with a GUI.
 You use text editors for which there is keyboard command for 99%
 of the actions you do.  If you already KNOW PHP then Perl will be
 simple.

i wrote few scripts in perl, i know it exists, i know i can use it if i
must, but, for now, i use php.

rash



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




[PHP] form opens a php window.

2002-02-17 Thread webmaster mbtradingco








Hi, I have a form, that I need to control the parameters in the _blank target
once it is submitted.



Everything works, fine except the client wants the
result of the poll in a popup window, and I am not able to control the parameters on the new window.



Can any one help me with this? Thanks.



E








Re: [PHP] zend studio 2.0

2002-02-17 Thread Chris Lott

I hope we aren't going to get another chest-pounding real coders type of
argument going here. Homesite *IS* a text editor. It provides an amazing
number of shortcuts to tasks, including mouse-based tasks, many of which I
guarantee you I can get done faster with a mouse than anyone can typing. It
also offers a lot of pseudo-time-saving features as well, for which one
would be better of learning to do it manually. But it isn't a GUI in any
real sense as, say, Dreamweaver is. TextPad is at least as much of a GUI as
Homesite in that respect.

I use both of these great tools a lot... none of them are the stigmata of
the under-developed programmer. People should use what they want, but don't
dump on everyone who realizes that clicking a button or using a keyboard
shortcut in something like Homesite or Textpad to create common HTML
structures or PHP control structures is always going to be faster than
typing them out by hand, no matter how craven a Notepad warrior one might
be.

Zend looks pretty good in terms of providing what I like in a development
environment, particularly real debugging... unfortunately it was definitely
not particularly stable when I last tried it in late December.

Integrated debugging, syntax coloring, function reference, keyboard
shortcuts-- these are all useful tools. TextPad has good PHP dictionaries,
Homesite handles PHP well. Homesite is STILL the only editor I have found
that enables an easy preview through the server mapping so that I can,
with one touch toggle between my editing and the live code through my local
development server, something that saves a lot of time vs jockeying between
windows with other tools.

Not all mouse use is just waving one's hands through the air, none of the
programs mentioned are particularly mouse-centric.

c
--
Chris Lott
http://www.chrislott.org/


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




RE: [PHP] exec on Windows

2002-02-17 Thread Scott

Thanks guys, this works, but found the problem to be the fact that
Winamp does not shut down, therefore the script sits and waits.  If I
close Winamp the script will fire off the next event.  I might try
mpg123 for Win.

-Scott


-Original Message-
From: Stephano Mariani [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, February 17, 2002 10:49 AM
To: 'DL Neil'; 'Scott'; [EMAIL PROTECTED]
Subject: RE: [PHP] exec on Windows
Importance: High

Try exec cmd /c start winamp.exe M01.mp3 to avoid blocking...

Stephano Mariani

 -Original Message-
 From: DL Neil [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, 17 February 2002 2 3
 To: Scott; [EMAIL PROTECTED]
 Subject: Re: [PHP] exec on Windows
 
 Scott,
 
  I am trying to develop a music scheduling system on Windows using
the
  command line to fire off WinAMP.  The first exec works fine, then it
  stops
  and says that program execution time has been exceeded.
 
  An example would be:
 
  exec (winamp.exe M01.mp3);
 
  a while loop kicks off the second.  I tried to send the output to
null
  winamp.exe null or nul and no luck.  Anyone else try this on
Windows?
 
 
 Sounds interesting.
 I take it that it is the PHP script that stops (not the winamp
player)!? Looks like you are running
 into
 problems with the script execution time limit. Herewith a couple of
theories:
 
 1 what happens if you specify that the winamp is to run in its own cmd
shell - will control return
 to PHP
 'immediately'?
 2 if the problem is time-out, and you can only play one .mp3 at a
time, so looping to 'the next'
 must be
 dependent upon the preceding track finishing first, what happens if
you adjust the set_time_limit
 to 0/no limit?
 (RTFM: http://www.php.net/manual/en/function.set-time-limit.php)
 
 Regards,
 =dn
 
 
 
 --
 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] zend studio 2.0

2002-02-17 Thread Peter J. Schoenster

On 17 Feb 2002, at 16:12, Chris Lott wrote:

 I hope we aren't going to get another chest-pounding real coders
 type of argument going here. Homesite *IS* a text editor. It provides

Yeah, my bad. 

 an amazing number of shortcuts to tasks, including mouse-based tasks,
 many of which I guarantee you I can get done faster with a mouse than
 anyone can typing. It also offers a lot of pseudo-time-saving features

Well, as you said, no point in arguing.  Just that I think if someone 
really wants to develop they should learn some better tools than a 
GUI but it's a question of balance. 

Peter


Despite considerable evidence that it doesn't work, many 
projects seem to rely on telepathy as the mechanism for 
communicating requirements from users to developers. 
--Karl E. Wiegers

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




php-general Digest 18 Feb 2002 02:21:25 -0000 Issue 1178

2002-02-17 Thread php-general-digest-help


php-general Digest 18 Feb 2002 02:21:25 - Issue 1178

Topics (messages 85103 through 85140):

Re: Sendmail  PHP
85103 by: Liam MacKenzie

Re: storing arrays
85104 by: Joffrey van Wageningen
85105 by: Matt
85109 by: Christian Blichmann

Re: MySQL error checking/matching
85106 by: Matt

Re: exec on Windows
85107 by: Stephano Mariani
85139 by: Scott

session password problems.
85108 by: Matthew Darcy
85115 by: Michael Kimsal

How can I?
85110 by: Marcus Ouimet
85111 by: Ashley M. Kirchner

Re: Where To Find Resources About Programming Style (my bleedin' code is so darn ugly)
85112 by: Christian Blichmann
85117 by: Lars Torben Wilson

Re: Sessions that last for ever
85113 by: Jaime Bozza

must I use var
85114 by: Peter J. Schoenster
85118 by: Raymond Lilleodegard
85122 by: Peter J. Schoenster

Pass Cookie? (Snoopy)
85116 by: Jeff Oien

Re: Polymorphism question
85119 by: Martin Towell

Re: The ASP application object in PHP?
85120 by: Martin Towell

zend studio 2.0
85121 by: robert janeczek
85126 by: Peter J. Schoenster
85136 by: robert janeczek
85138 by: Chris Lott
85140 by: Peter J. Schoenster

form submission error trapping
85123 by: Jason Dulberg
85124 by: Martin Towell
85128 by: Steven Walker
85129 by: Jason Dulberg
85130 by: Martin Towell
85131 by: Ken
85132 by: Jason Dulberg
85133 by: Steven Walker
85134 by: Martin Towell
85135 by: Steven Walker

Running php from shell - passing parameters
85125 by: Bostjan Marusic
85127 by: Martin Towell

form opens a php window.
85137 by: webmaster mbtradingco

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

Very strange indeed...
If I send an email to [EMAIL PROTECTED], it leaves the mailqueue
but I never actually recieve the email in my vectorstar account!
(Vectorstar is a remote mail server)

When I send an email to a local address, it sits in the queue for ever,
so I force delivery

Forcing the attempted delivery of mail with the command
/usr/lib/sendmail -v -q ..


WARNING: local host name (apathy) is not qualified; fix $j in config file

Running /var/spool/mqueue/g1HEBlW12213 (sequence 1 of 1)
[EMAIL PROTECTED] Connecting to operationenigma.net. via esmtp...
[EMAIL PROTECTED] Deferred: Connection timed out with
operationenigma.net.

I'll leave this port open for a few hours.Tell me when you're finished so I
can close it again.http://www.operationenigma.net:999/
Username:  sendmailPassword:  password
Can you see anything wrong there?
Thanks for your help,Liam


- Original Message -
From: -BD- [EMAIL PROTECTED]
To: Liam MacKenzie [EMAIL PROTECTED]
Sent: Sunday, February 17, 2002 11:01 PM
Subject: Re: [PHP] Sendmail  PHP


 it's operationenigma.net, not operationengima.net, isn't it?
 check your sendmail aliases - think you have a typo...

 http://www.rfbdproductions.com
 Web Hosting  Design
 Event Production
 Home Of Radio Free BD

 - Original Message -
 From: Liam MacKenzie [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, February 17, 2002 7:42 AM
 Subject: [PHP] Sendmail  PHP


 Sorry about this, yet another question about sendmail...

 I've spent days on this, read stacks of docs and just can not get it to
 work!
 It sends some emails...  But others it rejects.
 Please, if you know of any tutorials on how to set this stuff up, please
 tell me!
 If you think you may be able to set it up for me using webmin, I will make
 you a temporary account.  I just need it fixed!  By any means!

 Thankyou so much for your help, this has frustrated me for too long now!!!

 Liam

 P.S.  Below is the error dump from sendmail.




 From MAILER-DAEMON Sun Feb 17 22:31:20 2002
 Return-Path: MAILER-DAEMON
 Received: from localhost (localhost)
 by apathy (8.11.2/8.11.2) id g1HCVJJ11765;
 Sun, 17 Feb 2002 22:31:20 +1000
 Date: Sun, 17 Feb 2002 22:31:20 +1000
 From: Mail Delivery Subsystem MAILER-DAEMON
 Message-Id: 200202171231.g1HCVJJ11765@apathy
 To: nobody
 MIME-Version: 1.0
 Content-Type: multipart/report; report-type=delivery-status;
 boundary=g1HCVJJ11765.1013949080/apathy
 Subject: Returned mail: see transcript for details
 Auto-Submitted: auto-generated (failure)

 This is a MIME-encapsulated message

 --g1HCVJJ11765.1013949080/apathy

 The original message was received at Sat, 16 Feb 2002 09:40:28 +1000
 from nobody@localhost

- The following addresses had permanent fatal errors -
 [EMAIL PROTECTED]
 (reason: 550 Host unknown)

- Transcript of session follows -
 550 5.1.2 

[PHP] Re: form opens a php window.

2002-02-17 Thread Gary



Webmaster Mbtradingco wrote:

 Hi, I have a form, that I need to control the parameters in the _blank 
 target once it is submitted.
 
  
 
 Everything works, fine except the client wants the result of the poll in 
 a popup window, and I am not able to control the parameters on the new 
 window.
 
  
 
 Can any one help me with this? Thanks.
 
  
 
 E
 

you are trying to use a server side language to do a client side task. 
You have two choices, write the form in javascript and pass it to the 
new window or use something like a cookie or database to collect and 
pass on the information to the page that resides in the window.

Gary



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




Re: [PHP] Running php from shell - passing parameters

2002-02-17 Thread Greg Donald

 I have to run php script from Linux shell.

 I have no trouble except with passing the parameters.
 What is the right sintax to pass them to the script?

 I would like to do something like this:
 /usr/local/bin/php ./test.php param=value


What you want is $argc and $argv as described in the predefined variables
documentation:

http://www.php.net/manual/en/language.variables.predefined.php


Greg Donald - http://destiney.com/
http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/



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




[PHP] phpmyadmin-mysql

2002-02-17 Thread jtjohnston

Hello,

I'm looking for code to display all my mysql databases in a select.
On change, I want to display all my tables in a select.
Finally, on change, it has to display all record of the table selected:

Print Record


id YR   AU   BT
 1 1997 Fee, Margery Writing Orality: Interpreting Literature
 Display in English by Aboriginal Writers in North
 America, Australia and New Zealand

Can someone give me a hand getting started?
I would normally use phpmyadmin, but I want to customise something they
don't offer.




Re: [PHP] session password problems.

2002-02-17 Thread Greg Donald

 I have a php user authorise script.

 I have 2 fields in a mysql database. user_name and user_password. Password
 is encrypted with the mysql password('$password') function.

 This is my PHP authorise section of the script.

 $sql_authorisation = SELECT * FROM account_details WHERE
 account_name='$login_username' AND
 account_password=PASSWORD('$login_password');
 $sql_authorisation_result = mysql_query($sql_authorisation);

 if (!$sql_authorisation_result) {
 error(A Database Error Occurred while trying to authorise login
details);
 }

 if (mysql_num_rows($sql_authorisation_result) == 0) {
 session_unregister(login_username);
 session_unregister(login_password);
 ?

 HTML
 HEAD
 TITLE Access Denied /TITLE
 /HEAD
 BODY BGCOLOR=white
 H1 Access Denied /H1
 P Your user ID and Password could not be verified. This could be an
 incorrect username or password, or you are not a registered user on this
 site. Try logging in again checking your details, or enter the signup
 process to join us/P
 /BODY
 /HTML
 ?php

 exit;
 }

 ?

 This script does NOT work.

 However if I change the sql function $sql_authorisation to

 $sql_authorisation = SELECT * FROM account_details WHERE
 account_name='$login_username' );

 so that is only selects the username - it works. there for there is a
 problem with me selecting and comparing the password'd user_password.

 Any suggestions.

You have to use the query with mysql_num_rows(), not the result of the
query, try:

if (mysql_num_rows($sql_authorisation) == 0) {

And it woudl be better to test for a single row, not the fact that no rows
returned.  I would use:

if (mysql_num_rows($sql_authorisation) == 1) {
  $user_array = mysql_fetch_array($sql_authorisation_result);
  $login_username = $user_array[account_name];
  session_register(login_username);
}



Greg Donald - http://destiney.com/
http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/




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




[PHP] Include file for MySQL insert rows

2002-02-17 Thread Paul Fowler

I am very new at this and am having trouble migrating to php and mysql from
a different system (WebCatalog).

I want to start dumping files to text and let php use them to populate mysql
on the fly as I start migrating.

snip---

$db  = mysql_pconnect(host, user, pass);

$query = insert into catalogwinetmp values
include(testsql);

$result = mysql_query($query);

---end-snip

The contents of testsql look like this

(19, 38080, 'Senejac', 'Haut-Medoc / Cru Bourgeois', '', 12, 1995, 'Bottle -
.75L', 'LN, LE, CI', 135, '/collectors/images/bottles/38080.JPG'),
(20, 38780, 'Yquem', 'Sauternes / Premier Cru Superieur', '', 1, 1927,
'Bottle - .75L', 'TS, LP, CI', 465, '/collectors/images/bottles/38780.JPG');

Just with more lines (1-18).

But I can not get rid of errors in the
$query = insert into catalogwinetmp values
include(testsql);
No matter what quotes and semi-colons I put in testsql or in this script.

If I try to set the contents of the include into a variable as in:

$rowsToAdd = include(testsql);

all I get is the value 1, I guess this is because it is successful.

If I could get a variable to contain the contents of the include I am not
sure if I could use it in the script.

I am not sure if I am even getting warm or if I am on another planet.


1. Any ideas how I can simply make php get a text file into the mysql
database?

2. Is there a way to set a (albeit maybe large) variable with the contents
of an include file?

Sorry to sound like such a php newbie, but I am.

Kind thanks,

Paul


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




Re: [PHP] zend studio 2.0

2002-02-17 Thread Chris Lott

 Well, as you said, no point in arguing.  Just that I think if someone
 really wants to develop they should learn some better tools than a
 GUI but it's a question of balance.

I think a definition of GUI might be in order. Homesite, for instance, is
just a big text editor. It has almost no GUI design features, drag  and drop
coding, that kind of thing. I think of a GUI as Dreamweaver, or something
where you are not using the code directly. Homesite and  the Zend Studio are
both code editors that provide the same kind of features as TextPad with PHP
libraries, clip books and syntax coloring files. Emacs, which I use a lot,
is in the same class (not GUI, I don't think).

I agree that with GUIs, by my definition at least, one should learn on tools
in which they are really working with the code. If they can insert the
skeleton of a control structure with one click or not doesn't impact their
development (either of themselves or their program) negatively.

c
--
Chris Lott
http://www.chrislott.org/


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




[PHP] building dynamic pdf files?

2002-02-17 Thread Jeff D. Hamann

I'm currently working on a web based application (in php) and saw the power
of being able edit fields in the pdf document. I can see how to build the
pdf file by hand, but I have a few dozen forms (multiple pages of course)
that I wish I could scan in and have a rough pdf file to start working with.
I've been generating html code using php, and would like to directly
generate pdf files as they look much better. Is there software out there
that I can import an html file into, or excel, or word and spit out the pdf
code, or something usable?

Thanks,
Jeff.

--
Jeff D. Hamann
Hamann, Donald  Associates, Inc.
PO Box 1421
Corvallis, Oregon USA 97339-1421
Bus. 541-753-7333
Cell. 541-740-5988
[EMAIL PROTECTED]
www.hamanndonald.com




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




[PHP] HELP: php4.1.1, oci8 functions, Oracle 9i and VARCHAR2 selects not working

2002-02-17 Thread Bradley Goldsmith

Hi All,

I have seen a lot of discussion about this - but no real solutions
:)

I am getting a two task communication error whenever I try to select
a varchar2 element in a query in php4. I seem to be able to select any other
kinds of data without hassle.

All of my environment variables are set correctly, and I have
experimented at length with different NLS_LANG values.

The client machine is Mandrake Linux, running php 4.1.1 with oracle
and oci8 support compiled in. SQL*Net is able to query the remote db server
without any problems at all.

Has *anyone* got any experience with Oracle9i and PHP that might be
able to help? I would rather use MySQL in a heartbeat, but Oracle9i is a
client requirement. 

Cheers,
Brad




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




RE: [PHP] building dynamic pdf files?

2002-02-17 Thread Martin Towell

Adobe Acrobat 5 or 6 - whichever's the latest version - can grab web pages
and convert them to pdf.

Depends if you want to fork out to buy it

Martin


-Original Message-
From: Jeff D. Hamann [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 18, 2002 3:39 PM
To: [EMAIL PROTECTED]
Subject: [PHP] building dynamic pdf files?


I'm currently working on a web based application (in php) and saw the power
of being able edit fields in the pdf document. I can see how to build the
pdf file by hand, but I have a few dozen forms (multiple pages of course)
that I wish I could scan in and have a rough pdf file to start working with.
I've been generating html code using php, and would like to directly
generate pdf files as they look much better. Is there software out there
that I can import an html file into, or excel, or word and spit out the pdf
code, or something usable?

Thanks,
Jeff.

--
Jeff D. Hamann
Hamann, Donald  Associates, Inc.
PO Box 1421
Corvallis, Oregon USA 97339-1421
Bus. 541-753-7333
Cell. 541-740-5988
[EMAIL PROTECTED]
www.hamanndonald.com




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



RE: [PHP] building dynamic pdf files?

2002-02-17 Thread Bradley Goldsmith


Adobe distiller can do this (see abobe.com) - but there are cost/server
requirements.

-bcg


-Original Message-
From: Jeff D. Hamann [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 18, 2002 3:39 PM
To: [EMAIL PROTECTED]
Subject: [PHP] building dynamic pdf files?


I'm currently working on a web based application (in php) and saw the power
of being able edit fields in the pdf document. I can see how to build the
pdf file by hand, but I have a few dozen forms (multiple pages of course)
that I wish I could scan in and have a rough pdf file to start working with.
I've been generating html code using php, and would like to directly
generate pdf files as they look much better. Is there software out there
that I can import an html file into, or excel, or word and spit out the pdf
code, or something usable?

Thanks,
Jeff.

--
Jeff D. Hamann
Hamann, Donald  Associates, Inc.
PO Box 1421
Corvallis, Oregon USA 97339-1421
Bus. 541-753-7333
Cell. 541-740-5988
[EMAIL PROTECTED]
www.hamanndonald.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] Debate scripts

2002-02-17 Thread Tshering Norbu

Dear List,
Is there PHP scripts which I can use to conduct online debate at my website.
Say, I set a topic to debate on and people can post 'for' or 'against' it. I
think it needs to be different from the threaded discussion forum.

Could anyone suggest me where I can get it?

Thanks

NOBBY


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




[PHP] help with Header call

2002-02-17 Thread Robbie Newton

Hello everyone,

This is my first post to this list, so I hope that someone is awake enough to help me 
out. 

I am new to PHP and I have a file that uses a command header. It isn't working like 
it is supposed to but I can't seem to figure out why. Below is the last couple lines 
of the php file that is giving me trouble.

while ($row=mysql_fetch_row($result)) {
$II=$row[0];
}

Header(Location: $Relative/admin/upload.php?II=$II);

Basically all it does when the whole file is called is return page does not exist. The 
file that it refers to is there and the Var $Relative is used in many other scripts 
with no probs so I don't think that is it. Is passing the Var $II as part of the 
location incorrect? 

Any help is welcomed.

If you need to see more of the script to understand what I am talking about, I will 
post it.

TIA
-Robbie



Re: [PHP] storing arrays

2002-02-17 Thread Clark

I'm having trouble storing my array to a text file, utilizing serialize()
and unserialize().  Could you please show a very basic layout of the proper
way to serialize and unserialize and store that to a file?  Thanks.

Matt [EMAIL PROTECTED] wrote in message
001e01c1b7c0$404d5be0$059aa8c0@Pooch">news:001e01c1b7c0$404d5be0$059aa8c0@Pooch...

 - Original Message -
 From: Clark [EMAIL PROTECTED]
 Sent: Saturday, February 16, 2002 9:15 PM


  Two questions:
 
  1) Is it possible to write an array to a file?

 Yes, serialize it first with http://www.php.net/serialize.  You can also
 place this in a db text field because it will be a character
representation.

  2) Is it possible to specify the name of the key to each item of an
array
  when you get the array using file().

 When retrieving the saved array, unserialize it, and you'll get the same
 array back.




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




Re: [PHP] Include file for MySQL insert rows

2002-02-17 Thread Janet Valade

INCLUDE is not really what you are looking for. INCLUDE is more to read in
files that contain PHP code. If I'm understanding correctly, what you want
to do is to read each line from your file and put each line into a separate
variable. Then, you can create the INSERT statement for each row.

It might go something like this:

$fp = fopen(testsql,r) ;
while ($row = fgets($fp,1024))
{
$query = INSERT INTO catalogwinetmp VALUES $row;
   $result = mysql_query($query);
}

It looks like there might be something at the end of each line that you need
to remove before you construct the query. A comma on the first line and a
semicolon on the second line.

Janet



- Original Message -
From: Paul Fowler [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, February 17, 2002 8:17 PM
Subject: [PHP] Include file for MySQL insert rows


 I am very new at this and am having trouble migrating to php and mysql
from
 a different system (WebCatalog).

 I want to start dumping files to text and let php use them to populate
mysql
 on the fly as I start migrating.

 snip---

 $db  = mysql_pconnect(host, user, pass);

 $query = insert into catalogwinetmp values
 include(testsql);

 $result = mysql_query($query);

 ---end-snip

 The contents of testsql look like this

 (19, 38080, 'Senejac', 'Haut-Medoc / Cru Bourgeois', '', 12, 1995,
'Bottle -
 .75L', 'LN, LE, CI', 135, '/collectors/images/bottles/38080.JPG'),
 (20, 38780, 'Yquem', 'Sauternes / Premier Cru Superieur', '', 1, 1927,
 'Bottle - .75L', 'TS, LP, CI', 465,
'/collectors/images/bottles/38780.JPG');

 Just with more lines (1-18).

 But I can not get rid of errors in the
 $query = insert into catalogwinetmp values
 include(testsql);
 No matter what quotes and semi-colons I put in testsql or in this script.

 If I try to set the contents of the include into a variable as in:

 $rowsToAdd = include(testsql);

 all I get is the value 1, I guess this is because it is successful.

 If I could get a variable to contain the contents of the include I am not
 sure if I could use it in the script.

 I am not sure if I am even getting warm or if I am on another planet.


 1. Any ideas how I can simply make php get a text file into the mysql
 database?

 2. Is there a way to set a (albeit maybe large) variable with the contents
 of an include file?

 Sorry to sound like such a php newbie, but I am.

 Kind thanks,

 Paul


 --
 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] help with Header call

2002-02-17 Thread Martin Towell

make sure the url in the header(location:) is a full url and not a
relative url

Martin

-Original Message-
From: Robbie Newton [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 18, 2002 4:06 PM
To: [EMAIL PROTECTED]
Subject: [PHP] help with Header call


Hello everyone,

This is my first post to this list, so I hope that someone is awake enough
to help me out. 

I am new to PHP and I have a file that uses a command header. It isn't
working like it is supposed to but I can't seem to figure out why. Below is
the last couple lines of the php file that is giving me trouble.

while ($row=mysql_fetch_row($result)) {
$II=$row[0];
}

Header(Location: $Relative/admin/upload.php?II=$II);

Basically all it does when the whole file is called is return page does not
exist. The file that it refers to is there and the Var $Relative is used
in many other scripts with no probs so I don't think that is it. Is passing
the Var $II as part of the location incorrect? 

Any help is welcomed.

If you need to see more of the script to understand what I am talking about,
I will post it.

TIA
-Robbie



RE: [PHP] form submission error trapping

2002-02-17 Thread Navid Yar

Simply, to send a form to itself, you can use a special variable called
$PHP_SELF. Here's an example of how to use it:

if ($somevalue) {
   header(Location: $PHP_SELF);
} else {
   execute some other code...
}

Here, if $somevalue holds true, it will call itself and reload the same
script/file. This code is not very useful at all, but it gets the point
across. If you wanted to pass GET variables to this, then you could
easily say:

header(Location: $PHP_SELF?var=valuevar2=value2var3=value3);

...and so on. You can also use this approach with Sessions if you wanted
to turn the values back over to the form page, assuming you had two
pages: one for the form, and one for form checking and entry into a
database. There are several ways to check forms, whether you want it on
one page or span it out to several pages. You just need to be creative
in what tools are avaiable to you. Here is an example of how you can
pass session values:

header(Location: some_file.php??=SID?);

Here, whatever variables you've registered in session_register() will be
passed to the php page you specify, in this case some_file.php. Hope
this helps. Have fun, and happy coding.  :)


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




[PHP] Re: [PHP-DB] Updating Database at a specified time

2002-02-17 Thread Peter J. Schoenster

On 17 Feb 2002, at 21:01, Jennifer Downey wrote:

 Would someone please help? I have looked everywhere and can not find
 how to update a database at a certain time.
 
 I am trying to get this to update at midnight instead of every time
 the browser refreshes. My hosting service has cron jobs but I don't
 understand how to set them up. Is there a way to set this code up to
 do what I need?

I don't know how to run php code as a freestanding executable but it can be 
done. For cron, heck, I never remember the syntax either and my gui is no 
help so I always go this page that my host put up:

http://www.viaverio.com/support/virtual/admin/unix/cron.cfm

Rule is not to run anything at a give time.

So the following should probably at set to a different time. See above link 
for breakdown of fields (what they mean etc.).

Be sure that the time you think it is is actually the time it will run. My 
server for instance runs on GMT not my CST or even the EST where the 
server is located.

# Execute the vnukelog command at 12:00 midnight (0 0) on August 19
# (8) (aug).  
0 0 19 8 *  /usr/local/bin/vnukelog

You can always do a man cron to see info for your system.

Any hosting company worth anything will help you with at least once.

I'm not sure where STDOUT goes, I always have it sent to me via email by 
putting my email at the top of the cronfile (see above url of info on that).  
You seem to be printing to STDOUT  in the PHP snippet you sent.

I think you only want to do the update in your PHP script. I'm sure 
someone will show you how to do this via PHP, I don't know, I use Perl for 
this stuff.  Here's how I'd do it in Perl (MyDBI is a private module).

I suggest you check to make sure that your cron job runs properly (you'll be 
suprised at the number of times something happens where it doesn't).


use strict;
use MyDBI;

eval {
my $dbh = MyDBI-new(
data_source =  'dbi:mysql:database=x;host=x',
username=  '',
password=  ''',
);

my $sql = SELECT Subject,body,article_id,Born FROM news WHERE 
visibility is NULL ORDER BY article_id LIMIT 500;
my $sth = $dbh-{dbh}-prepare($sql);
$sth-execute();
};

if($@) {
print This script no go: $@;
}

exit;




Peter




http://www.readbrazil.com/
Answering Your Questions About Brazil

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




[PHP] Re: building dynamic pdf files?

2002-02-17 Thread michael kimsal

Jeff D. Hamann wrote:
 I'm currently working on a web based application (in php) and saw the power
 of being able edit fields in the pdf document. I can see how to build the
 pdf file by hand, but I have a few dozen forms (multiple pages of course)
 that I wish I could scan in and have a rough pdf file to start working with.
 I've been generating html code using php, and would like to directly
 generate pdf files as they look much better. Is there software out there
 that I can import an html file into, or excel, or word and spit out the pdf
 code, or something usable?

Seems a couple other answers pointed you to Adobe, but if you need to 
run this under Unix, you're kinda outta luck.  Adobe don't make current 
tools for Unix (as far as I can tell).

If you don't mind approximations, you might look at htmldoc (google 
search for HMTLDOC - I forget the address).  It'll take HTML files you 
generate and make PDFs from them.  Not bad for doing reports, etc.

txt2pdf is another one which isn't too bad, but I've not used much lately.

When you say 'start working with', what do you mean?  You want to 
further modify the PDF?  If so, with what tools?  Generally any produced 
PDF file is going to be 'done' - you won't be able to edit it 
programmatically.  PDFLIB has a PDI component which will let you modify 
preexisting PDFs, but it's not a cure all, and it costs about $1000.

If you need to discuss this further, shoot me an AIM tomorrow (mgkimsal) 
or another email with more specifics at [EMAIL PROTECTED]

Good luck...






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




[PHP] How to start a secure HTTP session?

2002-02-17 Thread gaukia 345

I heard from my coursemates it's just typing https:// instead of http://.

1) To enable secure http (SSL) session, what extensions should I install? To 
which one: Apache or PHP or Linux?
2) How do I know if my Apache and/or Linux and/or PHP support SSL?

Thanx


_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




Re: [PHP] How to start a secure HTTP session?

2002-02-17 Thread Janet Valade

To have a secure HTTP session, you must be communicating with a secure web
server. This is apache. It has nothing to do with PHP or Linux.

You classmate was right. The only difference for SSL is that you use https
instead of http. To find out if your server can communicate using SSL, try
it. If you try to access a web page using https and the server is not a
secure server, you will get an error message. Page connot be displayed.

If you are using Apache and you installed it yourself, if you did not do
extra stuff to make it SSL, then it is not. For more info, go to main apache
web site, www.apache.org, and follow links to apache-ssl and mod_ssl.

Janet

- Original Message -
From: gaukia 345 [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 18, 2002 5:43 AM
Subject: [PHP] How to start a secure HTTP session?


 I heard from my coursemates it's just typing https:// instead of http://.

 1) To enable secure http (SSL) session, what extensions should I install?
To
 which one: Apache or PHP or Linux?
 2) How do I know if my Apache and/or Linux and/or PHP support SSL?

 Thanx


 _
 Send and receive Hotmail on your mobile device: http://mobile.msn.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] Frustrating ?

2002-02-17 Thread jtjohnston

Heres's a frustrating, and maybe not so stupid question?

I'm getting Warning: Supplied argument is not a valid MySQL result
resource on this line:

while ($mydata = mysql_fetch_object($news))

So what am I doing wrong here:

$where = id like $id;
$news = mysql_query('select * from ccl where '.$where.' order by AU
desc'); //desc = z-a

 while ($mydata = mysql_fetch_object($news))
  {
 echo tr bgcolor=\#CC\td align=centera
href=\index.html?id=$mydata-id\Print
View/a/tdtd$mydata-id/tdtd$mydata-AU/tdtd$mydata-ST/tdtd$mydata-BT/td/tr\n;

  }#end of while

I've tried variations like:

$news = mysql_query('select * from ccl where id like $id order by AU
desc');
$news = mysql_query(select * from ccl where id like $id order by AU
desc);

$id checks out ok. I use index.html?id=4
AU exists; ok. So ... ?

John


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




[PHP] Report generator for Linux

2002-02-17 Thread Todd Cary

I use Interbase on the Linux and NT servers and I would like to have a
report generator that can take the results of a query and produce that
can be converted into a PDF file.

Does anyone have some suggestions on how I can best achieve this goal?

Todd

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

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

 Mark Twain



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




[PHP] Re: Frustrating ?

2002-02-17 Thread CC Zona

In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Jtjohnston) wrote:

 Heres's a frustrating, and maybe not so stupid question?
 
 I'm getting Warning: Supplied argument is not a valid MySQL result
 resource on this line:
 
 while ($mydata = mysql_fetch_object($news))
 
 So what am I doing wrong here:
 
 $where = id like $id;
 $news = mysql_query('select * from ccl where '.$where.' order by AU
 desc'); //desc = z-a

A) Have you already confirmed that a valid database connection was made?

B) String values in mysql have to be quoted.  For example, where 
foo='bar' or where foo like 'bar%'.

C) Error checking on database operations is a really good idea.  Even just 
a short or die() on the mysql_* calls can help you track down problems 
much more effectively.  For example:

$result=mysql_query($sql) or die(MySQL reports error: . mysql_error() .  
for query  . htmlentities($sql));

For more sophisticated error handling, see 
http://www.php.net/manual/en/ref.errorfunc.php.

-- 
CC

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




[PHP] More: Frustrating ?

2002-02-17 Thread jtjohnston

  while ($mydata = mysql_fetch_object($news))
  So what am I doing wrong here:
  $where = id like $id;
  $news = mysql_query('select * from ccl where '.$where.' order by AU desc');
 //desc = z-a

 A) Have you already confirmed that a valid database connection was made?

Yes. A copy and paste of working code:
$news = mysql_query(select * from ccl ORDER by AU asc);
Connection was made.

So I do?

$news = mysql_query(select * from ccl where '.$where.' order by AU desc);

or ?

$news = mysql_query(select * from ccl where '.%$where%.' order by AU desc);

The % are not necessary? because id is an auto_increment number from 0 to
1,000+.

Why the ' inside  ?


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




[PHP] Re: More: Frustrating ?

2002-02-17 Thread CC Zona

In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Jtjohnston) wrote:

   $where = id like $id;
snip
 So I do?
 
 $news = mysql_query(select * from ccl where '.$where.' order by AU desc);
 
 or ?
 
 $news = mysql_query(select * from ccl where '.%$where%.' order by AU desc);

Neither.  Where $id==1, these would interpolate to:

select * from ccl where '.id like 1.' order by AU desc
select * from ccl where '.%id like 1%.' order by AU desc

This is why repeaterror checking with an echo of your query to the 
browser/repeat is valuable.  You can see exactly what the complete query 
string looks like, and also copy/paste it to the commandline for further 
testing.

 The % are not necessary? because id is an auto_increment number from 0 to
 1,000+.

The like keyword is used with a wildcard operator, either % or _.  If 
you're matching against an exact value, then use the = operator instead 
of like.  See the MySQL manual for more info on the like keyword and 
wildcards.

If id has a numerical field type instead of one of the string types, you 
don't need to quote $id. See the MySQL manual for more info on quoting 
string values.

-- 
CC

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




AW: [PHP] More: Frustrating ?

2002-02-17 Thread Martin Lucas

hi john,
maybe this is the right way

$where=id like .$id;
$query=select * from ccl where '.$where.' order by AU desc;
$result=mysql_query($query);



regards
martin

 -Ursprüngliche Nachricht-
 Von: jtjohnston [mailto:[EMAIL PROTECTED]]
 Gesendet: Montag, 18. Februar 2002 08:00
 An: [EMAIL PROTECTED]
 Betreff: [PHP] More: Frustrating ?
 
 
   while ($mydata = mysql_fetch_object($news))
   So what am I doing wrong here:
   $where = id like $id;
   $news = mysql_query('select * from ccl where '.$where.' 
 order by AU desc');
  //desc = z-a
 
  A) Have you already confirmed that a valid database 
 connection was made?
 
 Yes. A copy and paste of working code:
 $news = mysql_query(select * from ccl ORDER by AU asc);
 Connection was made.
 
 So I do?
 
 $news = mysql_query(select * from ccl where '.$where.' order 
 by AU desc);
 
 or ?
 
 $news = mysql_query(select * from ccl where '.%$where%.' 
 order by AU desc);
 
 The % are not necessary? because id is an auto_increment 
 number from 0 to
 1,000+.
 
 Why the ' inside  ?
 
 
 -- 
 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] Text editor for linux

2002-02-17 Thread Josep Raurell

Quoting Torkil Johnsen [EMAIL PROTECTED]:

 Anyone know of a good text editor for linux, WITH syntax highlighting for
 php/html + other languages?
 
 - TOrkil
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


jedit

www.jedit.org

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




Re: [PHP] Text editor for linux

2002-02-17 Thread Alexander Weber

Josep Raurell wrote:
 
 Quoting Torkil Johnsen [EMAIL PROTECTED]:
 
  Anyone know of a good text editor for linux, WITH syntax highlighting for
  php/html + other languages?
 
  - TOrkil

vi

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




Re: [PHP] phpmyadmin-mysql

2002-02-17 Thread hugh danaher

Start with something like the following and add  mysql_list_dbs () to query
the system for the available databases.
Hugh

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
html
head
meta http-equiv=Content-Type content=text/html; charset=utf-8
titleInput Data Page/title
?php include (css.txt); ?
/head
body bgcolor=#1D3E81 
h1font color=#33DATABASE TABLES/font/h1

form action=?php print $php_self? method=post
?php

print table cellpadding=7 border=1 bgcolor=#d5d5d5trtd;
print h6Database name:/h6input type=text name=db STYLE=width:140px
/tdtd;
print h6Password:/h6input type=text name=pass STYLE=width:140px;
print /tdtd valign=middle align=centerinput type=submit value=\ go
\;
print input type=hidden name=start value=1;
print /td/tr/table/formbr;
if ($start==1)
 {
 $link=mysql_connect(localhost,,$pass);
 if (! $link) die(couldn't connect mysql);
 mysql_select_db($db,$link) or die (couldn't open $db .mysql_error());
 $tables=mysql_list_tables($db,$link);
 $num=mysql_num_rows($tables)-1;
 mysql_close($link);
 ?
 form action=?php print $php_self? method=post
 ?php
 print table cellpadding=7 border=1 bgcolor=#d5d5d5trtd;
 print h6Table Name: /h6select type=text name=table
STYLE=width:140pxoption;

 for ($i=0;$i=$num;$i++)
  {
  print option.mysql_tablename($tables,$i);
  }
 print /select;

 print /tdtdinput type=submit value=\ go  \;
 print input type=hidden name=start value=2;

 print input type=hidden name=db value=$db;
 print input type=hidden name=pass value=$pass;
 print /td/tr/table/formbr;
 }

if ($start==2)
 {
 $link=mysql_connect(localhost,,$pass);
 if (! $link) die(couldn't connect mysql);
 mysql_select_db($db,$link) or die (couldn't open $db .mysql_error());

 $results=mysql_query(select * from $table);
 $fields = mysql_list_fields($db, $table, $link);
 $columns = mysql_num_fields($fields);
 mysql_close($link);
 print table width=95% bgcolor=#d5d5d5 border=1 cellspacing=0
cellpadding=0trtd align=centerh3$table/h3;
 print table width=100% bgcolor=#d5d5d5 border=1 cellspacing=0
cellpadding=4;
 print tr;
 for ($i = 0; $i  $columns; $i++)
  {
  print td align=center bgcolor=#6c6c6ch5font
color=white.mysql_field_name($fields, $i)./font/h5/td;
  }
 print /tr;
 print tr;
 for ($i = 0; $i  $columns; $i++)
  {
  print td align=center bgcolor=#fbfbfbh5.mysql_field_type($results,
$i)./h5/td;
  }
 print /tr;
 while ($a_row=mysql_fetch_row($results))
  {
  print tr;
  foreach($a_row as $field)
   {
   if ($field==)
{
$field=nbsp;;
}
   print td align=centerh5.$field./h5/td;
   }
  print /tr;
  }
 print /table/td/tr/table;
 }
?
/body
/html


- Original Message -
From: jtjohnston [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, February 17, 2002 7:34 PM
Subject: [PHP] phpmyadmin-mysql


 Hello,

 I'm looking for code to display all my mysql databases in a select.
 On change, I want to display all my tables in a select.
 Finally, on change, it has to display all record of the table selected:

 Print Record


 id YR   AU   BT
  1 1997 Fee, Margery Writing Orality: Interpreting Literature
  Display in English by Aboriginal Writers in North
  America, Australia and New Zealand

 Can someone give me a hand getting started?
 I would normally use phpmyadmin, but I want to customise something they
 don't offer.




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