[PHP] Real-Time Form Updating

2005-11-18 Thread Chase
I am trying to build an order form for our clients to use to order hardware 
and software, or atleast get a price quote for such.  The page is done and 
working using a FORM POST to a second page taht works on the variables and 
generates the totals.

That being siad, I have a field for total number of users that I would like 
to calculate the total of about five variables in real-time, before the 
submit button is activated.  Is this possible? 

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



[PHP] Re: Real-Time Form Updating

2005-11-18 Thread Chase
Yikes...  I am dreadfully sorry to have offended everyone with my OBVIOUSLY 
non-PHP question.  I will look to JavaScript for help in this matter.

Please end the spiteful personal emails regarding this topic.


Chase [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
I am trying to build an order form for our clients to use to order hardware 
and software, or atleast get a price quote for such.  The page is done and 
working using a FORM POST to a second page taht works on the variables and 
generates the totals.

 That being siad, I have a field for total number of users that I would 
 like to calculate the total of about five variables in real-time, before 
 the submit button is activated.  Is this possible? 

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



[PHP] Re: Real-Time Form Updating

2005-11-18 Thread Chase
Yikes...  I am dreadfully sorry to have offended everyone with my OBVIOUSLY 
non-PHP question.  I will look to JavaScript for help in this matter.

Please end the spiteful personal emails regarding this topic.


Chase [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
I am trying to build an order form for our clients to use to order hardware 
and software, or atleast get a price quote for such.  The page is done and 
working using a FORM POST to a second page taht works on the variables and 
generates the totals.

 That being siad, I have a field for total number of users that I would 
 like to calculate the total of about five variables in real-time, before 
 the submit button is activated.  Is this possible? 

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



[PHP] Newbie Setup...

2005-06-16 Thread Chase
Hi there!
  I have been stumbling my way through PHP for a while now and I have 
finally decided that I need to set up my development machine with a local 
testing / debugging setup so that I can stop uploading all of my blunders to 
my public site to test...
  I am running XP Pro SP2 with IIS installed and running...  Where do I need 
to go from here?  I have downloaded the latest PHP Windows Binary but I 
don't know if I should install it first, or if I should try to find MySQL to 
install first...  Any help on setting up this monster would be helpful!!!

TIA!

Chase 

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



[PHP] Variables not passing...

2004-03-04 Thread Chase
Okay, I am sure this will be painfully simple, but I have looked it over for
a couple of hours now, and I am obviously missing something.  I am trying to
get a start date and a stop date via input from a user to use as variables
in a MySQL query, but for some reason, I can't get the variable to pass from
one page to the next...  Will one of you masters help me find my goof?

First page has the following at the top of the code:
?php
session_start();
$_SESSION['startdate'] = $startdate;
$_SESSION['stopdate'] = $stopdate;
?


Then I am getting the data entry in the following form code:
form name=viewbydate method=post
action=javascript:popUp('viewbydate.php')
  li All reports from one date to another: Start
input name=startdate type=text size=15 maxlength=30
Stop
input name=stopdate type=text size=15 maxlength=30
input name=button2 type=submit value=GO
  /form


The second page starts by displaying this info:
h1 align=centerstrongReports received between ?php echo $startdate;
? and ?php echo $stopdate; ?:/strong/h1


The regular text displays, but there is just white space where the
$startdate and $stopdate should be.

Thanks in Advance!!
Chase

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



Re: [PHP] Variables not passing...

2004-03-04 Thread Chase
Thank you!  It looks like it was a combination of my NOT using the $_POST
and the fact that my JScript wasn't allowing the variables to pass...  WHO
KNEW?!?

THANKS!!!
Chase


[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Is there a session_start() on the second page ?

 Also i didnt know u could set an action to a jscript popup, it may not be
 posting to the second page. What you could try is posting to the second
 page like a normal post, u need to do something like


 session_start();
 $_SESSION['startdate'] = $_POST['startdate'];
 $_SESSION['stopdate'] = $_POST['stopdate'];

 in the second page

 u only need this if u are then redirecting to yet another page

 else just do a

  h1 align=centerstrongReports received between ?php echo
  .$_POST['startdate'].; ? and ?php echo $_POST['stopdate']; ?
 :/strong/h1


 something like that


  Okay, I am sure this will be painfully simple, but I have looked it
  over for a couple of hours now, and I am obviously missing something.
  I am trying to get a start date and a stop date via input from a user
  to use as variables in a MySQL query, but for some reason, I can't get
  the variable to pass from one page to the next...  Will one of you
  masters help me find my goof?
 
  First page has the following at the top of the code:
  ?php
  session_start();
  $_SESSION['startdate'] = $startdate;
  $_SESSION['stopdate'] = $stopdate;
  ?
 
 
  Then I am getting the data entry in the following form code:
  form name=viewbydate method=post
  action=javascript:popUp('viewbydate.php')
   li All reports from one date to another: Start
 input name=startdate type=text size=15 maxlength=30
 Stop
 input name=stopdate type=text size=15 maxlength=30
 input name=button2 type=submit value=GO
   /form
 
 
  The second page starts by displaying this info:
  h1 align=centerstrongReports received between ?php echo
  $startdate; ? and ?php echo $stopdate; ?:/strong/h1
 
 
  The regular text displays, but there is just white space where the
  $startdate and $stopdate should be.
 
  Thanks in Advance!!
  Chase
 
  --
  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] Variables not passing...

2004-03-04 Thread Chase
One other irritation for the evening...  The MySQL query that I am trying to
create needs to use the date the user enters and then add  @ 12:01am EST
to it so it will acutally match the data in the table.  Below is my quesry
line, but I don't know how to add that chunk to each of the variables...

$result = mysql_query(SELECT * FROM $table WHERE 'submit_date' =
'$startdate' AND 'submit_date' = '$stopdate' ORDER BY 'submit_date' DESC,
$link);



[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Is there a session_start() on the second page ?

 Also i didnt know u could set an action to a jscript popup, it may not be
 posting to the second page. What you could try is posting to the second
 page like a normal post, u need to do something like


 session_start();
 $_SESSION['startdate'] = $_POST['startdate'];
 $_SESSION['stopdate'] = $_POST['stopdate'];

 in the second page

 u only need this if u are then redirecting to yet another page

 else just do a

  h1 align=centerstrongReports received between ?php echo
  .$_POST['startdate'].; ? and ?php echo $_POST['stopdate']; ?
 :/strong/h1


 something like that


  Okay, I am sure this will be painfully simple, but I have looked it
  over for a couple of hours now, and I am obviously missing something.
  I am trying to get a start date and a stop date via input from a user
  to use as variables in a MySQL query, but for some reason, I can't get
  the variable to pass from one page to the next...  Will one of you
  masters help me find my goof?
 
  First page has the following at the top of the code:
  ?php
  session_start();
  $_SESSION['startdate'] = $startdate;
  $_SESSION['stopdate'] = $stopdate;
  ?
 
 
  Then I am getting the data entry in the following form code:
  form name=viewbydate method=post
  action=javascript:popUp('viewbydate.php')
   li All reports from one date to another: Start
 input name=startdate type=text size=15 maxlength=30
 Stop
 input name=stopdate type=text size=15 maxlength=30
 input name=button2 type=submit value=GO
   /form
 
 
  The second page starts by displaying this info:
  h1 align=centerstrongReports received between ?php echo
  $startdate; ? and ?php echo $stopdate; ?:/strong/h1
 
 
  The regular text displays, but there is just white space where the
  $startdate and $stopdate should be.
 
  Thanks in Advance!!
  Chase
 
  --
  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] Passing Variables Into mail()????

2004-02-25 Thread Chase
That didn't seem to work Richard...  Now this is what my resulting email
looks like...
Submit Date: $submit_date

IP Address: $ip_address

Dealer Number: $dealer_number

Employee Name: $tester_name

Module / Screen Name: $module_name

Report:
$report

Richard Davey [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hello Chase,

 Wednesday, February 25, 2004, 5:26:14 AM, you wrote:

 C None of the variables that are displayed on the result page or
 C injected into the database are showing in the email that I receive
 C from the form.

 C $message = '
 C html
 C body
 C pThe following information was added to the v5 tracking record:/p
 C pstrongSubmit Date: ? echo $submit_date; ?/strongbr
 C   strongIP Address: ? echo $ip_address; ?br

 You shouldn't be echo'ing from inside a variable! Try this instead:

 $message = 
 html
 body
 pThe following information was added to the v5 tracking record:/p
 pstrongSubmit Date: $submit_date/strongbr
 strongIP Address: $ip_addressbr
 ;

 etc.. you get the idea.

 -- 
 Best regards,
  Richard Davey
  http://www.phpcommunity.org/wiki/296.html


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



Re: [PHP] Passing Variables Into mail()????

2004-02-25 Thread Chase
Problem solved, thanks Richard...

..You had my solution, but I don't know if it was entirely what you said...
As it turns out, it makes a difference that my $message variable was
enclosed only in single quotes, not double quotes...  who knew?

Chase [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 That didn't seem to work Richard...  Now this is what my resulting email
 looks like...
 Submit Date: $submit_date

 IP Address: $ip_address

 Dealer Number: $dealer_number

 Employee Name: $tester_name

 Module / Screen Name: $module_name

 Report:
 $report

 Richard Davey [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Hello Chase,
 
  Wednesday, February 25, 2004, 5:26:14 AM, you wrote:
 
  C None of the variables that are displayed on the result page or
  C injected into the database are showing in the email that I receive
  C from the form.
 
  C $message = '
  C html
  C body
  C pThe following information was added to the v5 tracking record:/p
  C pstrongSubmit Date: ? echo $submit_date; ?/strongbr
  C   strongIP Address: ? echo $ip_address; ?br
 
  You shouldn't be echo'ing from inside a variable! Try this instead:
 
  $message = 
  html
  body
  pThe following information was added to the v5 tracking record:/p
  pstrongSubmit Date: $submit_date/strongbr
  strongIP Address: $ip_addressbr
  ;
 
  etc.. you get the idea.
 
  -- 
  Best regards,
   Richard Davey
   http://www.phpcommunity.org/wiki/296.html


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



[PHP] Passing Variables Into mail()????

2004-02-24 Thread Chase
I am trying to create a page that will display the results of a form as they
are being added into a database as well as forward that info via email to
multiple recipients.  I sucked code from the .CHM file available at PHP/NET,
and it is working with one small issue...  None of the variables that are
displayed on the result page or injected into the database are showing in
the email that I receive from the form.

Any help would be awesome...  Mail code follows:


-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
/* recipients */
$to  = [EMAIL PROTECTED] . ,  ;
$to .= [EMAIL PROTECTED];

/* subject */
$subject = ***V5 ERROR REPORT***;

/* message */
$message = '
html
body
pThe following information was added to the v5 tracking record:/p
pstrongSubmit Date: ? echo $submit_date; ?/strongbr
  strongIP Address: ? echo $ip_address; ?br
  Dealer Number: ? echo $dealer_number; ?br
  Employee Name: ? echo $tester_name; ?br
  Module / Screen Name: ? echo $module_name; ?br
  Report:br
   ? echo $report; ?
  /strong/p
/body
/html
';

/* To send HTML mail, you can set the Content-type header. */
$headers  = MIME-Version: 1.0\r\n;
$headers .= Content-type: text/html; charset=iso-8859-1\r\n;

/* additional headers */
$headers .= From: V5 ERROR REPORT [EMAIL PROTECTED]\r\n;

/* and now mail it */
mail($to, $subject, $message, $headers);

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



[PHP] Create Links on the fly?

2003-05-29 Thread Chase
Salutations!

I am trying to do something fairly simple, but I can't seem to make it
work...  I want to have a form field on a page that the user will put in a 3
to 5 digit number and when they click on Submit that number will become
part of an URL that they are forwarded to.

For example, if the user put in the number 123, then when they click on
Submit they would be pushed to http://www.mypage.com/123.

Can anyone offer help??



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



Re: [PHP] What happened to phpEdit???

2003-02-17 Thread Chase Urich
It worked just fine for me, even just phpedit.net worked.

Cahse
On Mon, 2003-02-17 at 18:21, Al wrote:
 Did you try the URL you posted?
 
 I tried that one and several others listed for phpEdit.
 
 All say the site is not responding.
 
 Bryan Lipscy wrote:
  Did you check google?
  http://ozu.arecom-sa.com/~marms/phpedit.net/
  
  -Original Message-
  From: Al [mailto:[EMAIL PROTECTED]] 
  Sent: Sunday, February 16, 2003 8:39 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] What happened to phpEdit???
  
  
  Their site no longer responds.
  
  Surely, we haven't lost one of the best php editors.
  
  
 


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




[PHP] Apache2 PHP4

2002-12-20 Thread Chase Urich
OK, so I've spent the last 2 or 3 hours looking on the net for this.
Can anyone tell me the proper way (with Apache 2.0.40) to instruct
apache to process .htm and .html files?

I've tried:
In /etc/httpd/conf/httpd.conf ::
AddType application/x-httpd-php .php
AddType application/x-httpd-php .html
And also in /etc/httpd/conf.d/php.conf ::
AddType application/x-httpd-php .php
AddType application/x-httpd-php .html

Neither appears to work or affect anything at all. I have also tried:
Files *.html
SetOutputFilter PHP
SetInputFilter PHP
/Files
... in the php.conf file, but my guess is that this wouldn't work unless
something like the AddType points to PHP to begin with.

Can anyone give me some ideas? I'm just fine with Apache 1.3, but RH8
ships with Apache2 and I thought I'd try it ...

Chase


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




Re: [PHP] MySQL Server

2002-12-03 Thread Chase
Thanks for the info...  As it turns out, I am just a blithering idiot...  I
didn't know that I had to create a separate user...  As I said, that shows
my newbieness...

However, this has lead me to another question...  The default database,
mysql, comes with a users file already...  How do I create that in a new
database??  Or can I just copy the existing to a new database?

Chase


Jason Wong [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 On Tuesday 03 December 2002 23:09, Chase wrote:
  I am the first to admit that this question belongs on a MySQL newsgroup
  instead of here, but I can't seem to find a newsgroup that will answer
  me...

 www.mysql.com

  Here is a newbie question.  I am running a Win2K Advanced Server with
IIS
  5?, PHP4, and MySQLmax 3.23.53.  I am by no means experienced in
setting
  up any of these items, but my simple question is, how do I determine the
  name of the MySQL server so I can get PHP to connect to it?

 If they're all on the same server use 'localhost'.

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

 /*
 My father was a God-fearing man, but he never missed a copy of the
 New York Times, either.
 -- E.B. White
 */




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




[PHP] MySQL Server

2002-12-03 Thread Chase
I am the first to admit that this question belongs on a MySQL newsgroup
instead of here, but I can't seem to find a newsgroup that will answer me...

Here is a newbie question.  I am running a Win2K Advanced Server with IIS
5?, PHP4, and MySQLmax 3.23.53.  I am by no means experienced in setting
up any of these items, but my simple question is, how do I determine the
name of the MySQL server so I can get PHP to connect to it?

My PHP is installed and running great, but if I can't hook up to my database
it doesn't do me any good.

TIA
Chase



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




[PHP] Newbie Mail() Question...

2002-11-27 Thread Chase
Is there a way to have an email sent to a specified email address either
when a page is accessed, or when a file is downloaded?

Maybe I should just be logging the info into a table?

Basically, I am trying to set up a secure site that would send the sysadmin
an email when a file has been downloaded with reference to the page title
and/or filename.

I have a feeling that this may be a bit too complicated for a newbie like
me...

...Suggestions?


Chase




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




Re: [PHP] Newbie: element index array

2002-11-24 Thread Chase Urich
unset($a['element2']);

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

 I would like to ask that how can I completely delete the $a['element2'] in
 the array? That's mean I will get 'false' in 'isset($a['element2']) after
 the delete process is taken place.
-- 
Linux: Because rebooting is for adding hardware.
Fingerprint = CE24 057D 1E88 A253 3196 89DB 9FF0 9EF0 2F70 8BE8 BE8



signature.asc
Description: This is a digitally signed message part


Re: [PHP] SQLInsert and recover the ID

2002-10-31 Thread Chase Urich
Check out mysql_insert_id()

 For the moment, I do a select max(Id) just after the insert but there
 is, my be a best way to do it.
-- 
Linux: Because rebooting is for adding hardware.
Fingerprint = CE24 057D 1E88 A253 3196 89DB 9FF0 9EF0 2F70 8BE8 BE8



signature.asc
Description: This is a digitally signed message part


RE: [PHP] what do you think?

2002-09-27 Thread Chase Urich

Ditto.

Chase
On Fri, 2002-09-27 at 07:34, Miles Thompson wrote:
 
 Fully concur.
 
 mt
 
 At 01:26 PM 9/27/2002 +0100, Ford, Mike   [LSS] wrote:
   -Original Message-
   From: Arminas [mailto:[EMAIL PROTECTED]]
   Sent: 27 September 2002 11:38
  
   about http://smanager.web1000.com/
 
 I think the page needs a drastic proof-read and grammar check -- I have 
 trouble understanding what some of it is even trying to say.  And I 
 haven't a clue what ASSAY TO INTEGRATE MANAGEMENT is supposed to mean!
 
 It looks like a nice product, but I wouldn't even evaluate it after 
 looking at this because I'd be worried about having to spend too much time 
 trying to decipher it's output.
 
 Cheers!
 
 Mike
 
 -
 Mike Ford,  Electronic Information Services Adviser,
 Learning Support Services, Learning  Information Services,
 JG125, James Graham Building, Leeds Metropolitan University,
 Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
 Email: [EMAIL PROTECTED]
 Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211
 
 --
 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
-- 
PGP Fingerprint = CE24 057D 1E88 A253 3196 89DB 9FF0 9EF0 2F70 8BE8



signature.asc
Description: This is a digitally signed message part


Re: [PHP] Strange 1 after include

2002-09-23 Thread Chase Urich

?=include(“menu.inc”)? tells PHP to echo out the result of
include(“menu.inc”), which just happens to be a success code (1). The
second for simply includes the file without echoing out anything.

Chase
On Mon, 2002-09-23 at 02:45, César Aracena wrote:
 Hi all,
  
 I’m wondering why does a number 1 appears in the output after the
 included text has been showed. I have a menu file for including and I
 just put ?=include(“menu.inc”)? but then the output shows:
  
 Back to Index
 1
  
 and I don’t have that number in either my script nor my include file. If
 I put:
  
 ?
 Include (“menu.inc”);
 ?
  
 it shows normally without the 1… Why is that?
  
 Thanks,
  
 Cesar Aracena mailto:[EMAIL PROTECTED] 
 On Dial-Up
 CE / MCSE+I
 Neuquen, Argentina
 +54.299.6356688
 +54.299.4466621
  
-- 
PGP Fingerprint = CE24 057D 1E88 A253 3196 89DB 9FF0 9EF0 2F70 8BE8



signature.asc
Description: This is a digitally signed message part


[PHP] Newbie Parse error

2002-09-02 Thread Chase Knott

I am sure that someone here can see somehting that I am too stupid to... 
  Here is my error:

Parse error: parse error, unexpected T_VARIABLE in send_contact_form.php 
on line 13

Here is the code for the page:

?

$msg = E-Mail From MCV Contact Form\n;
$msg .= Sender's Name: \t$sender.name\n;
$msg .= Sender's E-Mail Address: \t$sender.email\n;
$msg .= Sender's Subject: \t$sender.subject\n;
$msg .- Sender's Message: \t$sender.message\n\n;

$to = \t$recipient;

$subject = Message From MCV Contact Form

$mailheaders = From MyComputerVendor\n;
$mailheaders .= Reply-To: $sender.email\n\n;

mail($to, $subject, $msg, $mailheaders);

html
head
titleMessage Sent!/title
/head

body
pThe Following Message Was Sent To: ? echo $recipient; ?/p
pName:br
? echo $sender.name; ?/p
pE-Mail Address:br
? echo $sender.email; ?/p
pSubject:br
? echo $sender.subject; ?/p
pMessage:br
? echo ?sender.message; ?/p

/body
/html


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




[PHP] Re: Newbie Parse error

2002-09-02 Thread Chase Knott

Thank you...  I knew it was something stupid, but I was too close to see 
it...  Thank you!!

Erwin wrote:

I am sure that someone here can see somehting that I am too stupid
to...   Here is my error:

Parse error: parse error, unexpected T_VARIABLE in
send_contact_form.php on line 13

$subject = Message From MCV Contact Form

 
 Forgot a ;?
 
 HTH Erwin
 
 
 
 


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




Re: [PHP] Newbie Parse error

2002-09-02 Thread Chase Knott

Maybe you can help me with YOUR eyes again...  Now I am getting this 
error...

Parse error: parse error, unexpected '' in send_contact_form.php on line 18

This will be around the html line...


John Wards wrote:

 $subject = Message From MCV Contact Form
  you have missed out a ; on the above line
 
 use your eyes...:-)
 
 John
 - Original Message - 
 From: Chase Knott [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, September 02, 2002 4:18 PM
 Subject: [PHP] Newbie Parse error
 
 
 
I am sure that someone here can see somehting that I am too stupid to... 
  Here is my error:

Parse error: parse error, unexpected T_VARIABLE in send_contact_form.php 
on line 13

Here is the code for the page:

?

$msg = E-Mail From MCV Contact Form\n;
$msg .= Sender's Name: \t$sender.name\n;
$msg .= Sender's E-Mail Address: \t$sender.email\n;
$msg .= Sender's Subject: \t$sender.subject\n;
$msg .- Sender's Message: \t$sender.message\n\n;

$to = \t$recipient;

$subject = Message From MCV Contact Form

$mailheaders = From MyComputerVendor\n;
$mailheaders .= Reply-To: $sender.email\n\n;

mail($to, $subject, $msg, $mailheaders);

html
head
titleMessage Sent!/title
/head

body
pThe Following Message Was Sent To: ? echo $recipient; ?/p
pName:br
? echo $sender.name; ?/p
pE-Mail Address:br
? echo $sender.email; ?/p
pSubject:br
? echo $sender.subject; ?/p
pMessage:br
? echo ?sender.message; ?/p

/body
/html


-- 
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] Newbie Parse error

2002-09-02 Thread Chase Knott

I thank you...  I love these newsgroups, but I tend to feel REALLY 
stupid when the answer comes...  Thanks again!

Chase

[EMAIL PROTECTED] wrote:

 You have forgotten a ? before your HTML starts.
 
 / Martin
 
 Citat Chase Knott [EMAIL PROTECTED]:
 
 
Maybe you can help me with YOUR eyes again...  Now I am getting this 
error...

Parse error: parse error, unexpected '' in send_contact_form.php on
line 18

This will be around the html line...


John Wards wrote:


$subject = Message From MCV Contact Form
 you have missed out a ; on the above line

use your eyes...:-)

John
- Original Message - 
From: Chase Knott [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, September 02, 2002 4:18 PM
Subject: [PHP] Newbie Parse error




I am sure that someone here can see somehting that I am too stupid

to... 

 Here is my error:

Parse error: parse error, unexpected T_VARIABLE in

send_contact_form.php 

on line 13

Here is the code for the page:

?

$msg = E-Mail From MCV Contact Form\n;
$msg .= Sender's Name: \t$sender.name\n;
$msg .= Sender's E-Mail Address: \t$sender.email\n;
$msg .= Sender's Subject: \t$sender.subject\n;
$msg .- Sender's Message: \t$sender.message\n\n;

$to = \t$recipient;

$subject = Message From MCV Contact Form

$mailheaders = From MyComputerVendor\n;
$mailheaders .= Reply-To: $sender.email\n\n;

mail($to, $subject, $msg, $mailheaders);

html
head
titleMessage Sent!/title
/head

body
pThe Following Message Was Sent To: ? echo $recipient; ?/p
pName:br
? echo $sender.name; ?/p
pE-Mail Address:br
? echo $sender.email; ?/p
pSubject:br
? echo $sender.subject; ?/p
pMessage:br
? echo ?sender.message; ?/p

/body
/html


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



 
 
 
 mvh
 
 Martin Hjort Eriksen
 Studenterrådet, Roskilde Universitetscenter
 - Slut på videresendt brev -
 
 
 
 mvh
 
 Martin Hjort Eriksen
 Studenterrådet, Roskilde Universitetscenter
 


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




RE: [PHP] web services and PHP

2002-07-31 Thread Andrew Chase

There is also a PEAR SOAP package available:

http://pear.php.net/package-info.php?pacid=87

Some web services also use XML-RPC, a simpler predecessor to SOAP:

http://www.xmlrpc.com

There are a couple of PHP classes available for implementing XML-RPC clients
and servers:

http://phpxmlrpc.sourceforge.net/


-Andy

 -Original Message-
 From: Andrey Hristov [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 31, 2002 2:40 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] web services and PHP



  There are two ways (SOAP) to use SOAP library written in PHP
 such as NuSOAP
 by Dietrich Ayala or to use
 PHP-SOAP toolkit (module for PHP written in C)by Brad
 Lafountain(coding) and
 Shane Caraveo(testing) (available at sourceforge.net).


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




RE: [PHP] Creating Image...

2002-07-31 Thread Andrew Chase

To write a GD image to disk as a jpeg, do this instead:


$im = imagecreate(50,100);

imagejpeg($im, test/im.jpg);


You don't need to use file handlers. Of course, without doing anything like
adding text or lines to $im, it will just be written to disk as a blank
image. :)

-Andy

 -Original Message-
 From: mp [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 31, 2002 11:11 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Creating Image...


 I want to create simple image...
 I execute this script:

  $im = imagecreate (50, 100);
  $fp = fopen(test/im.jpg,w);
  fwrite($fp, imagegd($im));
  fclose($fp);

 But there is some problems about this...
 Could somebody help me?
 Could somebody help me?


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




RE: [PHP] MySQL Backup and Restore

2002-07-24 Thread Andrew Chase

I encountered that same timeout problem once, and I wound up just installing
my own copy of PhpMyAdmin in an .htaccess protected directory on the server,
and extending the time limit there.  It only took about 10 minutes to set
up, and as an added bonus it was a more recent version of PhpMyAdmin than
the one the host provided. :)

-Andy

 -Original Message-
 From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]

 I've never had any luck using PHPMyAdmin for dumping databases.
 They always
 time out over the 30 second limit. I know if it was my
 installation, I could
 fix it, but these are usually with hosting companies, where
 that's the only
 access they provide. It's very much a pain in the butt...


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




RE: [PHP] Re: PHP Security Advisory: Vulnerability in PHP versions 4.2.0

2002-07-23 Thread Andrew Chase

If all you're doing is applying the patch (not adding/removing any
extensions), you should be able to use

./config.nice

which will use all of the configuration commands from your last compile
(This is an extremely handy thing if your GD/Freetype setup was particularly
ornery the first time around! ;) )

-Andy

 -Original Message-
 From: Ricky Dhatt [mailto:[EMAIL PROTECTED]]

 ./configure --with-mysql --with-apxs=/usr/local/apache/bin/apxs
 --with-ldap
  make
  make install
  /usr/local/apache/bin/apachectl restart

 Hmm...is the configure step really necessary?


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




RE: [PHP] Any PHP editor for windows

2002-07-18 Thread Andrew Chase

ftp://ftp.gnu.org/gnu/windows/emacs/latest

A helpful Emacs resource:
http://www.emacswiki.org/cgi-bin/wiki.pl

Be sure to download php-mode for Emacs, too!
http://sourceforge.net/projects/php-mode/

And PSGML if you do much with HTML/XHTML/XML:
http://www.lysator.liu.se/projects/about_psgml.html

-Andy

 -Original Message-
 From: Dasmeet Singh [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, July 18, 2002 2:59 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Any PHP editor for windows
 
 
 Hey, does anyone knows of a good PHP editor for windows. I have also 
 heard emacs is available for windows. Does anyone know where to download 
 it from?
 Dasmeet
 http://www.einfotimes.com 

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




RE: [PHP] Re: gd -1:image resolution 2:font quality

2002-07-12 Thread Andrew Chase

The GIMP is free (as in speech), and I've found it to work quite well on
windows:
http://www.gimp.org/

The GIMP for Windows page:
http://www.gimp.org/~tml/gimp/win32/

-Andy

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 My idea to solve the problem:
 1:Picture to create with gd, scale up by factor 69.4[?] (for 600dpi )
   Result is an huge 72 dpi picture.
 2:Resize and convert result picture to 600dpi by an external program.

 Next question:
 Which external program I can use?
 Have to work on windows 2.
 This is not the reason for my lack of english skills ;)


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




RE: [PHP] using pdf template

2002-07-11 Thread Andrew Chase

There are a couple of different PHP classes that people have written to make
PDF creation easier... maybe they would streamline the process enough that
you can make them from scratch after all.

http://www.pc4p.net/
http://ros.co.nz/pdf/

I didn't know about those the last time I had to deal with PDF generation,
but they look pretty useful.  Creating complex PDFs with just the base
PDFLib functions is definitely a pain. :)

-Andy

 -Original Message-
 From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
 Only using the commercial PDI library from pdflib.com

 On Thu, 11 Jul 2002, Tobias Talltorp wrote:

  Is it possible to produce a PDF, use it as a template and populate
  predefined sections of it from a database?
  The PDFs I want to create are a little too complex for me to
 produce from
  scratch.


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




RE: [PHP] Security with XML

2002-07-10 Thread Andrew Chase

You could store passwords as MD5 hashes which of course is NOT really
encryption, but it would obfuscate the users' passwords.  They would still
be vulnerable to social engineering (Hmm, I'll try his wife's name, then
his dog's name, then his phone#, etc) and brute force (I'm going to run
every word in the pspell dictionary through MD5 and see if anything
matches) attacks, but it would be better than plain text, at least.

So, instead of

user
nameFoo/name
passwordbar/password
/user

you would have
user
nameFoo/name
password37b51d194a7513e45b56f6524f2d51f2/password
/user

When 'Foo' tries to log in, you would just use MD5() on the password he
entered in the web form and compare it to the value in the XML file.  If it
matches, he's in... otherwise, it's not the right password.

I'm sure others will come up with more secure ideas, but anything is more
secure than passwords in plain text. :)

-Andy

 -Original Message-
 From: Chris Earle [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 10, 2002 9:42 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Security with XML


 I've created a db like system with XML and PHP, and I want to require a
 username/password to change the contents of the file.

 How should I go about documenting the username/password?  The contents of
 the site aren't really all to important (no financial info or
 anything like
 that, mostly just links actually), but I don't want someone's information
 stolen because someone found the users.xml file and opened it.


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




RE: [PHP] Editing Word Documents

2002-07-09 Thread Andrew Chase

Hmm, I don't know about intercepting the Save As... option from word to
trigger a PHP URL, but you could direct people to save their edited word
files to a specific directory on a network share on a PHP-enabled server
(easy enough on a Windows network, and not too much harder with Samba on
Linux)... then you could run a PHP script as a cron job to check for
modified files in that directory every five or ten minutes, and have the
script upload them as needed.

It's not instantaneous, and there would definitely be some logistics to work
out (what if two people are editing the same file at the same time, how do
you account for that 5-10 minute lag, etc.) but it might be better than
nothing.

-Andy

 -Original Message-
 From: Chris Hewitt [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 09, 2002 3:47 AM
 To: Kevin Stone
 Cc: David Russell; php-general
 Subject: Re: [PHP] Editing Word Documents


 I think what the OP meant (certainly what I meant), is that the Word doc
 is accessed from a normal link. Clients use windows and the browser has
 the .doc mime type set and spawns Word. The user edits it. I had
 (vainly) hoped for a way of setting the File..Save As to trigger PHP's
 File Upload facility.

 Has anyone had this need, found a way around it or found it not possible?



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




RE: [PHP] parsing of SSI scripts.

2002-07-03 Thread Andrew Chase

I'm not sure if Apache will recursively process documents this way (Perl script - 
HTML output with embedded PHP - parsed PHP), but what about adding this HTTP header 
to your PERL script's output before the HTML/PHP code:

Content-type: application/x-httpd-php

That way Apache would (in theory) know know that the PERL script's output should be 
parsed by PHP.  

-Andy

 -Original Message-
 From: Sandman [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 03, 2002 1:09 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] parsing of SSI scripts.
 
 
 In article 008c01c222c9$fa9c3fb0$2f7e3393@TB447CCO3,
  [EMAIL PROTECTED] (1lt John W. Holmes) wrote:
 
  I think I misunderstood your question. You have a Perl script 
 that returns
  HTML and SSI and you want that string, returned to PHP, to be parsed by
  Apache, so the SSI is evaluated, right?
  
  Okay, now that I've sorted that out, I don't have an answer for 
 you. Sorry.
  It seems like a very bad way to do things and you're making 
 things harder
  than they should be.
  
  In thinking about it, are you really sure that virtual won't do what you
  want?
  
  http://www.php.net/manual/en/function.virtual.php
  
  virtual() is an Apache-specific function which is equivalent to 
 !--#include
  virtual...-- in mod_include. It performs an Apache sub-request. It is
  useful for including CGI scripts or .shtml files, or anything 
 else that you
  would parse through Apache. Note that for a CGI script, the script must
  generate valid CGI headers. At the minimum that means it must generate a
  Content-type header. For PHP files, you need to use include() 
 or require();
 
 
 
  virtual() cannot be used to include a document which is itself 
 a PHP file.
   
 ^^
 
 But my SSI script outputs data that contains PHP scripts, which I want to 
 have parsed.
 
 -- 
 Sandman[.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




[PHP] Dynamic List Boxes

2002-06-29 Thread Chase

I am *very* new to PHP, so this may seem like a stupid question...  I am 
trying to generate dynamic drop-down lists for use in an HTML form, but 
I have done something wrong with my code.  Instead of getting one list 
box with three options, I am getting three list boxes with one option. 
I have included this piece of my code...  Can anyone help???


?
$link = mysql_connect(localhost, user, pass);
mysql_select_db(my_db, $link);

$result = mysql_query(SELECT SKU, Description, Retail FROM linecard 
WHERE sku=61 or sku=239 or sku=318, $link);
$num_rows = mysql_num_rows($result);

if($num_rows) {
while($row = mysql_fetch_row($result))

{
   print(select name=\test\);
   print(option value=\$row[0]-$row[1]-$row[2]\$row[1] - 
\$$row[2]/optionbr);
   print(/select);

}

  } else {
print(option value=\\No Parts Created Yet/option);
  }
?


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




Re: [PHP] Dynamic List Boxes

2002-06-29 Thread Chase

Thank you Stuart!!  I feel like an idiot...  I had tried moving one or 
the other outside the loop, but not both...  Thank you again!!

Chase

Stuart Dallas wrote:

 On Saturday, June 29, 2002 at 10:03:16 PM, Chase wrote:
 
I am *very* new to PHP, so this may seem like a stupid question...  I am
trying to generate dynamic drop-down lists for use in an HTML form, but 
I have done something wrong with my code.  Instead of getting one list 
box with three options, I am getting three list boxes with one option. 
I have included this piece of my code...  Can anyone help???

 
 Yes, you have the select open and close tags inside the loop. Move them either
 side as follows...
 
 ?
 $link = mysql_connect(localhost, user, pass);
 mysql_select_db(my_db, $link);
 
 $result = mysql_query(SELECT SKU, Description, Retail FROM linecard
 WHERE sku=61 or sku=239 or sku=318, $link);
 $num_rows = mysql_num_rows($result);
 
 if($num_rows) {
 print(select name=\test\);
 while($row = mysql_fetch_row($result))
 
 {
print(option value=\$row[0]-$row[1]-$row[2]\$row[1] -
 \$$row[2]/optionbr);
 
 }
 print(/select);
 
   } else {
 print(option value=\\No Parts Created Yet/option);
   }
 ?
 


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




RE: [PHP] redeclaring functions

2002-06-26 Thread Andrew Chase

http://www.php.net/manual/en/function.include-once.php
http://www.php.net/manual/en/function.function-exists.php

HTH,
-Andy

 -Original Message-
 From: Taylor York [mailto:[EMAIL PROTECTED]]

 I am having a problem with two scripts that use the same function name.
 The two functions do the exact same thing...but when the include files are
 called, the second file recieves a redeclare error.

 Suggestions?


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




RE: [PHP] PHP to create static images

2002-06-24 Thread Andrew Chase

To save an image to disk with the imagepng/imagejpg/imagewbmp functions all
you have to do is give the file name as the second parameter to the
function; so if you wanted to call the first graph 'graph1.png', it would go
something like

?php

$graph = imagecreate(320,240);

/* (Draw the graph here) */

imagepng($graph, 'graph1.png');

?

imagepng will attempt to save graph1.png in the same directory as the
script.  Where ever you tell it to save the image, make sure your web server
(if Apache - I don't know about IIS) has permission to write files to that
directory.

-Andy



 -Original Message-
 From: Campano, Troy [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 24, 2002 12:40 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] PHP to create static images


 I am doing some work with creating graphs using the GD library.

 Does anyone know how I can create the graphs statically so I can
 save the output as a GIF or PNG?


 I want to run a script that will take in say 10 datasets and then
 create 10 PNG images on the file server.



 Any ideas?


 thank you!


 Troy Campano



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




RE: [PHP] Image aliasing

2002-06-24 Thread Andrew Chase

Hi Morgan,

None that I'm aware of.  I guess this is somewhat OT, but does the person
you're giving the images to realize that resizing the images by means of the
HTML width/height attributes doesn't do anything to size of the file the
person viewing the page has to download?  I don't know the particulars of
your situation, but say you give him a dozen high quality JPEGS at 800x600
pixels and about 120K each... if he puts those on a page and resizes them to
96 x 72 in the HTML to make 'thumbnails', the user is still going to be
stuck downloading 1440K!  That's a pretty hefty page to download even if you
have a broadband connection. (From an end-user standpoint, I find it
*really* annoying when people do this!)

Maybe you can point this out to the person you're supplying images to?  It's
not a PHP-based solution, but maybe it will help :)

Good Luck,

-Andy

P.S.  You could put together a PHP script that would use the GD
'imagecopyresampled' function to automatically generate the thumbnails for
him, but that assumes 1) You have access to his server and 2) He has PHP ;)


 -Original Message-
 I'm wondering if anybody has ever figured out a way to get around the
 absolutely abysmal way that Internet Explorer resizes images?

 The problem is that the person I'm supplying the images to refuses to use
 two copies (a small one, and a large one) and instead uses one (just the
 large one) and when he needs a small representation of it he
 slaps the large
 image in and sets the width and height tags.

 The problem comes in when I'm trying to supply him with good
 looking images.
 Sure, the large image looks fine, but that smaller image gets aliased to
 hell and back. Can the large image be recompressed in such a way that it
 doesn't noticeably damage the large version, but improves how it
 looks when
 arbitrarily shrunk in IE?


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




RE: [PHP] _SERVER variable insd prnt sttmnt

2002-04-30 Thread Andrew Chase

For the sake of legibility you could always assign the contents of
$_SERVER['PHP_SELF'] to another variable before using it in the print
statement:

$PHP_SELF = $_SERVER['PHP_SELF'];

print LIA HREF='$PHP_SELF?letter=$chars[$cnt]';

Shouldn't be a problem security-wise as long as register_globals is off;
Even if somebody tried to pass an arbitrary value to PHP_SELF in the query
string, it would only show up in $_GET['PHP_SELF']. It also provides a quick
way to bring pre- 4.1.2 scripts relying on the old global $PHP_SELF up to
date.

-Andy


 -Original Message-
 From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
 Sent: Monday, April 29, 2002 8:30 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] _SERVER variable insd prnt sttmnt


   // print LIA HREF='$_SERVER['PHP_SELF']?letter=$chars[$cnt]' .

 This is the problem with not breaking out of a string to display
 a variable.
 Ideally, you would do it this way:

 print LIA HREF=' . $_SERVER['PHP_SELF'] . ?letter= . $chars[$cnt] .
 ';

 But some people just have a problem with doing it that way, so you can use
 braces.

 print LIA HREF='{$_SERVER['PHP_SELF']}?letter={$chars[$cnt]}';


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




RE: [PHP] Re: Forms in PHP

2002-04-12 Thread Andrew Chase

May I also suggest that you rewrite your echo statements as:

  echo 'OPTION VALUE=donateDonate this item/OPTION';

Vastly improves legibility.

It's a problem, however, if you want to include a PHP variable in that echo
statement, if you're populating a SELECT menu with a loop, for instance;

$menu_options = array(A = Option 1, B = Option 2, C = Option
3);

foreach(array_keys($menu_options) as $option_value){

  $option_text = $menu_options[$option_value];

  echo 'OPTION VALUE=$option_value$option_text/OPTION';

}

would just output

OPTION VALUE=$option_value$option_text/OPTION
OPTION VALUE=$option_value$option_text/OPTION
OPTION VALUE=$option_value$option_text/OPTION

which is probably not the desired output :)  You need to use double quotes
for variable substitution. Unfortunately, if you want to maintain XHTML
compliance the tag attributes have to be double-quoted too...

echo OPTION VALUE=\$option_value\$option_text/OPTION\n;

(Might as well add a \n at the end of the line for readability in the
browser's 'View Source' window!)


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




[PHP] XHTML tag attribute quoting (Was Re: Forms in PHP)

2002-04-12 Thread Andrew Chase

Are single quotes valid around tag attributes in XHTML?  I skimmed over the
W3C XHTML 1.0 spec before posting the previous message and got the
impression all attributes had to be double quoted.  It would be great if
single quotes were valid, since I've fallen into the habit of using
them for the same exact reason this thread got started... easier to read and
faster to type than \ :)

Oops, and shame on me - tag and attribute names in my previous code snippets
should all be lower case,
too, IE:

echo option value=\$option_value\$option_text/option\n;

Of course, a page will render just fine in any modern browser whether tag
attribute values are single or double quoted (or in most cases, even if
they're not quoted at all.)  But if everyone got in the habit of adhering to
standards, and browsers implemented standards correctly (without extending
them with propietary junk), what a nice world it would be. Oh, and world
peace would be great too. :P

Of course, I'm just as guilty of lax coding.  The next time I begin a site
from scratch my plan is to use PSGML mode in emacs, and edit against the
XHTML 1.0 DTD.  Strict? Yes, but clean and compliant :)  (And PSGML does
great code formatting as you go.)

-Andy


 Unfortunately, if you want to maintain XHTML
 : compliance the tag attributes have to be double-quoted too...
 :
 : echo OPTION VALUE=\$option_value\$option_text/OPTION\n;

 Why stick with quotation marks?

   echo OPTION VALUE='$option_value'$option_text/OPTION\n;


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




RE: [PHP] FTP RAW

2002-03-29 Thread Andrew Chase

FTP with raw sockets is a little bit tricky because it actually requires a
second 'data' socket to be opened for each upload/download command.

Check out this excellent FTP class, which *doesn't* require PHP to be
compiled --with-ftp:

http://www.spencernetwork.org/ftp/ftp-class.txt

And of course the FTP Protocol RFC is helpful:

http://www.w3.org/Protocols/rfc959/

-Andy


 -Original Message-
 From: Analysis  Solutions [mailto:[EMAIL PROTECTED]]

  I have written the code to upload using RAW FTP commands.

 Cool!

 How'd you get it to work?

 --Dan


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




[PHP] RE: OOP .. I just don't get it.

2002-03-05 Thread Andrew Chase

Well, the 'Table' class is definitely of limited usefulness..

but where classes come in especially handy is when you want to build
reusable code for handling common tasks, like, for instance, MySQL
connections and queries... so that your PHP code looks something like

//

$db = new mysqlObject;

$db-connect(localhost,username,password,mydatabase);
$db-doQuery(select * from mytable);
foreach($db-resultRows){
//Do stuff with the query results here
}
$db-disconnect();

/ instead of something like: /

$dbconnection = mysql_connect(localhost,username,password);

mysql_select_db(mydatabase,$dbconnection);
$result = mysql_query(select * from mytable,$dbconnection);
$resultrows = array();
while($row = mysql_fetch_array($result)){
$resultrows[] = $row;
}
foreach($resultrows as $temprow){
//Do stuff with the query results here
}
mysql_disconnect($dbconnection);

//

The first, most obvious advantage is that the code becomes a easier to read,
which is important if you're working on a complex project.

You could arguably create a set of regular functions for MySQL stuff if you
really wanted to, but you'll have to keep careful track of any global
variables you might be using;  When you're working with a class all of your
class variables and functions are properties of an object, always with the
same name and easily accessed, but separate from any local variables you're
working with.  When you're working with a collection of functions, your
variables are all over the place and prone to inconsistency.

For instance, handling two different database connections in the same script
is easy with a class; using the hypothetical example from above, you know
that the results of your query are always going to be stored in the
'resultRows' property of the object, so it's as easy as accessing
$foo-resultRows and $bar-resultRows.

If you were using a collection of functions, you would have to come up with
a second variable name to store results from the second connection for that
particular script, and even if you try to maintain consistency among all the
scripts on your site using your collection of database functions, chances
are that things will get messy at some point; it's easier to keep track of
commonly used variable and function names at the class level.

Hmm, I hope that sort of made sense... it's a tough thing to explain.  It
took me a long time to get my head around the usefulness of OOP, too- as you
said, examples are usually not very practical.  The first explanation of OOP
that I ever read dealt with a hypothetical 'vehicle' class, and although I
understood the *theory*, I wondered for the longest time why I would want to
write a program for describing different kinds of imaginary cars and turning
them on and off, or extend it to describe imaginary boats and motorcycles.
;)

-Andy


 -Original Message-
 From: mojo jojo [mailto:[EMAIL PROTECTED]]

 I've been using php for a while now but I have not got my head around OOP
 (classes).

 Why bother using them? I've read thru a few tutorials on using classes and
 the examples given are quite simple. This is probably the problem - I just
 can't see the benefit of using this style of programming.

:: table class example snipped ::

 Using a class doesn't appear to give me any benefits - in fact the code is
 longer.

 I know that you can spawn more instances of the same class which sounds
 useful, however I can also run my function as many times as I like using
 different variables.

 What am I missing here?


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




[PHP] RE: mysql and telnet.

2002-03-01 Thread Andrew Chase

Hmm, I'm assuming you're paying someone to host your site?  Can't you give
the hosting company a quick call or e-mail re: whether or not they offer
MySQL?  They would probably know better than we would. ;)

-Andy

 Thanks for the advice... But now I need to know what all this means:

 /home/chiliasp/odbc/direct/locale/en_US/LC_MESSAGES/ivmysql15.po
 /home/sites/home/web/CFIDE/administrator/datasources/drivers/myodb
 c_mysql.cfm
 /home/sites/home/web/CFIDE/administrator/datasources/drivers/mysql.cfm
 /home/sites/home/web/CFIDE/administrator/server_settings/drivers/mysql.cfm
 /home/coldfusion/lib/locale/en_US/LC_MESSAGES/CFmysql15.mo
 /home/coldfusion/lib/CFmysql15.so
 /home/coldfusion/scripts/mysql_expire.cfm


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




[PHP] RE: Option for Serial or Comm port communication with PHP?

2002-02-26 Thread Andrew Chase

I don't about accessing a serial port directly from PHP, but you can control
an X10 Firecracker on a Linix/BSD system by using the exec() command to run
BottleRocket:

http://mlug.missouri.edu/~tymm/

I threw together a script that would turn a lamp on and off from a web page
without to much difficulty.  As if that wasn't geeky enough, I pointed a
webcam at it so that people could watch the light go on and off as they
clicked the link. :)  Having the light turn on and off without warning got
old pretty quickly, so I took the script down... neat stuff, though!

-Andy


 -Original Message-
 From: Ken Lancaster [mailto:[EMAIL PROTECTED]]

 I was hoping to work on a hairbrained idea that would allow me to
 use php to
 control an X10 or other serial device (security system, irrigation
 controller, etc,).  I have read several hints at using the fopen
 function to
 do serial communications but these posts were a year old.   Is it possbile
 to do serial communications using php.  What are the options?

 Thanks in advance for your help.


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




[PHP] RE: Creating Tab-Delimited Text File

2002-02-07 Thread Andrew Chase

Which part are you having trouble with, specifically?  The task as you've
described it is very straightforward, almost pseudo-code. :)

-Andy

 -Original Message-
 From: Phillip S. Baker [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 07, 2002 12:32 PM
 To: PHP Email List
 Subject: Creating Tab-Delimited Text File


 Greetings All,

 What I want to do is create a tab-delimited text file for download from
 records in a database.
 I am not sure on how to do this.

 So what I want to do is as follows.
 ON a page a button is clicked.
 Script is activated that pulls records from a database.
  From these records a tab-delimited text file is created.
 A save dialogue box appears so the user to save the text file to
 his harddrive.



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




RE: [PHP] Can this be done in PHP?

2002-02-04 Thread Andrew Chase

You might want to take a look at PhpAdsNew, a banner rotation/management
system using PHP and MySQL:

http://sourceforge.net/projects/phpadsnew

The system's admin tools assume that you're selling ad space, but there's no
reason you couldn't use it for a banner exchange instead.

-Andy

 On Fri, 1 Feb 2002, Lazor, Ed wrote:

  I'm trying to understand how this banner exchange works and
 whether it can
  be done in PHP.  Here's the HTML you put on your web page:
 
  a
 
 href=http://rpgx.rpgconsortium.com/xchange/engage.cgi?advert=NonS
 SIpage=XX
  img
 
 src=http://rpgx.rpgconsortium.com/xchange/engage.cgi?id=atfantasy
 page=01
  border=0 width=468 height=60/a
 
 
  It...
  - displays a random banner image
  - takes you to the site relating to the displayed image
 
  How does it do that?  Any ideas on how to do this in PHP?


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




RE: [PHP] Oddity

2002-02-04 Thread Andrew Chase

You can also do

?

$macroDataArray = mysql_fetch_array($result,MYSQL_ASSOC)

foreach(array_keys($macroDataArray) as $elementkey){

echo Value for key $elementKey = $macroDataArray[$elementKey]br\n;

}

?

(mysql_fetch_array uses MYSQL_BOTH for the second argument by default, which
returns an array using both numeric and associative keys - that's why you
were getting double results. :))


Per the manual:
-
http://www.php.net/manual/en/function.mysql-fetch-array.php

The optional second argument result_type in mysql_fetch_array() is a
constant and can take the following values: MYSQL_ASSOC, MYSQL_NUM, and
MYSQL_BOTH. This feature was added in PHP 3.0.7. MYSQL_BOTH is the default
for this argument.

By using MYSQL_BOTH, you'll get an array with both associative and number
indices. Using MYSQL_ASSOC, you only get associative indices (as
mysql_fetch_assoc() works), using MYSQL_NUM, you only get number indices (as
mysql_fetch_row() works).
-

HTH,

-Andy



 -Original Message-
 From: Chris Boget [mailto:[EMAIL PROTECTED]]

  $macroDataArray = mysql_fetch_array( $result );

 I'm still curious what is going wrong, but I've found a work arround.
 One of the things I love about PHP is that you learn something new
 just about every day.  Instead of fetch_array(), I can use fetch_assoc()
 and it'll do just what I need. :)


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




[PHP] RE: Building my site... again - somewhat OT

2002-01-28 Thread Andrew Chase

Hi Torkil,

You may want to head over to Webmonkey and read their article about Search
Engine optimization:

http://hotwired.lycos.com/webmonkey/01/23/index1a.html

A few key points that have proven very helpful with my personal web site:

• A central crawler index with links to each page on my site that I want
spiders to crawl; this is the only page I need to submit to a search engine,
and since I store my content in MySQL the page is always up to date.
• A friendly URL structure - some search engines will follow a link like
index.php?page=carssubpage=ferrari, but I figured I would make my site
crawlable by *any* spider that might come its way, and began using Apache
mod_rewrite to translate urls internally; so when a browser requests a link
like /cars/ferrari/index.html, Apache will rewrite the URL to
index.php?page=carssubpage=ferrari internally.  I'm not sure if this is
an issue with the CGI version of PHP like the other URL rewriting method
that has been mentioned.

Another handy tag that some spiders (Most notably, Googlebot) obey is the
ROBOTS meta tag, which tells the spider what to do with the current page:
meta robots='index, follow'   - Index the current page, and follow all of
its links
meta robots='index, nofollow' - Index the the current page, but don't
follow any links
meta robots='noindex, follow' - Don't index the current page, but follow
all of its links
meta robots='noindex, nofollow'   - Don't index the current page, and don't
follow any links; dead end.

HTH,

-Andy


 -Original Message-
 From: Torkil Johnsen [mailto:[EMAIL PROTECTED]]

 Will
 the web spiders and web crawlers ever follow a link like
 index.php?page=carssubpage=ferrari and will they ever index what
 they find
 there, and, and, and, and...

 Well... does anyone understand what I'm asking here? WOuld this be a good
 way to build my site to ensure getting hits from search engines,
 or should I
 do this some other way? Anyone know?


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




[PHP] Has anyone tried Serlient?

2002-01-03 Thread Andrew Chase

Per Triplehash's website at http://www.triplehash.com/serlient:

Triplehash Serlient lets you package, run and distribute your PHP and
CGI-based websites into Windows software.

Serlient does its work by combining intelligent web-server simulation
software and web-browsing (Internet ExplorerR) capabilities into one
package. This allows users to distribute their website, or web applications
just as a normal software application would be distributed.

It looks interesting, but they don't offer a demo.  They're also vague about
MySQL support; the FAQ says There might be ways to get it working.  For
that matter, what about extensions like GD and PDFlib?

--Andy



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


RE: [PHP] Logo proposal - voting script!

2001-12-14 Thread Andrew Chase

Hmm, I get a 404 error as of 17:44 GMT.

I hope that 'Mole' is one of the options on the list... I'm kind of inclined
to defer to Rasmus on the issue anyway, what with him being the guy
responsible for creating PHP in the first place. :)

I'm also keeping in mind that (unless I missed something), there's been no
indication that any animal mascot would be officially adopted by the
project. ;)



 -Original Message-
 From: Michael Cronstrom [mailto:[EMAIL PROTECTED]]
 Subject: [PHP] Logo proposal - voting script!

 a voting script!

 at: http://zoon.se/vote/logo.php


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




RE: [PHP] PHPhish Logo

2001-12-14 Thread Andrew Chase

Already used by PostgreSQL :)

http://www.postgresql.org

 -Original Message-
 From: John Lim [mailto:[EMAIL PROTECTED]]
 
 P for Pachyderm!


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




RE: [PHP] Logo proposal

2001-12-11 Thread Andrew Chase

Maybe an animal beginning with P would be a good Mnemonic device (and good
for alliteration; think The PHP Panda or The PHP Platypus.)  Hmm, I
guess Panda and Platypus aren't particularly powerful animals, though. :/

Other animals beginning with P:

Pelican
Panther (cheesy)
Polliwog
Protozoa

Of course, the Penguin is already spoken for. :)

Personally, I don't have a problem with the current PHP logo... From a
marketing standpoint, I don't know; has MySQL become a more attractive
prospect to the pointy haired bosses of the world since they streamlined
their logo and added a Dolphin?  It would be interesting to know.

If PHP was going to adopt a mascot, I kinda like the idea of the Platypus.
If you want to force a metaphor, think of PHP as an interesting language
that fits between traditional scripting languages and the HTTP server - sort
of like the Platypus is an interesting critter that fits somewhere between
mammal and.. whatever else. :)

-Andy


 -Original Message-
 From: Tim Ward [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 11, 2001 2:02 AM
 To: PHP; Valentin V. Petruchek
 Subject: RE: [PHP] Logo proposal


 Chinchillas are fluffy, and I don't think anyone is using them for their
 logo.

   --
   From:  Valentin V. Petruchek [SMTP:[EMAIL PROTECTED]]
   Sent:  10 December 2001 16:58
   To:  PHP
   Subject:  [PHP] Logo proposal

   Hello world of php-programmers!

   It seemes to me PHP is very powerful tool and very popular among
   web-programmers, too. As for me I use php for solving web tasks for
 2 years
   and I'm very satisfied with it.

   It seemes to me current PHP logo (can be found by
   http://www.php.net/gifs/logo.gif) doesn't suite to PHP. It's common
 logo
   without any idea except using title in it.

   I propose to create and develop new PHP logo corresponding to its
 power.

   My propose is WoodPecker (e.g. like Woody).

   Other propositions?

   Respectfully, Zliy Pes http://www.zliypes.com.ua








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




RE: [PHP] Re: Image problem

2001-12-07 Thread Andrew Chase

PHP needs to be compiled with libjpeg and libpng in addition to the GD
library to use those formats respectively.   The PHP manual section covering
image functions (including those for manipulating JPEGs and PNGs) is at

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

-Andy


 -Original Message-
 From: Peter Lalka [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 07, 2001 5:50 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Re: Image problem



 Thanks, in phpinfo list really isn't support for GIF:(
 How can I manipulate jpeg images? Which functions are for this
 img. format?
 P.


 |+-
 ||  Johan [EMAIL PROTECTED] |
 ||  Odoslané kým:  |
 ||  php-general-return-77040-lalkap=emo.seas.sk@lis|
 ||  ts.php.net |
 || |
 || |
 ||  07.12.2001 14:30   |
 || |
 |+-

 -
 --|
   |
 |
   | Komu:   [EMAIL PROTECTED]
 |
   | Kópia:
 |
   |   Predmet:[PHP] Re: Image problem
 |

 -
 --|



  I've instaled and cofigured php4 on WinNT with Apache Web server.
  I can't use any fuction of Image manipulation, 'cause I get this error
  message: ImageGif: No GIF support in this PHP build
  In phpinfo() is listed that: gd lib. enabled, zlib lib. enabled.
  What do I still miss there?

 In the newest version of GD library (think it since about 1.3 or
 something)

 does support GIF, because GIF is a commerial image format.

 Use PNG or JPEG instead. That much better, or find a version with GIF
 support.

 You can see what Image formats you GD can use by make a file with follow
 content:
 ?php
 phpinfo();
 ?

 :o)

 Regards,

 Johan

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








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




RE: [PHP] Dynamically created dropdowns

2001-12-04 Thread Andrew Chase

That's true, but you could use PHP and the MySQL data to generate the
JavaScript arrays for the dynamic menus... you can escape into PHP within
the SCRIPT tags of an HTML page just as easily as you can within the
HEAD or BODY tags.

-Andy

 -Original Message-
 From: Michael Hall [mailto:[EMAIL PROTECTED]]
 Subject: Re: [PHP] Dynamically created dropdowns

 You can certainly do what you want in straight PHP if you include a form
 submission after selecting the manufacturer. There is probably a way of
 doing it in JavaScript without a form submission, but not one that will
 read data from a MySQL database on a remote machine. JavaScript can't do
 that.



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




RE: [PHP] : IIS server doesn't recognize PHP pages

2001-12-04 Thread Andrew Chase

I'm not at all familiar with IIS, but in Apache terms it sounds like a MIME
type problem; the server doesn't know what to do with .PHP files, so it
assumes they're something that should be sent as a download/attachment
instead of parsing with PHP and sending as HTML - I would imagine there
would be something in IIS' config analagous to the Apache AddHandler
configuration directive that lets you specify a local interpreter for .cgi,
.pl, .php, etc...

-Andy


 I am almost sure that the problem is simply that the guy is very
 expert with
 NT/IIS/ASP/VBScript, and at a basic level on other topics,
 included this one.
 So, it must be a config issue, but which one? What should I tell him?


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




[PHP] RE: banner management system

2001-12-04 Thread Andrew Chase

Try PhpAdsNew - it uses a MySQL backend:

http://sourceforge.net/projects/phpadsnew/

It may not be what you're looking for if your site gets *extreme* amounts of traffic, 
but otherwise it's quite capable. (And free. :) )

-Andy

 -Original Message-
 From: Ali [mailto:[EMAIL PROTECTED]]
 Hello,
 
 any idea of a free and simple banner management system written in PHP. I
 appreciate your help. 


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




[PHP] RE: php-general Digest 23 Nov 2001 14:10:17 -0000 Issue 1011

2001-11-26 Thread Andrew Chase

You might want to give 'wget' a try - it's a GNU utility for downloading
mirrors of web sites:

http://www.gnu.org/software/wget/wget.html

If you use it with the '-r' and '-k' options it will crawl your site
recursively, and convert absolute links to relative ones in the downloaded
HTML files.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: Friday, November 23, 2001 6:10 AM
 To: [EMAIL PROTECTED]
 Subject: php-general Digest 23 Nov 2001 14:10:17 - Issue 1011



 php-general Digest 23 Nov 2001 14:10:17 - Issue 1011

 Topics (messages 75546 through 75577):

 Missing PHP.ini
   75546 by: John Monfort
   75547 by: Joseph Blythe
   75548 by: Martin Towell
   75549 by: John Monfort
   75551 by: David Robley

 Re: error handling and __LINE__
   75550 by: Papp Gyozo

 Re: SQL in Function
   75552 by: David Robley

 strip php out of html
   75553 by: Joseph Blythe
   75554 by: David Robley
   7 by: Michael Sims
   75556 by: Joseph Blythe
   75558 by: Joseph Blythe

 Object Persistence like Resource Persistence already implemented?
   75557 by: Yermo M. Lamers

 MySQL query problem!
   75559 by: De Necker Henri
   75561 by: David Robley
   75562 by: De Necker Henri
   75564 by: David Robley

 Re: GD, PNG
   75560 by: Yamin Prabudy
   75563 by: Joseph Blythe

 read file
   75565 by: PHP Newbie
   75566 by: Andrey  Hristov

 HTTP_REFERER
   75567 by: Jordan Elver
   75568 by: gaouzief
   75569 by: Sebastian Wenleder
   75570 by: Matt Williams
   75572 by: Jordan Elver
   75573 by: Matt Williams
   75577 by: Jordan Elver

 file upload troubles
   75571 by: Nikola Veber
   75574 by: fitiux

 php-html
   75575 by: Christoph Starkmann

 upload problems
   75576 by: Nikola Veber

 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]


 --



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




[PHP] RE: webmaster@php.net dude

2001-11-16 Thread Andrew Chase

I'm cheap too.  That's why I use a free editor that does support line
numbers, like ConTEXT (http://www.fixedsys.com/context/) or EMACS.  It's
been a long time since I had debugged anything in PERL, but it seems to me
that knowing exactly which line the problem is occurring on is a lot more
helpful than knowing what it occurred near.  As for knowing exactly what the
problem is, that usually becomes self-evident once you look at the line
indicated in the error message or the line immediately before or after.

But, A chacun son gout as they say.

-Andy


 The only thing I would love to know is why isn't error checking more
 precise/helpful. If I leave off a { by accident, why can't the error
 say:
 Duh! ERROR!! Alarm, alarm, alarm
 You left of a } ya idiot!
 Go look NEAR something and correct it stupid! g

 I - at least - am cheap and use Wordpad to do my PHPing. Looking up line
 numbers SUuuucks.

 One advantage to Perl. Maybe the only one left!

 IS ANYONE LISTENING!!

 Thanks, g

 John


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




RE: [PHP] php hosting

2001-10-22 Thread Andrew Chase

They've been mentioned on the list before, but I had a great experience with
Cedant.com.  Apache, PHP4, MySQL, and shell access via SSH (and the ability
to compile your own software in a /home/youraccount/bin directory).

I hosted a site with them for a few months earlier this year before taking
the plunge and hosting on a dedicated Linux box at home, and found their
support staff to be knowledgeable and responsive.  Their basic account is
$12.95/month for up to a gig of traffic, and they have an extensive web
control panel.

-Andy

P.S. I don't work for Cedant or know anyone who works there, etc., etc.,..
I'm just a happy customer :)


 -Original Message-
 From: Heidi Belal [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, October 20, 2001 1:29 PM
 To: Php
 Subject: [PHP] php hosting

 Anybody know of good reliable hosting that supports
 php, and has a control panel to go with it?
 thanks,
 Heidi


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




[PHP] RE: Forms and Netscape -- spacing problem -- Help!

2001-10-22 Thread Andrew Chase

It's almost certainly not W3C compliant, but if your form is inside a table
(I know, I know - you're not supposed to use tables for layout) you can hide
the FORM tags outside the TD tags of the cell containing the form: E.G.:

table
tr
form action='somescript.php'
td
input type='text' name='input1'br
input type='submit'
/td
/form
/tr
/table

I've never had a problem with this workaround in IE/Netscape 4.x as long as
the tags are nested correctly.  Not sure about Lynx/Konqueror/Opera.

I try whenever possible to follow the W3C's standards, but inconsistent
browser implementation of HTML and CSS usually gets in the way. :P

 -Original Message-

 Subject: Re: Forms and Netscape -- spacing problem -- Help!

  form tag in NS (4x - 6x) there is some additional space



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




[PHP] RE: WebMail Client

2001-10-02 Thread Andrew Chase

You might want to take a look at Netmania. (http://www.netmania.org)
Caveats:  I helped  install Netmania at a former employer back in February
2001, and with the then-current distribution we had all kinds of trouble
setting it up until we realized that it depended on having *all* error
handling turned off (even warnings) - with errors disabled it worked like a
dream, although we had to wonder why they would have released code known to
cause warning messages.

I think a new version has come out since then, and maybe they've addressed
some of those problems.  Once set up it's a very impressive system both in
appearance and functionality - it does use a lot of Javascript, so there
might be issues between Netscape/IE/Konqueror/Mozilla/Mac/Windows/Linux.
YMMV :)  It requires Unix/Linux, Apache 1.3 and MySQL.

-Andy


 -Original Message-
 From: Rosen [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 02, 2001 5:17 AM
 To: [EMAIL PROTECTED]
 Subject: WebMail Client


 Hi,
 Can someone recommend me some free php script for WebMail client
 (like Squerriemail) ?

 Thanks,
 Rosen





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




[PHP] RE: What development environment do you use for PHP?

2001-08-27 Thread Andrew Chase

I keep my web documents in a CVS repository on a Linux box, and use WinCVS
(GNU) to check files in and out on my WinNT desktop.  I use ConTEXT
(freeware) for editing.   Documentation and help are always available at
php.net and google.com.  I have an Apache 'staging' server, and to keep the
document tree up to date with the CVS repository I run a cron job that
performs 'cvs update -d' every five minutes from the server document root.

When a project is ready to go live, all that's needed is a 'CVS export'
command to generate a clean copy of the most recent files to go on the live
server - meanwhile keeping a complete revision history in CVS in case
there's ever a need to access an older version.  It works quite nicely.
I've never had much patience with development environments... they always
seem like more trouble than they're worth.  (Of course, I've never gotten
very deep into a language like C with all the cross linking and Make files -
I could see an IDE coming in handy in that case!)

Oh, and my Linux 'box' is actually a VMWare virtual machine running Mandrake
Linux 8.0 on my WinNT desktop. ;-)

-Andy



 -Original Message-
 From: Greg Beaver [mailto:[EMAIL PROTECTED]]
 Sent: Monday, August 27, 2001 12:11 AM
 To: [EMAIL PROTECTED]
 Subject: What development environment do you use for PHP?


 Hi,

 I'm curious what programs/platforms different people use to develop PHP.


 Anyone have a sweet setup that makes it all easier?


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




RE: [PHP] RE: What development environment do you use for PHP?

2001-08-27 Thread Andrew Chase

WinCVS is available from http://www.wincvs.org - they also have Mac and X
versions, although I've never tried them.

-Andy

 -Original Message-
 From: John Meyer [mailto:[EMAIL PROTECTED]]

 Where do you get WinCVS , by the by?



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




[PHP] RE: ImagePNG problem

2001-08-20 Thread Andrew Chase

Make sure you have GD 2.0.1 and PHP 4.0.6 or later for creating true-color
PNGs, per the
manual:

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

-Andy


 -Original Message-
 From: Adrian Ciutureanu [mailto:[EMAIL PROTECTED]]

 Is there any way to tell ImagePNG() to create PNG24 images instead of PNG8
 images? Seems that ImageCreateFromPNG() can read PNG24, but ImagePNG()
 writes only PNG8.


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




[PHP] RE: could i get a clue?

2001-08-15 Thread Andrew Chase

No sure how you mean 'calling' the script... but in addition to using
something like

document.location='myscript.php'

It would theoretically be possible to pass javascript variables to a PHP
script in the same way by using something like

var foo = Some Text;
var bar = Some other text;
document.location = 'myscript.php?foo=' + foo + 'bar=' + bar;


And although it's not exactly 'calling' a script from Javascript, you can
use PHP to generate your script on the fly... handy if you need to do
something with data from a database within a Javascript. (Not sure what that
would be, but it might come in handy.)

-Andy


 -Original Message-
 From: Richard Lynch [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, August 14, 2001 8:19 PM
 To: [EMAIL PROTECTED]
 Subject: Re: could i get a clue?


  ok a basic question. perhaps I dont know enough about javascript but
  anyway..
 
  I want to call a php script from javascript. Anybody have any hints for
 me?
  A link to a useful website would work as well. thanks mates



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




RE: [PHP] can't get gd working at all

2001-07-26 Thread Andrew Chase

Glad your host got that straightened out - for future reference, an easy way
to look at the server's PHP config is to make a page using phpinfo -

? phpinfo() ?

It will show you whether GD (and other extensions) are installed, as well as
the image format(s) supported and whether or not Freetype support is
included.

-Andy

 -Original Message-
 From: Matt Greer [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 25, 2001 11:46 AM
 To: php-gen
 Subject: Re: [PHP] can't get gd working at all


 Ah ha, my host was wrong. gd is not installed on the server I'm on, but
 they're moving me over to one that has it.

 Sorry everyone, but I didn't know enough about any of this to be able to
 verify what they told me.

 Thanks for all the help.

 Matt




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




[PHP] RE: report generation with PHP

2001-07-16 Thread Andrew Chase

There's more than one way to skin a cat - if not directly from PHP to PDF,
why not PHP to a .TeX LaTeX file, then use exec() to run latex and dvi2pdf
on it.  No license restrictions there that I know of, and you can get some
very nice results with LaTeX.

-Andy

 -Original Message-
 From: Matthew Garman [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 16, 2001 4:00 AM
 To: [EMAIL PROTECTED]
 Subject: report generation with PHP



 Hello:

 I wrote an small web application that interfaces a Microsoft Access
 database.  The database is fairly small and simple: it is a listing of
 employees, their phone number(s) and their department.  My interface
 allows folks to view the phone list, search for a name, list by
 department, etc., and allows certain users to update the phone book (add
 employees, change phone numbers, etc).  It's a fairly typical phonebook
 application.

 The Access database has a macro in it that allows for the generation of a
 report.  The report is a nicely formatted listing of all the employees and
 their phone numbers, grouped by department.  Everybody fits on one page.
 The whole purpose of this report is to be printable, and so that the one
 page phone list can be distributed throughout the factory.

 Now I want to be able to generate this report from the web.  It doesn't
 have to use Access (and I would prefer that it didn't, so I can convert to
 MySQL).  But I don't know of a nice (and easy!) way to generate such a
 report.  Using HTML tables isn't acceptable---when you print, you still
 get the header and footer that the browser adds (and it's unacceptable to
 have everyone modify their browser's setup).  Furthermore, the printable
 list has to look as close as possible to the original, because if I start
 changing formats, people will get upset.

 So I'm not really too sure where to start on this one.  If anyone could
 offer some suggestions, and point me in the right direction, it would be
 sincerely appreciated!

 Thanks,
 Matt

 --
 Matt Garman, [EMAIL PROTECTED]
 I'll tip my hat to the new constitution, Take a bow for the new
 revolution
  Smile and grin at the change all around, Pick up my guitar and play
  Just like yesterday, Then I'll get on my knees and pray...
 -- Pete Townshend/The Who, Won't Get Fooled Again






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




RE: [PHP] Upcoming wrox php/flash book?

2001-07-13 Thread Andrew Chase

Also, PHP's .SWF generating capabilities aside, PHP could also be used to
generate included text on the fly - I forget the exact command, but I know
you can define the contents of a variable from an external file in Flash.
This would lend itself to updating a newsfeed or What's New blurb within a
Flash file without having to recompile it from its .FLA source.

-Andy

 -Original Message-
 From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]

 See http://php.net/swf and also http://www.opaque.net/ming



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




RE: [PHP]somebody help me out here!

2001-07-09 Thread Andrew Chase

There's a search engine optimization tutorial at Webmonkey:

http://hotwired.lycos.com/webmonkey/01/23/index1a.html?tw=e-business

It mentions doing the Amazon-style search-engine friendly URLs and links to
a page about mod_rewrite for Apache:

http://httpd.apache.org/docs/mod/mod_rewrite.html


-Andy



 -Original Message-
 From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 09, 2001 9:57 AM
 To: PHP General List (E-mail)
 Subject: [PHP]somebody help me out here!


 hey-

 I know I've seen an article/tutorial on the zend website very
 recently about
 parsing urls. It was about being able to use urls which are search engine
 friendly and only use the forward slashes, and it also included
 the code to
 interpret all of that. Does anyone know of this article who can
 direct me to
 WHERE it was on that site, or if not, to a site that has a
 similar article?

 thanks
 chris




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




[PHP] RE: sorting results of opendir()

2001-07-09 Thread Andrew Chase

Try reading the directory contents into an array, sorting it, *then*
outputting the contents of the array:

$dir = opendir(.);

$dirlist = array();
$index = 0;
while($file = readdir($dir)  $file != .  $file != ..){
$dirlist[$index++] = $file;
}

sort($dirlist);

foreach($dirlist as $file){
echo $filebr;
}



 -Original Message-
 From: kmurrah [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 09, 2001 11:06 AM
 To: [EMAIL PROTECTED]
 Subject: sorting results of opendir()


 Greetings.

 I need to read the contents of a directory, sort it alphabetically, and
 display it 

 i'm doing find on the reading and displaying, but can someone help me with
 the sort?



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




[PHP] RE: upgrading to gd2.0.1

2001-07-06 Thread Andrew Chase

If you want to manipulate PNG or JPEG images, you need to make sure you have
the PNG and JPEG libraries, and recompile PHP with GD as before, and
adding --with-png-dir=/path/to/pnglib, --with-jpeg-dir=/path/to/jpeglib

For the complete list of compilation options, see
http://php.net/manual/en/install.configure.php

-Andy

 -Original Message-
 From: Mark Maggelet [mailto:[EMAIL PROTECTED]]

 Hi,
 I just upgraded gd to 2.0.1 and recompiled apache1.3.20/php4.06.
 when I do phpinfo() it says:

 and when i call imagepng() it says:
 Warning: ImagePng: No PNG support in this PHP build




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




RE: [PHP] protect source code

2001-06-21 Thread Andrew Chase

You might want to check out APC - an open-source alternative to Zend's
commercial product.  I've never used it, but it looks pretty good:

 http://apc.communityconnect.com/

-Andy

 -Original Message-
  I am on a project and the issue that struck me is how to
 protect my source
  codes which is in human readable form. There isn't any way for me to
  protect my database and the only way that I had found out is to
 use the PHP
  encoder provided by Zend.com to encode the source code. However, the
  price of a commercial license for each machine (since it use host ID or
  hostname as the key) is too costy and I am trying to find an
 alternative or
  a cheaper packages available. Please help.


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




RE: [PHP] image code

2001-06-20 Thread Andrew Chase

I wrote thumbnailing script that did exactly what you said below, but to
eliminate the needless regeneration of existing thumbnails I just did a
check to see if the thumbnail already exists:

if(!file_exists(/path/to/thumbnail.jpg)){

//Create the thumbnail here

}

If the thumbnail already exists, the script skips over it, but if it doesn't
it creates it as needed.

-Andy



 -Original Message-
 From: Hugh Bothwell [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 19, 2001 1:02 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] image code


 Seems pretty straightforward, actually; I would write a script
 that takes as
 parameters the name and desired size of a graphic, resizes it, and returns
 the thumbnail ( look at ImageJPEG() ).  Then I would write a script that
 iterates through the files in the directory and, for each, gets a
 thumbnail.

 The only problem is that this is a fair bit of work; if it's called at all
 frequently, you might be better to create a static version.  But that of
 course does away with the 'self-updating' bit.

 A possible fix would be to write master page:
 check how long since the page has been updated; if necessary, create and
 save an updated version of the imagelist.  Then forward the user to the
 saved static version.  This would let you have the page update itself on a
 delayed basis, ie hourly.


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




[PHP] RE: bad form...

2001-06-20 Thread Andrew Chase

As long as your code is well-formatted and well-commented, I don't think
it's a problem, especially for simple forms for quick DB inserts or sending
e-mail.  You can do nice error handling without annoying Javascript alerts,
too; when the form is submitted you can check for missing/invalid field
values - if anything is wrong, just output the form again, but this time
prepopulate the valid fields and highlight the missing ones with red text or
a red outline.

-Andy

 -Original Message-
 From: motorpsychkill [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 20, 2001 12:13 AM
 To: Php General List
 Subject: bad form...


 hello everyone, is it 'bad form' (no pun intended) to have a form point to
 itself for processing, rather than forward the form variables to another
 page?  Anybody have any input on this?  I try to have 1 page that is the
 form and handles all the processing as well in order to keep the
 page count
 on my site low and for easier editing, blah blah blah

 thank you for you help!




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