RE: [PHP] Quite a basic question[Scanned]

2005-03-08 Thread Michael Egan
Mario,

From the PHP Manual:

Remember that header() must be called before any actual output is sent, either 
by normal HTML tags, blank lines in a file, or from PHP. It is a very common 
error to read code with include(), or require(), functions, or another file 
access function, and have spaces or empty lines that are output before header() 
is called. The same problem exists when using a single PHP/HTML file.

You cannot have anything being output to the browser before the header line.

See:

http://uk.php.net/manual/en/function.header.php

HTH,

Michael Egan

 -Original Message-
 From: Mário Gamito [mailto:[EMAIL PROTECTED]
 Sent: 08 March 2005 15:19
 To: php-general@lists.php.net
 Subject: [PHP] Quite a basic question[Scanned]
 
 
 Hi,
 
 This is quite a very basic question, but i think the code 
 following my 
 signature should work.
 Instead, i get a
 Warning: Cannot modify header information - headers already sent by 
 (output started at /home/vhosts/dte/cv/register_action.php:10) in 
 /home/vhosts/dte/cv/register_action.php on line 12
 
 and no redirection :(
 
 How can i solve this ?
 Any help would be apreciated.
 
 Warm Regards,
 Mário Gamito
 
 ?php
 
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$sub_domain = explode (., $hostname);
if ($sub_domain[1] != 'dte') {
  echo
  script language=\JavaScript\
 window.open (\http://www.google.com\;, \mywindow\, 
 \status=1, 
 toolbar=0, resizable=0,
 width=200, height=200\);
  /script;  
 }
 header(Location: http://www.dte.ua.pt/cv/;);
 ?
 
 HTML
   HEAD
   TITLEGestão de currículos do DDTE/TITLE
 (...)
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
  
  
The information contained in this email (and in any attachments sent with it) 
is confidential. It is intended for the addressee only. Access to this email by 
anyone else is unintended and unauthorized.  
If you are not the original addressee, 3tc asks you to please maintain 
confidentiality. If you have received this email in error please notify 3tc 
immediately by replying to it, then destroy any copies and delete it from your 
computer system. 
  
Any use, dissemination, forwarding, printing or copying of this email by anyone 
except the addressee in the normal course of his/her business, is strictly 
prohibited. 3tc owns the copyright in this email and any document created by us 
and assert the right to be identified as the author of it. Copyright has not 
been transferred to the addressee. 
We protect our systems with Sophos Anti-virus -  
www.sophos.com 
 

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



RE: [PHP] Happy Thanksgiving[Scanned]

2004-11-25 Thread Michael Egan
 Hey, national 'cry like a baby day' is next week  ;)

Could you specify which day next week?

That's one festival I look forward to taking part in :-)

Michael Egan 
  
  
The information contained in this email (and in any attachments sent with it) 
is confidential. It is intended for the addressee only. Access to this email by 
anyone else is unintended and unauthorized.  
If you are not the original addressee, 3tc asks you to please maintain 
confidentiality. If you have received this email in error please notify 3tc 
immediately by replying to it, then destroy any copies and delete it from your 
computer system. 
  
Any use, dissemination, forwarding, printing or copying of this email by anyone 
except the addressee in the normal course of his/her business, is strictly 
prohibited. 3tc owns the copyright in this email and any document created by us 
and assert the right to be identified as the author of it. Copyright has not 
been transferred to the addressee. 
We protect our systems with Sophos Anti-virus -  
www.sophos.com 
 

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



RE: [PHP] Re: IMPORTANT: Please Verify Your Message[Scanned]

2004-08-06 Thread Michael Egan

???

Now I'm utterly confused - admittedly it doesn't take much.

The response from Ed Lazor was the first item I got on this topic but now I've 
received this one in response to the subsequent thread.  I have of course been 
extremely careful not to reply to the address at 'acecoolco.com' having read in detail 
the legal page on the site. So if an email goes to acecoolco.com it will do so as a 
result of the recipient having subscribed to this list.

I know this is completely off topic - but having read the 'legal' stuff I doubt that 
much of it would hold water.

Oh well!  Back to programming.

Michael Egan



 -Original Message-
From:   Josh Acecool M [mailto:[EMAIL PROTECTED] 
Sent:   06 August 2004 20:35
To: [EMAIL PROTECTED]
Subject:[PHP] Re: IMPORTANT: Please Verify Your Message[Scanned]

I've requested that you do not contact me again.
http://www.acecoolco.com/legal.php

Please read the E-mail section properly.

- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 06, 2004 3:10 AM
Subject: IMPORTANT: Please Verify Your Message


 html

 head
 meta http-equiv=Content-Type content=text/html; charset=windows-1252
 titleVerify Email/title
 /head

 body

 pfont face=Verdana size=2Hello [EMAIL PROTECTED] ,br
 br
 [EMAIL PROTECTED] is currently protecting themselves from
receiving junk mail using A
HREF=http://www.spamcease.com/cart/affiliate.php?id=3;Spamcease/A

 Just this once, click the link below so I can receive your emails.br
 You won't have to do this again.br
 br
 a
href=http://www.tgpwizards.com/spamcease2/verify.php?id=3976686;http://www
.tgpwizards.com/spamcease2/verify.php?id=3976686/abr
 /font/p

 /body

 /html



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 
  
  
The information contained in this email (and in any attachments sent with it) is 
confidential. It is intended for the addressee only. Access to this email by anyone 
else is unintended and unauthorized.  
If you are not the original addressee, 3tc asks you to please maintain 
confidentiality. If you have received this email in error please notify 3tc 
immediately by replying to it, then destroy any copies and delete it from your 
computer system. 
  
Any use, dissemination, forwarding, printing or copying of this email by anyone except 
the addressee in the normal course of his/her business, is strictly prohibited. 3tc 
owns the copyright in this email and any document created by us and assert the right 
to be identified as the author of it. Copyright has not been transferred to the 
addressee. 
We protect our systems with Sophos Anti-virus -  
www.sophos.com 
 

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



RE: [PHP] Problem of a beginner with Array[Scanned]

2004-07-21 Thread Michael Egan
Henri,

Try:

   if($HTTP_POST_VARS['submit'])
   {
  for($i = 1; $i  51; $i ++)
  {
 if (${lottery_number.$i} == 'on')
echo Number selected is $i;
  }
   }
   else
   {
  echo form action='.$PHP_SELF.' method='post';
  for($i = 1; $i  51; $i ++)
  {
 echo Number $i: input type='checkbox' name='lottery_number.$i.'br /;
  }
  echo input type='submit' name='submit' value='Enter Numbers';
  echo /form;
   }

HTH,

Michael Egan


 -Original Message-
 From: Henri Marc [mailto:[EMAIL PROTECTED]
 Sent: 21 July 2004 12:33
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Problem of a beginner with Array[Scanned]
 
 
 Hello,
  
 Thank you very much for all the people who replied me
 so fast.
 Unfortunately I still have a problem with that part.
 
 Matt M. [EMAIL PROTECTED] wrote:
 
  Now, I want to know which numbers have been checked
 by the player.
  I have a :
  input name=Grid1 type=checkbox
  for the first grid. Grid2 for the grid #2...
 if the user checks any Grid1[] boxes then
 $_POST['Grid1'] will be an array and so on.
 
 I want to avoid to have to name each check box like
 this:
 Grid[1][1] //1st checkbox of the first grid
 Grid[1][2] //2nd checkbox of the first grid and so on
 
 I would prefer to have if possible:
 input name=Grid1[] typecheckbox //1st grid, 1st
 checkbox
 input name=Grid1[] typecheckbox //1st grid, 2nd
 checkbox...
 
 That's what Matt M proposed.
 If I do: echo $_POST['Grid1'];
 I have on as a result and not a value. I also tried
 with echo $_POST['Grid1[]']; and other similars but I
 have an error message undefined index, or array.
 
 Thanks again.
 
 Dave
 
 
   
 
   
   
 Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
 Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/
 
 Yahoo! Messenger: dialoguez instantanément avec vos amis. 
 Téléchargez GRATUITEMENT sur http://fr.messenger.yahoo.com
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
  
  
The information contained in this email (and in any attachments sent with it) is 
confidential. It is intended for the addressee only. Access to this email by anyone 
else is unintended and unauthorized.  
If you are not the original addressee, 3tc asks you to please maintain 
confidentiality. If you have received this email in error please notify 3tc 
immediately by replying to it, then destroy any copies and delete it from your 
computer system. 
  
Any use, dissemination, forwarding, printing or copying of this email by anyone except 
the addressee in the normal course of his/her business, is strictly prohibited. 3tc 
owns the copyright in this email and any document created by us and assert the right 
to be identified as the author of it. Copyright has not been transferred to the 
addressee. 
We protect our systems with Sophos Anti-virus -  
www.sophos.com 
 

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



RE: [PHP] Problem of a beginner with Array[Scanned]

2004-07-21 Thread Michael Egan
Henri,

I think you will need to give some sort of number to each of the checkboxes, e.g.

   for($i = 1; $i  51; $i++)
   {
  echo input type='checkbox' name='lotterynumber.$i.';
   }

As you are finding, with checkboxes the value returned is either 'on' or null. So 
without giving specific names to the checkboxes you will be left with an array of only 
those checkboxes that have been checked.

By giving the checkboxes a unique name - based on the numbers - you should then be 
able to loop through the checkboxes irrespective of whether they have been checked, 
e.g.

   for($i = 1; $i  51; $i ++)
   {
  if (${lottery_number.$i} == 'on')
echo The number chosen was $i;
   }

You can then determine whether a specific checkbox has been checked by seeing if it 
has the value of 'on' and translate this to the number you require.

I think a combination of the code I sent earlier together with that sent by Torsten 
will containg the answer.

HTH,

Michael Egan

 -Original Message-
 From: Henri Marc [mailto:[EMAIL PROTECTED]
 Sent: 21 July 2004 13:51
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Problem of a beginner with Array[Scanned]
 
 
 Hello Torsten,
 
  try this:
  
  input name=Grid1[1] typecheckbox file://1st
  grid, 1st checkbox
  input name=Grid1[2] typecheckbox file://1st
  grid, 2nd checkbox...
 Seems I can't do another way than this. Not possible
 to do just Grid1[].
 
  After submit you will receive $_POST['Grid1'] as an
  ARRAY containing all
  indices of the checked checkboxes. Then loop through
  it and do what ever you
  want:
  
  foreach ($_POST['Grid1'] as $value) {
  
  echo $value;
  }
 So, I did it like you said but the result of echo
 $value is on not the checkedbox number.
 
 Regards.
 
 Dave
 
 
   
 
   
   
 Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
 Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/
 
 Yahoo! Messenger: dialoguez instantanément avec vos amis. 
 Téléchargez GRATUITEMENT sur http://fr.messenger.yahoo.com
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
  
  
The information contained in this email (and in any attachments sent with it) is 
confidential. It is intended for the addressee only. Access to this email by anyone 
else is unintended and unauthorized.  
If you are not the original addressee, 3tc asks you to please maintain 
confidentiality. If you have received this email in error please notify 3tc 
immediately by replying to it, then destroy any copies and delete it from your 
computer system. 
  
Any use, dissemination, forwarding, printing or copying of this email by anyone except 
the addressee in the normal course of his/her business, is strictly prohibited. 3tc 
owns the copyright in this email and any document created by us and assert the right 
to be identified as the author of it. Copyright has not been transferred to the 
addressee. 
We protect our systems with Sophos Anti-virus -  
www.sophos.com 
 

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



RE: [PHP] get_browser and $_SERVER info from an IFRAME[Scanned]

2004-07-14 Thread Michael Egan
As Richard Davey has pointed out - there is no reason why your approach in itself 
would cause the error message you are getting.

I did a similar thing with a site I created and was plagued with similar error 
messages but the problem wasn't due to sessions but due to the way in which I tried to 
add a different header section to the scripts. This isn't straightforward with PhpBB 
because of the way in which some of the scripts use redirects. Perhaps this is causing 
the problem.

HTH,

Michael Egan

 -Original Message-
 From: I.A. Gray [mailto:[EMAIL PROTECTED]
 Sent: 14 July 2004 15:31
 To: [EMAIL PROTECTED]
 Subject: [PHP] get_browser and $_SERVER info from an IFRAME[Scanned]
 
 
 Hi,
 
 I have a php webstats script that puts info into a MYSQL database.  I
 include it at the top of each page that I have.  I recently 
 put a php built
 forum (PHPBB) on our website and wanted to include the php 
 script at the top
 of that.  Unfortunately as it already uses sessions, I kept on getting
 'headers already sent' error messages for obvious reasons- I was using
 sessions and so was PHPBB.  I thought a good way round this 
 would be to have
 an IFRAME on each of the forum pages where the IFRAME would be the PHP
 webstats page.  The only problem with this is that it logs 
 the information
 of the IFRAME and not the main page.  I use get_browser and 
 $_SERVER to log
 things such as the IP address, browser, os, and work out the 
 country and the
 name of the page being looked at.
 
 $browser = get_browser();
 $parenty = $browser-parent;
 $browsery = $browser-platform;
 $crawlery = $browser-crawler;
 $cookiesy = $browser-cookies;
 $pathy = $_SERVER['REQUEST_URI'];
 $ipy = $_SERVER['REMOTE_ADDR'];
 $hosty = gethostbyaddr($_SERVER['REMOTE_ADDR']);
 
 All these will return details for the IFRAME.  How do i get 
 details of the
 main page?
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
  
  
The information contained in this email (and in any attachments sent with it) is 
confidential. It is intended for the addressee only. Access to this email by anyone 
else is unintended and unauthorized.  
If you are not the original addressee, 3tc asks you to please maintain 
confidentiality. If you have received this email in error please notify 3tc 
immediately by replying to it, then destroy any copies and delete it from your 
computer system. 
  
Any use, dissemination, forwarding, printing or copying of this email by anyone except 
the addressee in the normal course of his/her business, is strictly prohibited. 3tc 
owns the copyright in this email and any document created by us and assert the right 
to be identified as the author of it. Copyright has not been transferred to the 
addressee. 
We protect our systems with Sophos Anti-virus -  
www.sophos.com 
 

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



RE: [PHP] get_browser and $_SERVER info from an IFRAME[Scanned]

2004-07-14 Thread Michael Egan
I can understand why somebody would want to capture the information in this way. There 
are a lot of hosting companies which offer packages that don't necessarily include 
such stats. 

I might be wrong - I frequently am :-( - but is it also not the case that by tying 
this information into sessions you get a better profile of unique visitors to the site 
which is often difficult to obtain from some of the access logs?

Michael Egan

 -Original Message-
 From: raditha dissanayake [mailto:[EMAIL PROTECTED]
 Sent: 14 July 2004 16:22
 To: I.A. Gray
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] get_browser and $_SERVER info from an 
 IFRAME[Scanned]
 
 
 I.A. Gray wrote:
 
 Hi,
 
 I have a php webstats script that puts info into a MYSQL database.  I
 include it at the top of each page that I have. 
 
 But is it really needed? surely a web log analyser is more 
 efficient . 
 If your hosting company does not provide you access to raw 
 log files you 
 are being ripped off.
 
 -- 
 Raditha Dissanayake.
 -
 http://www.raditha.com/megaupload/upload.php
 Sneak past the PHP file upload limits.
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
  
  
The information contained in this email (and in any attachments sent with it) is 
confidential. It is intended for the addressee only. Access to this email by anyone 
else is unintended and unauthorized.  
If you are not the original addressee, 3tc asks you to please maintain 
confidentiality. If you have received this email in error please notify 3tc 
immediately by replying to it, then destroy any copies and delete it from your 
computer system. 
  
Any use, dissemination, forwarding, printing or copying of this email by anyone except 
the addressee in the normal course of his/her business, is strictly prohibited. 3tc 
owns the copyright in this email and any document created by us and assert the right 
to be identified as the author of it. Copyright has not been transferred to the 
addressee. 
We protect our systems with Sophos Anti-virus -  
www.sophos.com 
 

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



RE: [PHP] Templates Are Driving me Nuts[Scanned]

2004-07-13 Thread Michael Egan
I looked at these briefly a couple of years ago but never really made great use of 
them. I also remember seeing an article in LinuxFormat about them which can be found 
at:

http://www.linuxformat.co.uk/archives/LXF35.tut_php.pdf

My understanding is that they are mainly intended for use in development areas where 
you get both programmers and designers working closely together. My limited experience 
of designers is that they get petrified at the sight of anything that looks like code 
nad personally I get horribly confused when I see some of those fiendishly complicated 
interfaces for graphic design applications.

In theory templates might offer a way of bridging this chasm - though I have my doubts.

Regards,

Michael Egan

-Original Message-
From: EE [mailto:[EMAIL PROTECTED]
Sent: 13 July 2004 14:39
To: php.net
Subject: [PHP] Templates Are Driving me Nuts[Scanned]


Dears,

Please help. This template thing is driving my nuts. I though maybe when
I read more articles things will clear up; however, things got even
worse. Every article writer has a different idea. Can anyone explain to
me what are Templates for? What are the advantages of using them? If I
use a third party template, will my site have a different look or is it
only a parser that will take my designed template and data and combine
them. I really don't know.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 
  
  
The information contained in this email (and in any attachments sent with it) is 
confidential. It is intended for the addressee only. Access to this email by anyone 
else is unintended and unauthorized.  
If you are not the original addressee, 3tc asks you to please maintain 
confidentiality. If you have received this email in error please notify 3tc 
immediately by replying to it, then destroy any copies and delete it from your 
computer system. 
  
Any use, dissemination, forwarding, printing or copying of this email by anyone except 
the addressee in the normal course of his/her business, is strictly prohibited. 3tc 
owns the copyright in this email and any document created by us and assert the right 
to be identified as the author of it. Copyright has not been transferred to the 
addressee. 
We protect our systems with Sophos Anti-virus -  
www.sophos.com 
 

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



RE: [PHP] Online Users[Scanned]

2004-07-02 Thread Michael Egan
Matt,

The most comprehensive example of this is provided by PhpBB (www.phpbb.com).

This application pretty much follows the logic you've set out.


HTH,

Michael Egan

-Original Message-
From: Matt Palermo [mailto:[EMAIL PROTECTED]
Sent: 02 July 2004 06:13
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Online Users[Scanned]


Is it possible to make a table of all logged in users session ids and then
check to see if the session still exists every couple minutes?  So every
minute or two, it would go through the table and for each record it would
get the session id, then check that session id to see if it's still in
existance.  Is this possible to do?

Thanks,

Matt
http://sweetphp.com


Zareef Ahmed [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,
   If you are using a database on your server you can
 do this as follows:
 1. Make a table named
 active_users(userid,last_access);
 2. Record every visit of a user to any page.
 3. you can delete the entries from this table on a
 condition like ::
 delete from active_users where last_access is less
 than (currenttime-MAX_EXPIRE_TIME)
 4. Display row count of active_users to visitors.

 This is just a hint. Some knowldge of php/any database
 assumed ,

 Revert back with any comment or problem.

 zareef ahmed


 --- Curt Zirzow [EMAIL PROTECTED] wrote:
  * Thus wrote Matt Palermo:
   they click the logout button).  Basically I want
  to be able to keep a list
   of all currently active users.  So if they close
  out their browser, it will
   remove their name from the list (within a
  reasonable time frame).  I'm


 =
 Zareef Ahmed :: A PHP Developer in Delhi(India).
 Homepage :: http://www.zasaifi.com




 __
 Do you Yahoo!?
 New and Improved Yahoo! Mail - 100MB free storage!
 http://promotions.yahoo.com/new_mail

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 
The information contained in this email (and in any attachments sent with it) is 
confidential. It is intended for the addressee only. Access to this email by anyone 
else is unintended and unauthorized.  
If you are not the original addressee, 3tc asks you to please maintain 
confidentiality. If you have received this email in error please notify 3tc 
immediately by replying to it, then destroy any copies and delete it from your 
computer system. 
Any use, dissemination, forwarding, printing or copying of this email by anyone except 
the addressee in the normal course of his/her business, is strictly prohibited. 3tc 
owns the copyright in this email and any document created by us and assert the right 
to be identified as the author of it. Copyright has not been transferred to the 
addressee. 
We protect our systems with Sophos Anti-virus -  
www.sophos.com 
 

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



RE: [PHP] Re: MySQL QUERY Results Not Appearing[Scanned]

2004-07-02 Thread Michael Egan
Don't know that this will work but it might help isolate the problem:

/* MySQL Connection Variables */
 $host=localhost;
 $user=arras_WebMaster;
 $password=qwerty;
 $dbase=arras_Members;
  
/* MySQL Connection String */
 if(!$dbConnect = @mysql_connect ($host, $user, $password))
 {
echo Couldn't connect to the database server: .mysql_error().br /;
 }

 if(!$dbSelect = @mysql_select_db ($dbase))
 {
echo Couldn't select the database: .mysql_error().br /;
 }

 if(!$query = @mysql_query(SELECT * FROM RegisteredMembers))
 {
echo Couldn't execute query: .mysql_error().br /;
 }
 else
 {
   while($result = mysql_fetch_array($query))
   {
echo $result['UserID'];
   }
 }


HTH,

Michael Egan



-Original Message-
From: Harlequin [mailto:[EMAIL PROTECTED]
Sent: 02 July 2004 09:34
To: [EMAIL PROTECTED]
Subject: [PHP] Re: MySQL QUERY Results Not Appearing[Scanned]


Craig. Thanks for the response and sorry I've been delayed in getting back
to you.

I put a new page together and dropped all the peripheral code and this is
what I ended up with:

?php
/* MySQL Connection Variables */
 $host=localhost;
 $user=arras_WebMaster;
 $password=qwerty;
 $dbase=arras_Members;

/* MySQL Connection String */
 $Connection=mysql_connect ($host, $user, $password)
 or die ('I cannot connect to the database because: ' . mysql_error());
 mysql_select_db ($dbase);

/* Display Current Members */
 echo \n\n\n\n\n;
 echo h3active members should appear here/h3;

$query = mysql_query(SELECT * FROM RegisteredMembers) or die(could not
execute query);
while($result = mysql_fetch_array($query)){
echo $result['UserID'];
}


?

Still no joy though. Any ideas...?

--
-
 Michael Mason
 Arras People
 www.arraspeople.co.uk
- 
The information contained in this email (and in any attachments sent with it) is 
confidential. It is intended for the addressee only. Access to this email by anyone 
else is unintended and unauthorized.  
If you are not the original addressee, 3tc asks you to please maintain 
confidentiality. If you have received this email in error please notify 3tc 
immediately by replying to it, then destroy any copies and delete it from your 
computer system. 
Any use, dissemination, forwarding, printing or copying of this email by anyone except 
the addressee in the normal course of his/her business, is strictly prohibited. 3tc 
owns the copyright in this email and any document created by us and assert the right 
to be identified as the author of it. Copyright has not been transferred to the 
addressee. 
We protect our systems with Sophos Anti-virus -  
www.sophos.com 
 

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



RE: [PHP] MySQL QUERY Results Not Appearing[Scanned]

2004-07-02 Thread Michael Egan
Glad to be of help. I'm sure there will be many more occasions when I'm badly in need 
of assistance.

Cheers,

Michael

-Original Message-
From: Harlequin [mailto:[EMAIL PROTECTED]
Sent: 02 July 2004 13:55
To: [EMAIL PROTECTED]
Subject: Re: [PHP] MySQL QUERY Results Not Appearing[Scanned]


Michael

just wanted to thank you through the group for your time.

U R A Star...!

--
-
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-
Michael Egan [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Have a look at the mysql functions in the PHP manual - i.e.
http://uk.php.net/mysql_query

I'm also certain this question has been raised fairly recently on the list.
All mysql_query is going to do is either open up the resource or not. You'll
need to use something else to display the data.

For example:

   $sql = select * from members;

   if(!$result = mysql_query($sql))
  echo mysql_error();

   while($row = mysql_fetch_array($result))
   {
  echo $row['column_name'];
   }


HTH,

Michael Egan

-Original Message-
From: Harlequin [mailto:[EMAIL PROTECTED]
Sent: 30 June 2004 12:42
To: [EMAIL PROTECTED]
Subject: [PHP] MySQL QUERY Results Not Appearing[Scanned]


Hi all...

Despite being able to make a connection to the server and execute a query I
am unable to do this through PHP using the following commands:

 echo h3active members should appear here/h3;
 $query = SELECT * FROM RegisteredMembers;
 $result = mysql_query($query) or die (could not execute query);
 echo $result;

Any ideas...?

--
-
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
The information contained in this email (and in any attachments sent with
it) is confidential. It is intended for the addressee only. Access to this
email by anyone else is unintended and unauthorized.
If you are not the original addressee, 3tc asks you to please maintain
confidentiality. If you have received this email in error please notify 3tc
immediately by replying to it, then destroy any copies and delete it from
your computer system.
Any use, dissemination, forwarding, printing or copying of this email by
anyone except the addressee in the normal course of his/her business, is
strictly prohibited. 3tc owns the copyright in this email and any document
created by us and assert the right to be identified as the author of it.
Copyright has not been transferred to the addressee.
We protect our systems with Sophos Anti-virus -
www.sophos.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 
  
  
The information contained in this email (and in any attachments sent with it) is 
confidential. It is intended for the addressee only. Access to this email by anyone 
else is unintended and unauthorized.  
If you are not the original addressee, 3tc asks you to please maintain 
confidentiality. If you have received this email in error please notify 3tc 
immediately by replying to it, then destroy any copies and delete it from your 
computer system. 
Any use, dissemination, forwarding, printing or copying of this email by anyone except 
the addressee in the normal course of his/her business, is strictly prohibited. 3tc 
owns the copyright in this email and any document created by us and assert the right 
to be identified as the author of it. Copyright has not been transferred to the 
addressee. 
We protect our systems with Sophos Anti-virus -  
www.sophos.com 
 

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



RE: [PHP] mod_rewrite[Scanned]

2004-07-01 Thread Michael Egan
Pete,

There was a thread some time ago on the issue of cloaking URLs in which a couple of 
contributors pointed to tutorials on the following site:

http://www.alistapart.com/articles/urls/

HTH,

Michael Egan

-Original Message-
From: pete M [mailto:[EMAIL PROTECTED]
Sent: 01 July 2004 14:14
To: [EMAIL PROTECTED]
Subject: [PHP] mod_rewrite[Scanned]


Know this is off topic bu can anyone help with a tuotial of something - 
been looking everywhere

All I want is a rule to  rewrite
www.example.com?page=mypageid=20this=that  to 
www.example.com/mypage/20/this

tia
Pete

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 
The information contained in this email (and in any attachments sent with it) is 
confidential. It is intended for the addressee only. Access to this email by anyone 
else is unintended and unauthorized.  
If you are not the original addressee, 3tc asks you to please maintain 
confidentiality. If you have received this email in error please notify 3tc 
immediately by replying to it, then destroy any copies and delete it from your 
computer system. 
Any use, dissemination, forwarding, printing or copying of this email by anyone except 
the addressee in the normal course of his/her business, is strictly prohibited. 3tc 
owns the copyright in this email and any document created by us and assert the right 
to be identified as the author of it. Copyright has not been transferred to the 
addressee. 
We protect our systems with Sophos Anti-virus -  
www.sophos.com 
 

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



RE: [PHP] MySQL QUERY Results Not Appearing[Scanned]

2004-06-30 Thread Michael Egan
Have a look at the mysql functions in the PHP manual - i.e. 
http://uk.php.net/mysql_query

I'm also certain this question has been raised fairly recently on the list. All 
mysql_query is going to do is either open up the resource or not. You'll need to use 
something else to display the data.

For example:

   $sql = select * from members;

   if(!$result = mysql_query($sql))
  echo mysql_error();

   while($row = mysql_fetch_array($result))
   {
  echo $row['column_name'];
   }


HTH,

Michael Egan

-Original Message-
From: Harlequin [mailto:[EMAIL PROTECTED]
Sent: 30 June 2004 12:42
To: [EMAIL PROTECTED]
Subject: [PHP] MySQL QUERY Results Not Appearing[Scanned]


Hi all...

Despite being able to make a connection to the server and execute a query I
am unable to do this through PHP using the following commands:

 echo h3active members should appear here/h3;
 $query = SELECT * FROM RegisteredMembers;
 $result = mysql_query($query) or die (could not execute query);
 echo $result;

Any ideas...?

-- 
-
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 
The information contained in this email (and in any attachments sent with it) is 
confidential. It is intended for the addressee only. Access to this email by anyone 
else is unintended and unauthorized.  
If you are not the original addressee, 3tc asks you to please maintain 
confidentiality. If you have received this email in error please notify 3tc 
immediately by replying to it, then destroy any copies and delete it from your 
computer system. 
Any use, dissemination, forwarding, printing or copying of this email by anyone except 
the addressee in the normal course of his/her business, is strictly prohibited. 3tc 
owns the copyright in this email and any document created by us and assert the right 
to be identified as the author of it. Copyright has not been transferred to the 
addressee. 
We protect our systems with Sophos Anti-virus -  
www.sophos.com 
 

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



RE: [PHP] Very strange bug. Opendir/Readdir[Scanned]

2004-06-17 Thread Michael Egan
Matt,

I've only just started to have a look at this. Having first tried to see if the code 
worked outside the class I was receiving the same error message but this might be 
attributable to line 365 including a reference to $srDirectory rather than $rDirectory.

I'll carry on working with it.

Regards,

Michael Egan

-Original Message-
From: Matt Richards [mailto:[EMAIL PROTECTED]
Sent: 17 June 2004 12:51
To: [EMAIL PROTECTED]
Subject: [PHP] Very strange bug. Opendir/Readdir[Scanned]


Imagine the following:

362class someClass {
363  function someFunction() {
364if($rDirectory = opendir(/templates)) {
365  while(false != ($strFile = readdir($srDirectory))) {
366print $strFile.br /;
367 }
368   }
369  }
370}

The class is constructed successfully, the function is called 
successfuly, the if($rDirectory = opendir(/templates)) statement 
returns true, and the directory most certainly exists, but as soon as an 
attempt to read the contents of the directory occurs, the once valid 
resource ($rDirectory) becomes invalid:

Warning: readdir(): 36 is not a valid Directory resource in 
D:\inetpub\wwwroot\phpSLearningDev\root\components\installer\inc\installer.php 
on line 365

if the code is removed from both the class and function, it executes fine.

I am currently working on a Windows 2003 server (not my choice) and an 
internal (non network (SMB)) HDD.

I can't imagine that simply being inside a class could cause this.

Am I missing something!?!?!?  I regard myself as a fairly proficient PHP 
developer, but this one has got a whole dev team stumped.

Any thoughts appreciated.

Matt Richards

matt_DOT_richards_AT_NOSPAM_safetymedia_DOT_co_DOT_uk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 
The information contained in this email (and in any attachments sent with it) is 
confidential. It is intended for the addressee only. Access to this email by anyone 
else is unintended and unauthorized.  
If you are not the original addressee, 3tc asks you to please maintain 
confidentiality. If you have received this email in error please notify 3tc 
immediately by replying to it, then destroy any copies and delete it from your 
computer system. 
Any use, dissemination, forwarding, printing or copying of this email by anyone except 
the addressee in the normal course of his/her business, is strictly prohibited. 3tc 
owns the copyright in this email and any document created by us and assert the right 
to be identified as the author of it. Copyright has not been transferred to the 
addressee. 
We protect our systems with Sophos Anti-virus -  
www.sophos.com 
 

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



RE: [PHP] small and big letter in WHERE statement[Scanned]

2004-06-14 Thread Michael Egan
The following may help:

http://dev.mysql.com/doc/mysql/en/Case_sensitivity.html

Cheers,

Michael Egan

-Original Message-
From: QT [mailto:[EMAIL PROTECTED]
Sent: 14 June 2004 18:36
To: [EMAIL PROTECTED]
Subject: [PHP] small and big letter in WHERE statement[Scanned]


Dear Sirs,

When I use where statement, I see that there is no meaning small and big
letter. Without looking small caps or big, result comes back. But I want to
match only small letters. How can I do that?

Best REgards

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 
The information contained in this email (and in any attachments sent with it) is 
confidential. It is intended for the addressee only. Access to this email by anyone 
else is unintended and unauthorized.  
If you are not the original addressee, 3tc asks you to please maintain 
confidentiality. If you have received this email in error please notify 3tc 
immediately by replying to it, then destroy any copies and delete it from your 
computer system. 
Any use, dissemination, forwarding, printing or copying of this email by anyone except 
the addressee in the normal course of his/her business, is strictly prohibited. 3tc 
owns the copyright in this email and any document created by us and assert the right 
to be identified as the author of it. Copyright has not been transferred to the 
addressee. 
We protect our systems with Sophos Anti-virus -  
www.sophos.com 
 

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



[PHP] fsockopen connection error on IIS

2004-03-31 Thread Michael Egan
Hello all,

I'm working with somebody using IIS (honest - it's not me) to try and develop some web 
services whereby a site hosted on IIS is able to access data using a nusoap client 
with a nusoap server set up on a linux/apache server. I can do this satisfactorily 
from another linux/apache server but my colleague is having problems doing this from 
IIS.

The main problem seems to be that fsockopen isn't working from their system. We have 
tried running the following script:

?php
$fp = fsockopen(www.thehostname.com, 80, $errno, $errstr, 30);

if (!$fp) 

{
   echo $errstr ($errno)br /\n;
} 

else 

{

   echo Success;

}
? 

But the following error is returned:

Warning: fsockopen(): unable to connect to www.thehostname.com:80 in 
C:\Inetpub\wwwroot\webservice\fsocktest.php on line 2
A connection attempt failed because the connected party did not properly respond after 
a period of time, or established connection failed because connected host has failed 
to respond. (10060)

I've searched through a few mailing list archives and the only thing I came across was 
the suggestion that the client server is not allowing outgoing connections. Is there 
any way of testing this or indeed any other suggestions as to what might be going 
wrong.

I confess I feel I'm on extremely thin ice with this - I'm not overly familiar with 
nusoap and have no familiarity whatsoever with IIS. Any general pointers would be 
extremely welcome.

Regards,

Michael Egan

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



RE: [PHP] Hinding URL[Scanned]

2004-03-31 Thread Michael Egan
Will,

I had a look at this a while ago though never pursued it. If you do a search on google 
for url cloaking this should give you some pointers.

I think the only way of doing it is to set up an empty frame and load all pages within 
that frame. This will hide more complex urls but with all the costs of using frames.

HTH,

Michael Egan

 -Original Message-
 From: Will [mailto:[EMAIL PROTECTED]
 Sent: 31 March 2004 14:38
 To: [EMAIL PROTECTED]
 Subject: [PHP] Hinding URL[Scanned]
 
 
 Hello all,
 
 I am hoping someone can help me.
 
 When someone brings up a page in the browser, is there a way 
 to hide the URL
 in the browser bar to a set URL??
 
 Example: I want them to see this URL in the browser:
 http://domain.com/test.htm But, I want them to see the url of
 http://domain.com in the browser bar. Is this possible?? I hope so!!!
 
 ~WILL~
 
 -- 
 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] Hinding URL{ot}[Scanned]

2004-03-31 Thread Michael Egan
John,

I agree with you but when I first looked at this I too thought there was some way of 
doing this in php which might look more elegant. Seeing urls such as 
www.mydomain.com/index.php?article_id=2id=e5t28er647ryh362hy67eh4563yh4635 looks 
fairly cumbersome and I'm sure I've seen something about problems with some of the 
search engines where session id's are included in urls.

On seeing that the only way of doing this was to use frames I decided that the costs 
of doing this probably outweighed what is in effect a purely cosmetic issue.

Regards,

Michael Egan

 -Original Message-
 From: John W. Holmes [mailto:[EMAIL PROTECTED]
 Sent: 31 March 2004 14:59
 To: Will; [EMAIL PROTECTED]
 Subject: Re: [PHP] Hinding URL{ot}[Scanned]
 
 
 From: Will [EMAIL PROTECTED]
 
  Thanks everyone! :)  I was not sure what it was called.
 
  Thanks again,
  ~WILL~
  PS: Sorry I thought you could do something in PHP.
 
 Don't think for a second that you're actually hiding anything 
 here. The only
 people you'll fool are newbies browsing the web. While 
 there are a lot of
 them, those are probably not the people you're looking to 
 hide information
 from.
 
 ---John Holmes...
 
 -- 
 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] fsockopen connection error on IIS[Scanned]

2004-03-31 Thread Michael Egan
Problem solved. It seems there was a proxy server involved which was screwing things 
up.

Regards,

Michael Egan

 -Original Message-
 From: Michael Egan 
 Sent: 31 March 2004 14:20
 To: PHP General (E-mail)
 Subject: [PHP] fsockopen connection error on IIS[Scanned]
 
 
 Hello all,
 
 I'm working with somebody using IIS (honest - it's not me) to 
 try and develop some web services whereby a site hosted on 
 IIS is able to access data using a nusoap client with a 
 nusoap server set up on a linux/apache server. I can do this 
 satisfactorily from another linux/apache server but my 
 colleague is having problems doing this from IIS.
 
 The main problem seems to be that fsockopen isn't working 
 from their system. We have tried running the following script:
 
 ?php
 $fp = fsockopen(www.thehostname.com, 80, $errno, $errstr, 30);
 
 if (!$fp) 
 
 {
echo $errstr ($errno)br /\n;
 } 
 
 else 
 
 {
 
echo Success;
 
 }
 ? 
 
 But the following error is returned:
 
 Warning: fsockopen(): unable to connect to 
 www.thehostname.com:80 in 
 C:\Inetpub\wwwroot\webservice\fsocktest.php on line 2
 A connection attempt failed because the connected party did 
 not properly respond after a period of time, or established 
 connection failed because connected host has failed to 
 respond. (10060)
 
 I've searched through a few mailing list archives and the 
 only thing I came across was the suggestion that the client 
 server is not allowing outgoing connections. Is there any way 
 of testing this or indeed any other suggestions as to what 
 might be going wrong.
 
 I confess I feel I'm on extremely thin ice with this - I'm 
 not overly familiar with nusoap and have no familiarity 
 whatsoever with IIS. Any general pointers would be extremely welcome.
 
 Regards,
 
 Michael Egan
 
 -- 
 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] Hinding URL{ot}[Scanned]

2004-03-31 Thread Michael Egan
Matt,

Many thanks for these excellent links - I think I might have reached a different 
conclusion if I'd come across these at the outset.

Cheers,

Michael Egan

 -Original Message-
 From: Matt Matijevich [mailto:[EMAIL PROTECTED]
 Sent: 31 March 2004 15:11
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP] Hinding URL{ot}[Scanned]
 
 
 snip
 I agree with you but when I first looked at this I too thought there
 was some way of doing this in php which might look more 
 elegant. Seeing
 urls such as
 www.mydomain.com/index.php?article_id=2id=e5t28er647ryh362hy6
7eh4563yh4635
 looks fairly cumbersome and I'm sure I've seen something 
 about problems
 with some of the search engines where session id's are included in
 urls.
 /snip
 
 If you use apache you could try these links
 
 http://www.alistapart.com/articles/urls/
 http://www.alistapart.com/articles/succeed/
 
 -- 
 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] display a hiddenfield

2004-02-20 Thread Michael Egan
No value has been given to the hidden field.

e.g.

print (input type=\hidden\ name=\hiddenField\ value=\yourvalue\);

HTH.

Cheers,

Michael Egan

 -Original Message-
 From: Dominique ANOKRE [mailto:[EMAIL PROTECTED]
 Sent: 20 February 2004 11:17
 To: Php List
 Subject: [PHP] display a hiddenfield
 
 
 I use a simple form like this : 
 
 print(form method=\post\ action=\image.php\\n);
 print(input type=\hidden\ name=\hiddenField\\n);
 $_POST[hiddenField] = $image_avant;
 print(input type=\submit\ name=\avant\ value=\Avant\\n);
 print(/form\n);
 
 and when i click on the submit button, i want to display the 
 value of my hiddenField (doing by the file image.php) :
 
  ?php
 echo $_POST[hiddenField];
 ?
 
 but nothing is displaying !!
 
 Please help !
 
 
 
 

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



RE: [PHP] Headers Again

2004-02-17 Thread Michael Egan
Got to agree with Jason's comments - as I'm sure all other regulars on the list will 
do.

I've just had a quick look at the php.net site, done a search for header and halfway 
down the first page returned found this:

Remember that header() must be called before any actual output is sent, either by 
normal HTML tags, blank lines in a file, or from PHP. It is a very common error to 
read code with include(), or require(), functions, or another file access function, 
and have spaces or empty lines that are output before header() is called. The same 
problem exists when using a single PHP/HTML file.

Not hard is it?

Regards,

Michael Egan

 -Original Message-
 From: PETCOL [mailto:[EMAIL PROTECTED]
 Sent: 17 February 2004 09:22
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Headers Again
 
 
 Jason,
 
 I appreciate people get just as frustrate by reading repetative posts.
 
 Alliare and Macromedias forums for ColdFusion and other 
 software, allow a
 search through the entire post, archive everything.  Which 
 always avoid this
 problem of a newsgroup.  Maybe I'm wrong, but I don't thing 
 there's a search
 like this for a newsgroup?
 
 If you do happen to know, as it would appear you may, the url 
 of the answer
 to the original question, then could you simply supply it.
 
 I'm new to this code, I appreciate any assistance, and I will 
 troll through
 archives etc to get it.  However, if some kind sole can save 
 me 3 hours
 work, I'll also appreciate it, which is probably why this list get
 repetative posts.
 
 Cheers, relax, and have a nice day.
 
 Col
 
 Jason Wong [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  On Tuesday 17 February 2004 16:37, PETCOL wrote:
 
  What you're asking is a VERY FAQ. Something that's asked 
 almost every
 other
  day. The list archives will have plenty of answers.
 
   What I shock, 307,000 entries returned.
 
  If you don't want to trawl through those search results 
 then read the
 error
  message again (carefully, all of it). If you still haven't 
 figured it then
  read the manual entry for header(), every single line, then 
 correlate what
 is
  said with the error message.
 
   Maybe someone with ability greater or other than I, 
 should give some
   serious consideration to a solution or work around.
 
  All the info you need is in the archives.
 
   I've been using ColdFuion for 7 years and I can do a cflocation
   url=anotherlocation.htm anywhere in the page, no 
 matter if I've run
   CFML, Javascript it still works.
 
  You can do that as well, again, all the info you need is in 
 the archives.
 
   Sorry I'm just frustrated.
 
  I'm sure regulars on the list are just as frustrated at how 
 often this
  question crops up and at how little research people do before asking
 another
  FAQ.
 
  -- 
  Jason Wong - Gremlins Associates - www.gremlins.biz
  Open Source Software Systems Integrators
  * Web Design  Hosting * Internet  Intranet Applications 
 Development *
  --
  Search the list archives before you post
  http://marc.theaimsgroup.com/?l=php-general
  --
  /*
  Losing your drivers' license is just God's way of saying 
 BOOGA, BOOGA!
  */
 
 -- 
 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] Please help me as fast as possible.. very important!![Scanned]

2004-01-20 Thread Michael Egan
I've never done it but I can only imagine you'd need to run some sort of CRON job to 
effect this at regular intervals.

HTH,

Michael Egan

 -Original Message-
 From: Radwan Aladdin [mailto:[EMAIL PROTECTED]
 Sent: 20 January 2004 09:45
 To: [EMAIL PROTECTED]
 Subject: [PHP] Please help me as fast as possible.. very 
 important!![Scanned]
 Importance: High
 
 
 Hi all
 
 Is it possible in mySQL to put a timer that changes a value 
 inside a row in a table every while?
 
 For example : Add 1 to the value very 10 minutes for 
 example.. Field number = 5 after ten minutes = 6 after 
 another 10 minuste = 7..Etc..
 
 Is it possible?And how?
 
 Regards..
 

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



RE: [PHP] Please help me as fast as possible.. very important!![Scanned]

2004-01-20 Thread Michael Egan
http://www.google.com/linux?hl=enlr=ie=ISO-8859-1q=cron+tutorialsbtnG=Google+Search

 -Original Message-
 From: Radwan Aladdin [mailto:[EMAIL PROTECTED]
 Sent: 20 January 2004 10:05
 To: Nick JORDAN
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] Please help me as fast as possible.. very
 important!![Scanned]
 
 
 Where can I fin tutorials about it? (CRON Tab)?
 
 Regards..
 - Original Message -
 From: Nick JORDAN [EMAIL PROTECTED]
 To: Radwan Aladdin raladin [EMAIL PROTECTED]
 Sent: Tuesday, January 20, 2004 1:56 PM
 Subject: Re: [PHP] Please help me as fast as possible.. very 
 important!!
 
 
   Is it possible in mySQL to put a timer that changes a 
 value inside a
   row in a table every while?
 
   For example : Add 1 to the value very 10 minutes for example..
   Field number = 5 after ten minutes = 6 after another 10 minuste =
  7..Etc..
 
 
  As far as I'm aware, that's not possible in MySQL, however 
 you could write
  a small script in PHP (or, indeed, some other language) which would
  increment the counter, and which would be run at intervals 
 via cron (for
  instance).
 
  A better solution, however, would be to include a timestamp in your
  database, then, when data is requested, calculate how many 
 units of ten
  minutes have passed and adjust your counter accordingly.
 
  Nick
 
 
 -- 
 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] [Fwd: failure notice][Scanned]

2003-12-10 Thread Michael Egan
Sophie,

Just to add weight to your comment - I've been receiving identical notices though I 
don't know what causes this.

Regards,

Michael Egan

-Original Message-
From: Sophie Mattoug [mailto:[EMAIL PROTECTED]
Sent: 10 December 2003 09:45
To: [EMAIL PROTECTED]
Subject: [PHP] [Fwd: failure notice][Scanned]


Does someone know why do I receive such messages each time I post to the 
list ?!?

 Original Message 
Subject:failure notice
Date:   10 Dec 2003 09:42:41 -
From:   [EMAIL PROTECTED]
To: [EMAIL PROTECTED]



Hi. This is the qmail-send program at pb1.pair.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

[EMAIL PROTECTED]:
This message is looping: it already has my Delivered-To line. (#5.4.6)

--- Below this line is a copy of the message.

Return-Path: [EMAIL PROTECTED]
Received: (qmail 55196 invoked from network); 10 Dec 2003 09:42:41 -
Received: from unknown (HELO c2bapps17.btconnect.com) (193.113.154.33)
  by pb1.pair.com with SMTP; 10 Dec 2003 09:42:41 -
Received: from gateway.btopenworld.com (actually host 185.136.40.217.in-addr.arpa) by 
dswu194 with SMTP-CUST (XT-PP) with ESMTP; Wed, 10 Dec 2003 09:42:27 +
Received: from gateway (127.0.0.1) by gateway.btopenworld.com (Worldmail 1.3.167) for 
[EMAIL PROTECTED]; 10 Dec 2003 09:51:26 +
Delivery-Date: Wed, 10 Dec 2003 09:37:46 +
Received: from pb1.pair.com (actually host 4.131.92.216.in-addr.arpa) by dswu231 with 
SMTP (XT-PP); Wed, 10 Dec 2003 09:37:44 +
Received: (qmail 44080 invoked by uid 1010); 10 Dec 2003 09:36:43 -
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
list-help: mailto:[EMAIL PROTECTED]
list-unsubscribe: mailto:[EMAIL PROTECTED]
list-post: mailto:[EMAIL PROTECTED]
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 44067 invoked by uid 1010); 10 Dec 2003 09:36:43 -
Delivered-To: [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
Message-ID: [EMAIL PROTECTED]
Date: Wed, 10 Dec 2003 10:37:10 +0100
From: Sophie Mattoug [EMAIL PROTECTED]
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 Debian/1.5-3
X-Accept-Language: fr-fr
MIME-Version: 1.0
To: [EMAIL PROTECTED]
References: [EMAIL PROTECTED]
In-Reply-To: [EMAIL PROTECTED]
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Subject: Re: [PHP] Display Query Result As Editable Form

input type=text name=name value=?=$value?

[EMAIL PROTECTED] wrote:

Hi all, 

I am creating a user form whereby I will do an INSERT , SELECT , UPDATE 
and of course DELETE for the form. Right now I am trying to create a form 
whereby when user choose to update their info, they wil be directed to a form 
where the fields region are EDITABLE , before that, the fields should contain 
their old info...so can i know how should i go about creating this 
kinda Editable fields using php scripting ???Fields should contain old info 
retrieved from the DB.Anyone have any idea??

Realli need some help here. 
Thanks in advance =)

Irin.

  


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

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

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



[PHP] Structuring keyword searches

2003-12-09 Thread Michael Egan
I'd better apologize at the outset as I'm not sure this is strictly a PHP problem - 
though I'm using PHP as the means of building the application.  Anyway, here goes:

I'm creating a website that will function as a directory of services within a specific 
area of the UK charity sector.  A variety of groups will input the content via a 
custom built CMS and this content will then be available to the general public.  One 
of the requirements is that a keyword search facility is built into the application 
allowing end users to search for services based on a variety of words they might 
associate with them.

What I propose to do is have a separate table of keywords/phrases that have been 
previously entered by contributors.  There will then be a separate table linking the 
id field of the associated keywords with the id field of the service in question.  
Herein lies the problem.

The contributors will be presented with a multi-part form.  When it comes to the stage 
at which they will need to enter the relevant keywords for a service there seem to me 
to two ways of dealing with this:

1.  Allow the contributors to enter whatever keywords and phrases they wish.

2.  Only allow contributors to have access to a restricted set of keywords/phrases.

The first of these options would run the risk of creating an unmanageably large and 
devalued set of keywords/phrases. The second option would seem to result in a set of 
keywords that are too generalized to be of much benefit to the ultimate end users.

Are there any accepted approaches to tackling such a problem which anyone could point 
me towards?  I'm sure it must have been encountered before though I've been unable to 
find much on this after extensive googling and searching through mailing list archives.

Thanks in advance (and in hope),

Michael Egan

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



RE: [PHP] How can i print out the files in a directory?[Scanned]

2003-10-17 Thread Michael Egan
Bas,

I think the following should work though it might need some tweaking as it's some 
weeks since I did:

   $dir = directoryname;

   $dp = opendir($dir);

   $filenames = array();

   while($file = readdir($dp))
   {
  array_push($filenames, $file);
   }

   // Compile an array of the files
   for($i = 0; $i  count($filenames); $i ++)
   {
  if(!(is_dir($dir/$filenames[$i])))
  {
 echo $filenames[$i].br;
  }
   }


You can probably print out the filenames at the first stage - I think there was a 
reason why I was passing them into a separate array but I've forgotten what it was!!

Regards,

Michael Egan

-Original Message-
From: Bas [mailto:[EMAIL PROTECTED]
Sent: 17 October 2003 13:42
To: [EMAIL PROTECTED]
Subject: [PHP] How can i print out the files in a directory?[Scanned]


How can i print out all of the files in a directory?

I want some output as this:

index.php
login.php
image1.gif
image2.jpg

-- 
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] date for mysql[Scanned]

2003-10-17 Thread Michael Egan
Diana,

Have a look at the getdate() function.

This will return an associative array of a time which you can then use to create the 
date in the format you wish.

Regards,

Michael Egan

-Original Message-
From: Diana Castillo [mailto:[EMAIL PROTECTED]
Sent: 17 October 2003 14:29
To: [EMAIL PROTECTED]
Subject: [PHP] date for mysql[Scanned]


how can I format the current date and time so that I can insert it into a
mysql table with an insert query?

-- 
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] Dynamic tables-Change cell colour with drop down menu[Scanned]

2003-10-02 Thread Michael Egan
One possible solution:

In the form create the dropdown menu with the colour name being displayed to the user 
but the hexadecimal value of the colour being stored in the value field, i.e.

select name='colour'
option value='#ff'Red/option
/select

When user selects the colour this should give you the colour reference to use when 
displaying the resulting page, i.e. $colour, which you could then use when creating 
the cell in the table - td bgcolor='$colour'

HTH,

Michael Egan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 02 October 2003 11:40
To: 'PHP General'
Subject: [PHP] Dynamic tables-Change cell colour with drop down
menu[Scanned]



Hi all:

I am doing a dynamic kinda timetable where all the cells are uniquely coloured.
And then for each cell, I would like to change its colour through a dropdown
menu. This dropdown menu should of course have a list of colours for me to
choose. Once I have selected the colour I want, the particular cell colour
should be changed to the colour which i have selected earlier on, once the page
is refreshed. Is there any way to do it using PHP ??I do not want to it using
javascript as java script can only display data on the client side but not the
server side.

Any help given are greatly appreciated.

Regards, 
Irin.

-- 
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] Retaining formatting problem[Scanned]

2003-07-08 Thread Michael Egan
I've experienced the same problem. It's not that the line returns disappear - they 
will still be retained but stored as /n or /r.  

You'll need to find a way of replacing the line breaks with a html paragraph break - 
assuming your required output is html. Perhaps some of the regexp functions will help 
in this - I haven't got the code I used for this to hand.

HTH,

Michael Egan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 08 July 2003 10:30
To: [EMAIL PROTECTED]
Subject: [PHP] Retaining formatting problem[Scanned]


Hello everyone,

I have a long running problem that i just want to get covered, I have a standard text 
box for people to insert long lengths of text.

This text box is in a standard input type=text but when I insert it into the 
database the line returns dissapear, eg 

this 

little amount of

text

will enter like

this little amount of text will enter like

Please help me it is p!!$$!ng me right off :P

Cheers in advance

-- 
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] Forms PHP[Scanned]

2003-07-02 Thread Michael Egan
If I've understood your initial email correctly another approach would be to save the 
contents of the form to your database and populate the form fields presented 
subsequently with information retrieved from the database.

You can use the header function to redirect to whatever page you wish once the 
information has been saved.

Regards,

Michael Egan



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



RE: [PHP] passwd protected page[Scanned]

2003-06-26 Thread Michael Egan
Bibhas,

I've seen many references to the phpBB application on this list in the past and had a 
look at it in detail some weeks ago.  It's a fairly large application but the way they 
deal with sessions is instructive.

If I've understood it correctly they don't use the session management features in PHP 
but create their own.  When a user visits the site a session is created with a unique 
identifier. This is then stored in a sessions table in the database.  The session ID 
is passed to other pages as the user visits them either by use of cookies or by 
appending the session id to each url. If the user logs in then the user id is also 
stored in the relevant sessions table and other information about the user is pulled 
from a users table for that user id.

If you download the application - www.phpbb.com - you'll find the relevant code in the 
sessions file within the includes directory - though they have recently upgraded the 
application so this might have changed.

HTH,

Michael Egan


-Original Message-
From: Bibhas Kumar Samanta [mailto:[EMAIL PROTECTED]
Sent: 26 June 2003 08:23
To: Chris Kay
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] passwd protected page[Scanned]


my problem is that when I use sessions in the restricted pages
the session_start() seem to reset the form  ( when other filled in data 
is lost) when go back to the form using
Back in the browser.
So I wanted to avoid session_start

How are the good php sites designed ?

regds,
Bibhas




Chris Kay wrote:
 
 Why not use sessions, store a $loggedin value in a session or cookie
 And check that at the top of each page.. no session = no access
 
 Hope this helps
 
 -
 Chris Kay
 Techex Communications
 Website: www.techex.com.au Email: [EMAIL PROTECTED]
 Telephone: 1300 88 111 2 - Fax: 1300 882 221
 -
 
 -Original Message-
 From: Bibhas Kumar Samanta [mailto:[EMAIL PROTECTED]
 Sent: Thursday, 26 June 2003 5:14 PM
 To: Sichta Daniel
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] passwd protected page
 
 how should I pass the logged in user to other pages ?
 In the database at the same time there might be several user
 logged in ?
 
 Thanks,
 Bibhas
 
 Sichta Daniel wrote:
 
  Hi,
 
  You can validate user on login page and sets the flag in database
 table.
  Then on each page you have to check that flag again 
 
  DS
 
  -Original Message-
  From: Bibhas Kumar Samanta [mailto:[EMAIL PROTECTED]
  Sent: Thursday, June 26, 2003 8:52 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] passwd protected page
 
  Hi,
 
  Without using sessions , how can I create
  passwd protected pages in mysql/php.
 
  I need to remember the user from login page and
  validate this user in other pages.
 
  Thanks,
  Bibhas
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 --
 Message protected by MailGuard: e-mail anti-virus, anti-spam and content
 filtering.
 http://www.mailguard.com.au/mg
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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


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



RE: [PHP] need help breaking out of loop.[Scanned]

2003-06-26 Thread Michael Egan
Anders,

Are you missing a '|' in the if condition?


Michael Egan

-Original Message-
From: anders thoresson [mailto:[EMAIL PROTECTED]
Sent: 26 June 2003 12:01
To: [EMAIL PROTECTED]
Subject: [PHP] need help breaking out of loop.[Scanned]


Hi,

 I'm working of a PHP-MySQL-planning system for a newspaper. I want to add 
dates and number for each issue. I have to following code, where 
$current_date is a unix timestamp.

 If $current_date is a Saturday or Sunday, I want to quit the current 
execution of the loop and contiune with the next date. But when the if- 
clause that checks if $issue_day_of_week is Sunday or Saturday is included 
in my while-loop, everything stalls. Without it, everything goes smooth.

 What am I missing?

while ($i = $number_of_days)
{
$issue_date = strftime(%Y-%m-%d, $current_date);
$issue_month = date(m, $current_date);
$issue_day = date(d, $current_date);
$issue_day_of_week = date(l, $current_date);

// Check that $issue_date isn't Saturday or Sunday

if ($issue_day_of_week == Sunday | $issue_day_of_week == Saturday)
{
continue;
}

if ($issue_month == 1  $issue_day == 1)
{
$issue_number = 1;
$current_date = $current_date + 86400;
$i++;
$issue_number++;
continue;
}
$current_date = $current_date + 86400;  
$i++;
$issue_number++;
}

-- 
anders thoresson

-- 
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] sessions and browser back[Scanned]

2003-06-25 Thread Michael Egan
Bibhas,

I'm sure I've read somewhere that this is a deliberate security feature with using 
sessions - i.e. you can't view contents of form fields by using the back button on 
your browser.

Couldn't you use JavaScript to ensure that the data is validated on the client side 
before the form is submitted?  

Regards,

Michael Egan

-Original Message-
From: Bibhas Kumar Samanta [mailto:[EMAIL PROTECTED]
Sent: 25 June 2003 14:26
To: [EMAIL PROTECTED]
Subject: [PHP] sessions and browser back[Scanned]


Hi,

I am trying to create restricted pages for my php/mysql/apache
server with sessions and passing session varibales to other pages for 
validation.

Eventually I am doinng session_start() at the begining and
checking whether logged in user is authorised to use this page
by a routine.

Now problem is, if filled in data in the form is incorrect, the forms 
gives an error. But when I press browser BACK button to get the
filled in form , the form seems to get reset with _no_ data.

When I try without session_start() at the begining  of form , things
seem to behave normally.

Does session_start() reset the form  and I guess browser should
have returned be by fiiled in page from cache ?

Please help

-Bibhas

-- 
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] Why Fatal Error ?[Scanned]

2003-06-19 Thread Michael Egan
Tony,

It might be that somewhere in your code there is a loop or while structure that has an 
error.  This is running endlessly until you run out of memory which is when you see 
the error message.

Check the structures within the code to ensure that they are correct.

HTH,

Michael Egan

-Original Message-
From: Tony Arcucci [mailto:[EMAIL PROTECTED]
Sent: 19 June 2003 15:33
To: [EMAIL PROTECTED]
Subject: [PHP] Why Fatal Error ?[Scanned]


Why this error ( Linux Redhat 8.0, PHP 4.2.2):

  Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to
allocate 1048576 bytes) in /var/www/html/xpai/xmail.class on line 71

  Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to
allocate 131 bytes) in Unknown on line 0

In PHP.INI memory_limit id 60M.




-- 
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] error reporting linenumber and filename[Scanned]

2003-06-16 Thread Michael Egan
Use the predefined constant:

__LINE__

Regards,

Michael Egan

-Original Message-
From: Bas Jobsen [mailto:[EMAIL PROTECTED]
Sent: 16 June 2003 12:50
To: PHP General
Subject: [PHP] error reporting linenumber and filename[Scanned]


Hi,

Running the code below, shows an errror in line 2 as expected.
How do i get the linenumber of the function call? 3 here.

?
function test($x){if($x!='a')trigger_error('error: call test with argument 1 
equals a',E_USER_ERROR);}
test('b');
?

Best regards,

Bas

-- 
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] Checking for existing records

2003-06-03 Thread Michael Egan
Hello all,

I'm looking for the sort of programming inspiration I suspect I won't find in manuals 
- I have checked the web first!

When saving records to a table I generally do a fairly standard check to ensure that 
there is not already a record of the same name.  I even put a big warning message on 
the page asking users to check to ensure that a record of a particular name doesn't 
already exist before they create a new record.  But this hasn't stopped entries such 
as the following:

Record x: The Prince's Trust
Record y: The Princes Trust
Record z: the Prince's Trust

Two of these were entered as consecutive records by the same person!

I know I won't be able to make any application entirely foolproof but are there any 
steps I could use within the combination of MySQL and PHP that might minimize such 
duplication?

Thanks in advance,

Michael Egan

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



RE: [PHP] Checking for existing records[Scanned]

2003-06-03 Thread Michael Egan
Thanks - I'll try to add these checks. 

Life would be so much easier if it weren't for the users :-)



Michael Egan



-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]
Sent: 02 June 2003 14:38
To: Michael Egan; PHP General (E-mail)
Subject: RE: [PHP] Checking for existing records[Scanned]


[snip]
When saving records to a table I generally do a fairly standard check to
ensure that there is not already a record of the same name.  I even put
a big warning message on the page asking users to check to ensure that a
record of a particular name doesn't already exist before they create a
new record.  But this hasn't stopped entries such as the following:

Record x: The Prince's Trust
Record y: The Princes Trust
Record z: the Prince's Trust

I know I won't be able to make any application entirely foolproof but
are there any steps I could use within the combination of MySQL and PHP
that might minimize such duplication?
[/snip]

Just some very quick thoughts

Convert to either all uppers or all lowers (in the background) and check
againsts something done to the DB similarly. I would say that you could
do a LIKE query against the DB entries where the string length is
similar (a diff of one or two characters, but this could be really
innefficent and perhaps inaccurate. I am in the middle of trying to make
a LIKE query more efficientit is a bear! Anyhow, that is some very
quick thoughts...

HTH!

Jay

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



RE: [PHP] Checking for existing records[Scanned]

2003-06-03 Thread Michael Egan
I should have looked at the manual a bit more thoroughly.

I've just come across the similar_text() function which should do just what I'm after 
:-)

Thanks,

Michael Egan

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



RE: [PHP] Checking for existing records[Scanned]

2003-06-03 Thread Michael Egan
Thanks Daniel.

I think the approach I'll settle for will be to do an initial check to make sure that 
no record of exactly the same name exists and then look through the records to see if 
there are any similar records using the similar_text() function.

I'll present the records from the second stage to the user to prompt them to see if 
they really want to add the record name they have just entered.

If there are any improvements to this I'll be happy to take them on board.

I confess that by far and away my preferred solution would be to get the staff of the 
section using the application to put their brains into gear before using it - but I 
suppose if everybody did this some of us might be out of a job.

Sorry about the rant but it's been one of those weeks - and it's only Monday!!

Thanks,

Michael Egan

-Original Message-
From: Daniel Stark [mailto:[EMAIL PROTECTED]
Sent: 02 June 2003 15:11
To: Michael Egan
Cc: PHP General (E-mail)
Subject: Re: [PHP] Checking for existing records[Scanned]


You might also look into word stemming (removing suffixes and possibly 
prefixes) and comparing stemmed titles. Another possibility would be to 
find a list of commonly misspelled/misused words like (there, their, 
they're) and substitute all possibilities with one version for the 
purposes of checking the title. Also removing stop words like (the, of, 
and) and then comparing titles would be a good method. Hint: lots of 
these methods are used in Keyword finding algorithms.

You might also make the process more interactive for your users. If you 
find a title through the above methods that seems like a hit present it 
to the user and say:

The following records were already found in the system, please verify 
that the record you are adding is unique.

Then let the user indicate whether the record is in fact unique.

hth,
Dan


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



RE: [PHP] My Sincere Request!![Scanned]

2003-05-28 Thread Michael Egan
And what exactly has this got to do with PHP :-)

-Original Message-
From: REV DR EGO MOMOH [mailto:[EMAIL PROTECTED]
Sent: 01 January 1999 17:59
To: [EMAIL PROTECTED]
Subject: [PHP] My Sincere Request!![Scanned]


BRANCH MANAGER, 
UNITED BANK FOR AFRICA PLC 
ILUPEJU BRANCH LAGOS NIGERIA 
ATTN: PRESIDENT/C.E.O 
I am pleased to get across to you for a very urgent and profitable business proposal, 
though I don't know you neither have I seen you before but my confidence was reposed 
on you when the Chief Executive of Lagos State chamber of Commerce and Industry handed 
me yourcontact for a confidential business. I am the manager of United Bank for Africa 
Plc (UBA),Ilupeju branch, Lagos Nigeria.The intended business is thus; We had a 
customer, a Foreigner (a Turkish) resident in Nigeria, he was a Contractor with one of 
the Government Parastatals.He has in his Account in my branch the sum of US 38.6 
Million (Thirty Eight Million, Six HundredThousandU.SDollars).Unfortunately, the man 
died four years ago until today non-of his next of kin has come forward to claim the 
money. Having noticed this, I in collaboration with two other top Officials of the 
bank have covered up the account all this while. Now we want you (being a foreigner) 
to be fronted as one of his next of kin and forward your account and other relevant 
documents to be advised to you by us to attest to the Claim. We will use our positions 
to get all internal documentations to back up the claims . The whole procedures will 
last only five working days to get the fund retrieved successfully without trace even 
now or in future.Your response is only what we are waiting for as we have arranged all 
necessary things. As soon as this message comes to you kindly get back to me 
indicating your interest, then I will furnish you with the whole procedures to ensure 
that the deal is successfully concluded. For your assistance we have agreed to give 
you twenty five percent (25%) of the Total sum at the end of the transaction while 65% 
would be for my colleagues and I and the remaining 10% would be for any form 
ofexpenses that may be incurred during the course of the transaction which would be 
given to us when the money is transferred into your account before splitting the 
balance on the agreed percentage of 65% to 25%. In order to get all the legal 
documents from the court, kindly send the following information to us immediately. 
Your full name,telephone,mobile and fax numbers as well as your resident or company 
address. I await your earliest response. 
Thanks, 
Yours Sincerely 
REV DR EGO MOMOH.



-- 
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] Zip to postcode[Scanned]

2003-04-02 Thread Michael Egan
Andy,

There are some ready made scripts for dealing with UK post codes on the relevant page 
on the PHP site:

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


HTH,

Michael Egan

-Original Message-
From: Andy [mailto:[EMAIL PROTECTED]
Sent: 02 April 2003 12:54
To: [EMAIL PROTECTED]
Subject: [PHP] Zip to postcode[Scanned]


Can someone please tell me how i change the following code:
if (!ereg(^[0-9]{5,5}(\-[0-9]{4,4})?$,$postcode))

to a UK postcode QQ1 1QQ
When i fill out the form it tells me that the postcode is not valid and i
think it is because it is in zip code format.

Thank you

Andy



-- 
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] gd library + animated gif[Scanned]

2003-03-28 Thread Michael Egan
There's a section on Freshmeat about the ImageMagick project with further links:

http://freshmeat.net/projects/imagemagick/?topic_id=100

Given your previous comment it's tempting to say that a search on Google for 
'ImageMagick' would, er - well - but I'll resist :-)

Regards,

Michael


 Can GD library produce animated gif's?

 The PHP manual will tell you this. I'll save you the trouble, but next
time... well... the PHP manual will tell you stuff like this:

 Since a certain version of PHP, GIFs are unsupported. I'm told they can be
 read, but as far as producing new ones (resizing, changing, etc.) there's a
 copyright issue over its encryption method. To use GD completely, go wtih
 JPG or PNG. But, there is ImageMagick(?). Check that out. Anyone got a URL?


-- 
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] Addslashes problem (MSSQL)[Scanned]

2003-03-20 Thread Michael Egan
Kelvin,

This link should be helpful:

http://www.mysql.com/doc/en/String_syntax.html

Regards,

Michael Egan

-Original Message-
From: Poon, Kelvin (Infomart) [mailto:[EMAIL PROTECTED]
Sent: 20 March 2003 16:21
To: 'Lowell Allen'
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Addslashes problem (MSSQL)[Scanned]



What do you mean by It escapes single quotes with single quotes.?

so let's say my $content is 

lalal 'lalalal' lalala


then what do I have to do to $content in order to insert to my MSSQL table?
-Original Message-
From: Lowell Allen [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 11:20 AM
To: PHP
Subject: Re: [PHP] Addslashes problem (MSSQL)


MS-SQL doesn't escape with slashes. It escapes single quotes with single
quotes.

--
Lowell Allen

 From: Poon, Kelvin (Infomart) [EMAIL PROTECTED]
 Date: Thu, 20 Mar 2003 10:58:02 -0500
 To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
 Subject: [PHP] Addslashes problem (MSSQL)
 
 Hi,
 
 I have a problem that lets you add a record to a database.  THere is a
 problem with it, and the following is the area of the program where it has
 problem.
 
 
 
 $created_date = date('m, d, Y');
 
 $title = strip_tags($title);
 $keywords = strip_tags($keywords);
 $content = strip_tags($content);
 $product = strip_tags($product);
 
 
 if (!get_magic_quotes_gpc()) {
 $title = addslashes($title);
 $keywords = addslashes($keywords);
 $product = addslashes($product);
 $content = addslashes($content);
 }
 
 $query = SELECT * FROM knowledgeBase;
 $result = mssql_query($query);
 
 $ID = mssql_num_rows($result);
 $ID += 1;
 
 $query2 = INSERT INTO knowledgeBase(
 ID,
 Title,
 Keywords,
 Content,
 [Created Date],
 [Updated Date],
 Product)
 VALUES(
 '.$ID.',
 '.$title.',
 '.$keywords.',
 '.$content.',
 '.$created_date.',
 'Never',
 '.$product.');
 $result2 = mssql_query($query2);
 
 
 
 where my $content value is osmethign like this.
 
 Step 1: Access the homepage
 Step 2: type in your username under the field 'username' 
 
 and after the addslashes funciton there would be \ around the 'username'
 like this..
 \'username\'and now after running this program I got an error message:
 
 Warning: MS SQL message: Line 14: Incorrect syntax near 'username'.
 (severity 15) in
d:\apache_docroots\internal.infomart.ca\infodesk\kb_add.php
 on line 119
 
 Warning: MS SQL: Query failed in
 d:\apache_docroots\internal.infomart.ca\infodesk\kb_add.php on line 119
 
 
 
 does any body have any idea?  I did the same thing with another problem
but
 it worked fine.  I have no idea what the problem is.  I know I need to
 addslashes to the string since I am putting it in the valuable
 $query2..please advise..
 
 THanks!.
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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

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


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



RE: [PHP] random letter/character?[Scanned]

2003-03-19 Thread Michael Egan
I put together the following function to give me a password consisting of random 
letters and numbers.  It should be fairly clear as to how you'd need to tweak it to 
just give you the characters you'd need interspersed with spaces.

Hope this helps - I also hope anybody else is fairly gentle with their criticisms and 
pointers to whatever is wrong with the script - this is the first time I've ventured 
to include something like this in a response to an email on the list :-(


   function get_password()
   {
  // Create the password variable as an array
  $temp_password = array();
  // Create an array of the letters of the alphabet
  $letters = array(a, b, c, d, e, f, g, h, i, j, k,
   l, m, n, o, p, q, r, s, t, u, v,
   w, x, y, z);
  // Get the first three alpha characters of the password
  for($row = 0; $row  3; $row ++)
  {
srand ((double) microtime() * 100);
$rand_number = rand(0, 25);
$letter = $letters[$rand_number];
array_push($temp_password, $letter);
  }
  // Get five numeric characters to complete the password
  for($row = 0; $row  5; $row ++)
  {
srand ((double) microtime() * 100);
$rand_number = rand(0, 9);
array_push($temp_password, $rand_number);
  }
  // Convert the array into a single string
  for ($row = 0; $row  count($temp_password); $row ++)
  {
$password .=  $temp_password[$row];
  }
  // Return the password to the script that called the function
  return $password;
   }


By the way - I put this together one evening after consuming five pints of Jameson's 
with one arm tied behind my back and whilst wearing a blindfold!


Michael Egan



-Original Message-
From: Bryan Koschmann - GKT [mailto:[EMAIL PROTECTED]
Sent: 19 March 2003 07:44
To: PHP General
Subject: [PHP] random letter/character?[Scanned]


Hi,

I need to get a php script to print out a list of random characters. This
is the list:

a'
b'
c'
d'
e'
f'
g'
a''
b''
c''
d''
e''
f''
g''

They would be printed to a maximum of 50 in a row separated by spaces. Can
anyone give me a pointer as to how to do this? Since the rand functions
are only for numbers, maybe assign each character group a number?

Thanks in advance!

Bryan


-- 
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] Ereg sass[Scanned]

2003-03-18 Thread Michael Egan
Try

[A-Za-z0-9_\-\.]*

-Original Message-
From: Liam Gibbs [mailto:[EMAIL PROTECTED]
Sent: 18 March 2003 08:52
To: php list
Subject: Re: [PHP] Ereg sass[Scanned]


 try two backslashes to escape php special characters

Tried that with the same result.



 I'm not sure why, but I can't include a period in my eregi statement:
 
 [A-Za-z0-9_-.]*
 
 For this, I get Warning: ereg() [function.ereg]: REG_ERANGE in
 /home/website/public_html/Functions.inc on line 27
 
 The same goes for [A-Za-z0-9_-\.]*
 
 Anyone know why?
 
 
 


-- 
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] Making a Loop.[Scanned]

2003-03-12 Thread Michael Egan
Philip,

I might be missing something but just looking at the top few lines of your code the 
$number variable has no value.

The loop will run on howver many times corresponds to this value - with the value 
being null it's not going to run.

You'll need to pass in a value from elsewhere.

Michael Egan

-Original Message-
From: Philip J. Newman [mailto:[EMAIL PROTECTED]
Sent: 12 March 2003 08:21
To: [EMAIL PROTECTED]
Subject: [PHP] Making a Loop.[Scanned]


I have this code to make this form list $x amount of times.

  for ($i = 1; $i = $number; $i++) {

  echoselect name=\$number\ size=\1\;

   // LIST ALL PRODUCTS IN DATABASE.

   $sql = SELECT * FROM products ORDER BY productCode ASC;
  $sql_result = mysql_query($sql, $connection) or die (Could not
get Query);

  while ($row = mysql_fetch_array($sql_result)) {

   $productCode=$row[productCode];
   echo option value=\$productCode\$productCode/optionbr;

   } // END WHILE.

 echo/select;


  }

and it dose not work any help?

--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]

+64 (9) 576 9491
+64 021-048-3999

--
Friends are like stars
You can't allways see them,
but they are always there.

--
Websites:

PhilipNZ.com - Design.
http://www.philipnz.com/
[EMAIL PROTECTED]

Philip's Domain // Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]

Vital Kiwi / NEWMAN.NET.NZ.
http://www.newman.net.nz/
[EMAIL PROTECTED]



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

2003-03-11 Thread Michael Egan
Robin,

There really are a huge amount of resources on the web for this.

The PHP online manual itself is good for reference but for step by step guides you 
might want something different.

I came across a fairly comprehensive guide on developing PHP based databases at: 
www.keithjbrown.co.uk/vworks/php/ - though I confess I haven't worked my way through 
it.

Personally I like to have something in hard copy to work my way through. There are a 
wide range of books about PHP - with a number from Wrox that I tend to use a lot - see 
www.wrox.com.  There's one called 'Beginning PHP' that will take you through all you 
need to get started.

Good luck,

Michael



-Original Message-
From: Robin [mailto:[EMAIL PROTECTED]
Sent: 11 March 2003 08:02
To: [EMAIL PROTECTED]
Subject: [PHP] newbie[Scanned]


Hello

Please could somebody point me in the right direction for learning about
PHP?

Any links would be greatfully appreciated!

Thanks


Robin



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



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



RE: [PHP] Re: Checking for empty values sent from a form[Scanned]

2003-03-06 Thread Michael Egan
Have you tried echoing out the $query just to ensure that all the expected values are 
being passed to this?

If the old_email field is blank I think it will carry out the update but no rows will 
be affected.

Michael

-Original Message-
From: Leendert [mailto:[EMAIL PROTECTED]
Sent: 06 March 2003 14:24
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Checking for empty values sent from a
form[Scanned]


You usually don't want spaces either

foreach($_POST as $val)
{
if(strlen(trim($val))  1)
// do what you want
}


Rick Emery [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 foreach($HTTP_POST_VARS as $val)
   if($val==)
   {
   do something
   }
 - Original Message -
 From: shaun [EMAIL PROTECTED]
 To: 
 Sent: Thursday, March 06, 2003 7:45 AM
 Subject: [PHP] Re: Checking for empty values sent from a form


 thanks for your reply but I was wondering if there was a way to check
 through all of the form entries with an easier way that

 if ($_POST['your_input_name'] == '' || $_POST['your_input_name'] == '' ||
 $_POST['your_input_name'] == '' || $_POST['your_input_name'] == '' ) //etc
   // field is empty

 this would be particularly useful for forms with lots of fields...


 Niels Andersen [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Since input from a form are strings, you can check like this:
 
  if ($_POST['your_input_name'] == '')
// field is empty
 
  Shaun [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
   Is there an easy way to scan through an array of values sent from a
form
  to
   see if any of them are empty?
  
  
 
 



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






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



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



RE: [PHP] Problem updating[Scanned]

2003-03-06 Thread Michael Egan
Join the club.

I spent some time looking at your original post - submitted a response - but 
associated it with the wrong thread!

Apologies to all!

Michael

-Original Message-
From: Steve Jackson [mailto:[EMAIL PROTECTED]
Sent: 06 March 2003 15:00
To: 'Tom Rogers'
Cc: 'PHP General'
Subject: RE: [PHP] Problem updating[Scanned]


Actually it didn't need the globals,
But I did need to pass the variables into the function!
Update_subscriber_account($var1, $var2 etc)
I feel a right plonker now!

Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com
[EMAIL PROTECTED]
Mobile +358 50 343 5159





 -Original Message-
 From: Tom Rogers [mailto:[EMAIL PROTECTED] 
 Sent: 6. maaliskuuta 2003 16:28
 To: Steve Jackson
 Cc: PHP General
 Subject: Re: [PHP] Problem updating
 
 
 Hi,
 
 Friday, March 7, 2003, 12:27:27 AM, you wrote:
 SJ Been on this a couple of hours... anyone see what I'm 
 doing wrong? I 
 SJ get a result of 1 when I echo $result but it doesn't want 
 to update 
 SJ at all. The action of this form 
 index.php?action=update-account is 
 SJ just a switch case
 SJ Which asks you to use the function 
 update_subscriber_account() below...
 
 SJ form method='post' action='index.php?action=update-account'
 SJinput type='hidden' name='old_id' value='$email'
 SJtr
 SJ  th colspan = 2 bgcolor = '#5B69A6'
 SJ $title 
 SJ  /th
 SJ/tr
 SJtr
 SJ  tdReal Name:/td
 SJ  tdinput type = text name='new_realname' maxlength = 100 
 SJ   value ='$realname'/td
 SJ/tr
 SJtr
 SJ  tdPreferred Name:/td
 SJ  tdinput type = text name='new_nickname' maxlength = 100 
 SJ   value ='$nickname'/td
 SJ/tr
 SJtr
 SJ  tdCompany:/td
 SJ  tdinput type = text name='new_company' maxlength = 100 
 SJ   value ='$company'/td
 SJ/tr
 SJtr
 SJ  tdEmail Address:/td
 SJ  tdinput type = text name='new_email' maxlength = 100 
 SJ   value ='$email'/td
 SJ/tr
 SJtr
 SJ  tdRequested Email Format:/td;
 SJ  echo tdselect name='new_mimetype'option; 
 SJif ($mimetype == 'T') 
 SJ   echo  selected;
 SJecho Text Onlyoption;
 SJif ($mimetype == 'H') 
 SJ   echo  selected;
 SJecho HTML/select/td;
 SJ print /tr
 SJ tr
 SJ td colspan=2 align=center;
 SJ display_form_button('save-changes');
 SJ print /td/tr/form/table/centerbr;
 SJ }
 SJ }
 
 SJ function update_subscriber_account()
 SJ {
 
 SJ db_connect();
 SJ $query = update subscribers 
 SJ set email = '$new_email',
 SJ nickname = '$new_nickname',
 SJ fullname = '$new_realname',
 SJ company = '$new_company',
 SJ mimetype = '$new_mimetype'
 SJ where email = '$old_id';
 SJ $result = mysql_query($query)or die(Error: Could not update 
 SJ queryBR$queryBR.mysql_error());
 SJ if (!$result)
 SJ {
 SJ echo An error occurred when trying to update the DB;
 SJ }
 SJ else
 SJ {
 SJ echo $result  Successfully updated the details;
 SJ }
 SJ }
 
 You will need to use the global vars and also escape quotes like this:
 
 function update_subscriber_account()
 {
  $new_email = addslashes($_POST['new_email']);
  .
  .
  .
 $query = update subscribers
 
 set email = '$new_email',
 .
 .
 
 -- 
 regards,
 Tom
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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


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



RE: [PHP] what are the planned features of php 5?[Scanned]

2003-02-26 Thread Michael Egan
Neko,

Out of curiosity I had a look at the php.net site and related sites and eventually 
came across this link:

http://www.zend.com/images/press/Feb_2003-4_Zeev_PHP5.pdf

I think this gives the details you're after.

Michael Egan

-Original Message-
From: neko [mailto:[EMAIL PROTECTED]
Sent: 26 February 2003 10:58
To: [EMAIL PROTECTED]
Subject: [PHP] what are the planned features of php 5?[Scanned]


I read something a while back about more OO features, but I was wondering if
there is a roadmap anywhere?

cheers,
neko



-- 
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] Live chat screen[Scanned]

2003-02-24 Thread Michael Egan
Sami,

You could put the 'chat screen' within a frame and set the page with a refresh value 
within the meta tags so that it reloads every few seconds, i.e.

meta http-equiv=refresh content=5;URL=filename.php

Hope this helps,

Michael Egan


-Original Message-
From: Sami Kyösti [mailto:[EMAIL PROTECTED]
Sent: 24 February 2003 13:35
To: [EMAIL PROTECTED]
Subject: [PHP] Live chat screen[Scanned]


Hi!

Is it possible to create a chat screen that updates screen in some kind 
of loop from the database?

So if someone sends a message to database it immediately shows on chat 
screen?

Kind regards,
Sami


-- 
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] undefined variable notice - how to furn of[Scanned]

2003-01-09 Thread Michael Egan
Borut,

I had this problem myself just before Christmas.

The following solution was proposed:

 All of the PHP scripts hosted on a Linux server 
 I'm working with have suddenly begun producing 
 an error message:

  undefined variable 'variablename'

 Looks like someone's tweaked the error reporting level so it's on E_ALL,
 which can be a somewhat alarmist setting :-)

 Read all about it at http://php.net/manual/en/ref.errorfunc.php

Michael Egan



-Original Message-
From: Borut Kovacec [mailto:[EMAIL PROTECTED]]
Sent: 09 January 2003 15:57
To: PHP Mailing List
Subject: [PHP] undefined variable notice - how to furn of[Scanned]


Hi

I just installed new php 4.2.3 on Win XP, Apache 1.3.24..
Everything works fine, just now I'm getting Notice messages for every undefined 
variable or undefined index in arrays..

So now I have to use issset() everytime to avoid this messages... 

..is there any way to turn this messages off, because if prior versions I never got 
them..??

Borut

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




[PHP] XHTML Validator Problem

2003-01-07 Thread Michael Egan
I've finally got round to making some attempt to validating the pages of a site I've 
done with PHP using the W3C XHTML Validator.  However, it's throwing out errors 
wherever I use session control on pages.

The server generates PHP Session ID variables which are added to links to other pages 
but my understanding is that these are rejected on the basis that the '' and '=' 
characters are invalid (I might be wrong here).

Examples of the error messages generated by the validator are given below:

Line 154, column 102: cannot generate system identifier for general entity PHPSESSID 
  ...u' href='competitions.php?option=addPHPSESSID=888a059dbc17855c09885c3ea978df
  ^
Line 154, column 102: general entity PHPSESSID not defined and no default entity 
(explain... http://validator.w3.org/docs/errors.html). 
  ...u' href='competitions.php?option=addPHPSESSID=888a059dbc17855c09885c3ea978df
  ^

These are the only error messages left - having dealt with the dozens of others left 
in through my own sloppy coding :-(

I'm not sure how to tackle this given that these elements of the page are generated 
automatically.

Is there a way round this or are there any sources of information relating to this 
area?

Thanks in advance,

Michael Egan

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




RE: Re[2]: [PHP] XHTML Validator Problem[Scanned]

2003-01-07 Thread Michael Egan
Tom,

Thanks again. This gives me full control over things which always seems the best 
solution.

Michael 

 You can put this at the top of your scripts:

 ini_set('arg_separator.output','amp;');



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




RE: [PHP] Development tools[Scanned]

2003-01-07 Thread Michael Egan
Didier,

I'm afraid you really are asking for some harsh responses.

Your last comment in particular invites some rather obvious, albeit rude, acronyms.

 I just started on both of them and wanting to learn how to use them, 
 but I know the tools could speed up the process, especially I am a learn  by doing 
type of guy.

Perhaps a search on Google for Java or C++ might help you out.

Michael Egan

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




RE: [PHP] Development tools[Scanned]

2003-01-07 Thread Michael Egan
Didier,

I meant to say Java and C++ IDEs.

Regards,

Michael Egan

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




RE: [PHP] Development tools[Scanned]

2003-01-07 Thread Michael Egan
Didier,

It's not that people object to stupid questions being posed - or, indeed poor use of 
English. Some of the best responses to queries I've seen are from people for whom 
English is not their first language.

What people do object to is questions being posed to the incorrect lists - I'm sure 
there are plenty of forums and mailing lists dedicated to both the areas you are keen 
to investigate. These will undoubtedly be the better sources of information.

By keeping the lists dedicated to specific areas, even where these can interact, the 
lists are kept to more manageable proportions.

Good luck with your explorations.

Michael Egan

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




RE: [PHP] XHTML Validator Problem[Scanned]

2003-01-07 Thread Michael Egan
Tom,

Thanks for that.

I don't have access to the server on which the site is being run but I'll suggest the 
change to the hosting company.

Michael Egan

-Original Message-
From: Tom Rogers [mailto:[EMAIL PROTECTED]]
Sent: 07 January 2003 10:57
To: Michael Egan
Cc: PHP General (E-mail)
Subject: Re: [PHP] XHTML Validator Problem[Scanned]


Hi,

Tuesday, January 7, 2003, 6:58:08 PM, you wrote:
ME I've finally got round to making some attempt to validating the pages of a site 
I've done with PHP using the W3C XHTML Validator.  However, it's throwing out errors 
wherever I use session control
ME on pages.

ME The server generates PHP Session ID variables which are added to links to other 
pages but my understanding is that these are rejected on the basis that the '' and 
'=' characters are invalid (I
ME might be wrong here).

ME Examples of the error messages generated by the validator are given below:

ME Line 154, column 102: cannot generate system identifier for general entity 
PHPSESSID 
ME   ...u' href='competitions.php?option=addPHPSESSID=888a059dbc17855c09885c3ea978df
ME   ^
ME Line 154, column 102: general entity PHPSESSID not defined and no default entity 
(explain... http://validator.w3.org/docs/errors.html). 
ME   ...u' href='competitions.php?option=addPHPSESSID=888a059dbc17855c09885c3ea978df
ME   ^

ME These are the only error messages left - having dealt with the dozens of others 
left in through my own sloppy coding :-(

ME I'm not sure how to tackle this given that these elements of the page are 
generated automatically.

ME Is there a way round this or are there any sources of information relating to this 
area?

ME Thanks in advance,

ME Michael Egan

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


In your php.ini set arg_separator.output to amp;
That should fix it.

-- 
regards,
Tom


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




RE: [PHP] date part[Scanned]

2002-12-19 Thread Michael Egan
You could use the explode function to break the string down into its different 
elements with '/' as the delimiter.

Problem is if you're allowing users to input the date into a text box you can't be 
sure how they'll enter the data.  The better option is probably to constrain what they 
can enter with drop down boxes for year, month and day.

Michael Egan

-Original Message-
From: Diana Castillo [mailto:[EMAIL PROTECTED]]
Sent: 19 December 2002 14:05
To: [EMAIL PROTECTED]
Subject: [PHP] date part[Scanned]


How can I get a string containing the month part of a date the user types
in?
e.g. if they type in 06/07/200 I want to get 06

thanks,
diana



-- 
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] Undefined variable error message

2002-12-18 Thread Michael Egan
All of the PHP scripts hosted on a Linux server I'm working with have suddenly begun 
producing an error message:

undefined variable 'variablename'

This occurs wherever a variable name is referred to.  I'm concerned about this for two 
reasons:

1   Will I have to go through each script making substantial alterations?

2   Has the configuration of PHP been altered in some way without my knowledge?

The latter would suggest fairly significant security issues.  Does anybody have any 
ideas as to how this might have occurred and the quickest way of resolving it?  Or of 
links to possible solutions?

This is particularly irritating as last night was the office Christmas party and I'm 
in a rather fragile state this morning :-(

Michael Egan

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




RE: [PHP] Undefined variable error message[Scanned]

2002-12-18 Thread Michael Egan
Jon,

Many thanks - the actual problem is now solved.

As to how it occurred I think must be attributable to me at some stage in terms of 
fiddling around with the php.ini file.  Perhaps I've had too many nights like last 
night and the brain cells are depleting past a critical point!

Thanks to everybody else who responded to this query.

Michael Egan

-Original Message-
From: Jon Haworth [mailto:[EMAIL PROTECTED]]
Sent: 18 December 2002 10:39
To: Michael Egan; PHP General (E-mail)
Subject: RE: [PHP] Undefined variable error message[Scanned]


Hi Michael,

 All of the PHP scripts hosted on a Linux server 
 I'm working with have suddenly begun producing 
 an error message:

   undefined variable 'variablename'

Looks like someone's tweaked the error reporting level so it's on E_ALL,
which can be a somewhat alarmist setting :-)

Read all about it at http://php.net/manual/en/ref.errorfunc.php

 The latter would suggest fairly significant 
 security issues.  Does anybody have any ideas 
 as to how this might have occurred 

Are you on a shared host, or is there someone else who admins your box? If
so, have a word with them and see if they've been fiddling with php.ini -
that's where the error reporting level is set.

Cheers
Jon

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




RE: [PHP] Get[Scanned]

2002-11-18 Thread Michael Egan
href='test.html?var1=1var2=2'

Michael Egan

-Original Message-
From: Shaun [mailto:[EMAIL PROTECTED]]
Sent: 18 November 2002 12:06
To: [EMAIL PROTECTED]
Subject: [PHP] Get[Scanned]


Hi,

I pass arguments in the url, how do i pass multiple args?

eg. href=test.php?num=1  (only one arg)

Do i use commas , please show me !

Thanks ,
Shaun



-- 
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] what wrong in this code ?[Scanned]

2002-11-13 Thread Michael Egan
I think it's to do with the scope of the variable.

It will work if you declare the variable as global within the make_login function.

Michael Egan

-Original Message-
From: Alawi albaity [mailto:alawi;php4web.com]
Sent: 13 November 2002 08:13
To: PHPList
Subject: [PHP] what wrong in this code ?[Scanned]


why the varible value(123) is not printed?

?

function is_login(){
session_start();
  if (session_is_registered(test) ){
return true;
  }//end if
  else{
return false;
  }//end else
}// end is_login() function


function make_login(){
session_start();
session_register('test');
$test = 123;
}

function Logout(){
session_destroy();
}

if (is_login()){

Global $test;
session_start();
echo $test;
logout();
}else{
make_login();
?
a href=test.phptryagain/a
?
}
?

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




RE: [PHP] newbie: help with date arithmetic[Scanned]

2002-11-12 Thread Michael Egan
Robert,

I've been looking at this myself over the past couple of days.

I gather the best approach is to convert your dates into UNIX timestamps. 

For example:

$first_unix_time = mktime($hour1, $minutes1, $seconds1, $month1, $day1, $year1);

$second_unix_time = mktime($hour2, $minutes2, $seconds2, $month2, $day2, $year2);

Subtract the one from the other to give the difference:

$difference = $first_unix_time - $second_unix_time;

The result will be in seconds so you'll need to convert this depending on the format 
you require. 

For example, to convert the difference to years you might do:

$years = floor($difference / (365 * 24 * 60 * 60));

Hope this helps,

Michael Egan

-Original Message-
From: ROBERT MCPEAK [mailto:RMCPEAK;jhuccp.org]
Sent: 12 November 2002 15:31
To: [EMAIL PROTECTED]
Subject: [PHP] newbie: help with date arithmetic[Scanned]


I'm trying to add/subract two dates.  I think I need to use mktime() but I can't quite 
figure out how.

I'd like to do something like this:

(2002-11-15)-(2002-11-10)=5

or

(2002-12-10)-(2002-11-10)=20

Obviously taking into account number of days in a given month.


Does somebody have some code handy that does this?  Any help would be greatly 
appreciated!

Thanks.


-- 
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] Function to remember costs.[Scanned]

2002-10-11 Thread Michael Egan

Steve,

I've only had a quick glance at this but from the code you've posted you don't seem to 
be associating a variable with the hidden field you're referring to in the 
display_form function.

You need to store the amount in a variable and then refer to the variable in the value 
attribute of the hidden field.

Michael Egan

-Original Message-
From: Steve Jackson [mailto:[EMAIL PROTECTED]]
Sent: 11 October 2002 11:47
To: PHP General
Subject: [PHP] Function to remember costs.[Scanned]


I am having difficulty passing details to a form. 
I need to somehow pass a variable cost to a form. 
The cost is made up of items in a cart (details taken from a Mysql DB)
and a shipping cost. I then have a function written to display the
credit card form (which needs to be passed to a secure server below the
final cost  (ie cost plus shipping). I have tried without success most
of this morning to pass the final cost plus shipping to the form hidden
field (which is on the same html page!) Here is the section of code I am
having problems with. I will supply the rest of the functions to anyone
who thinks they can help but it's a lot of code.
 
 
 
?
}
 
function display_shipping($shipping)
{
  // display table row with shipping cost and total price including
shipping
  global $total_price;
?
  table border = 0 width = 760 cellspacing = 0
  trtd align = leftShipping/td
  td align = right ?=number_format($shipping, 2); ?/td/tr
  trth bgcolor=#146190 align = leftTOTAL INCLUDING SHIPPING/th
  th bgcolor=#146190 align = rightˆ
?=number_format($shipping+$total_price, 2); ?/th
  /tr
  /tablebr
?
}
 
function display_card_form($name)
{
  //display form asking for credit card details
?
  table border = 0 width = 760 cellspacing = 0
 
  form action ='https://spos.luottokunta.fi/pm/servlet/Payment'
method='post'
  input type='hidden' name='version' value='1.2'
  input type='hidden' name='merchant_rn' value='8058950'
  input type='hidden' name='order_rn' value='10001'
  input type='hidden' name='amount' value=''
  input type='hidden' name='amount_exp' value='-2'
  input type='hidden' name='currency' value='978'
  input type='hidden' name='order_description' value='Viola test
product'
  input type='hidden' name='success_url'
value='http://www.violasystems.com'
  input type='hidden' name='failure_url'
value='http://www.violasystems.com/bazaar'
  input type='hidden' name='cancel_url'
value='http://www.violasystems.com/privacy.php'
  input type='hidden' name='trans_method' value='0'
  input type='hidden' name='mac' value='F529BC531D'
  trth colspan = 2 bgcolor=#ccCredit Card Details/th/tr
  tr
tdType/td
tdselect name =
card_typeoptionVISAoptionMasterCard/select/td
  /tr
  tr
tdNumber/td
tdinput type = text name = card_number value =  maxlength = 16
size = 40/td
  /tr
  tr
tdAMEX code (if required)/td
tdinput type = text name = amex_code value =  maxlength = 4
size = 4/td
  /tr
  tr
tdExpiry Date/td
tdMonth select name =
card_monthoption01option02option03option04option05option06
option07option08option09option10option11option12/select
Year select name =
card_yearoption00option01option02option03option04option05o
ption06option07option08option09option10/select/td
  /tr
  tr
tdName on Card/td
tdinput type = text name = card_name value = ?=$name; ?
maxlength = 40 size = 40/td
  /tr
  tr
td colspan = 2 align = center
  bIf you press purchase your credit card details will be
transmitted via a secure
   server, your details processed and then you will be redirected to our
site./b
 ? display_form_button(purchase, Purchase These Items); ?
/td
  /tr
  /table
  
 
?
 
As you can see the PHP code is just a  part of one larger page of
functions.
What I am trying to do is pass the
?=number_format($shipping+$total_price, 2); ? to the amount hidden
field in the form.
Any ideas?
This is not all my code which is why I am having problems.

Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com http://www.violasystems.com/ 
[EMAIL PROTECTED]
Mobile +358 50 343 5159



 

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




RE: [PHP] Looking for a forum

2002-09-26 Thread Michael Egan

There are a huge number of forums at php.resourceindex.com

These range from fairly basic forums such as venomboard to more complex forums such as 
phpbb

Michael Egan



-Original Message-
From: John Taylor-Johnston [mailto:[EMAIL PROTECTED]]
Sent: 26 September 2002 06:26
To: [EMAIL PROTECTED]
Subject: [PHP] Looking for a forum


Hi,
I'm looking for some forum script, a bit like this:
http://www.chevelles.com/cgi-bin/forum/Ultimate.cgi
Can anyone post a link to something useful?
John


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

2002-09-26 Thread Michael Egan

This probably breaks the rules of the forum in that it's not really a PHP question but 
I thought it might cause some amusement.

I heard a discussion on the radio last night which mentioned the new 'sport' of 
extreme ironing! Sure enough they've got a web site at www.extremeironing.com 

It's not a bad looking web site and, needless to say, is done with PHP :-)

Michael Egan

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




RE: [PHP] Wrap content with a layout file

2002-09-23 Thread Michael Egan

I generally do the same - have a header and footer file which create a three column 
table. The content then fits into the central column.

Other ways of doing this might be to use frames (though many disapprove of frames) or 
to use the iframe tag - the latter is something I only recently became aware of but 
can be quite useful and is not as messy as frames.

Michael Egan

-Original Message-
From: Patrick Lebon [mailto:[EMAIL PROTECTED]]
Sent: 23 September 2002 06:47
To: [EMAIL PROTECTED]
Subject: [PHP] Wrap content with a layout file


Is there a way to create a layout file that can wrap around other pages with
data in them. I am currently using two includes (one at the start of the
page and one at the end) but was wondering if there is a better way to do
this.
Thanks



-- 
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] jpeg thumbnail errors

2002-09-17 Thread Michael Egan


Warwick,

There are different ways of compiling PHP which will determine which elements it can 
support.

The first error you report shows that the particular build of PHP being used hasn't 
been compiled to create images from JPEGS. The remaining errors flow on from this as 
no image has been supplied to them.

You would need to recompile PHP so that such support is offered - no mean feat from my 
own experiences. I gave up :-(

Michael Egan


-Original Message-
From: Warwick Berg [mailto:[EMAIL PROTECTED]]
Sent: 17 September 2002 00:08
To: [EMAIL PROTECTED]
Subject: [PHP] jpeg thumbnail errors


Hi all

I know very little about PHP and am enquiring for a mate who's got some
problems. Could some kind soul tell me what the errors below might mean?
He's using PHP 4.1.2. I can supply the scripts that cause the error if that
will help? He says they occur when a jpeg is being uploaded and created into
a thumbnail.

Thanks in advance.

Thanks
Warwick




When a jpeg is being uploaded and created into a thumbnail:

Warning: ImageCreateFromJpeg: No JPEG support in this PHP build in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
167

Warning: Supplied argument is not a valid Image resource in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
168

Warning: Supplied argument is not a valid Image resource in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
169

Warning: Supplied argument is not a valid Image resource in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
171

Warning: ImageJpeg: No JPG support in this PHP build in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
172

Warning: ImageCreateFromJpeg: No JPEG support in this PHP build in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
167

Warning: Supplied argument is not a valid Image resource in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
168

Warning: Supplied argument is not a valid Image resource in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
169

Warning: Supplied argument is not a valid Image resource in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
171

Warning: ImageJpeg: No JPG support in this PHP build in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
172

Warning: Cannot add header information - headers already sent by (output
started at
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php:167) in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/account.php on line
91




-- 
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] jpeg thumbnail errors

2002-09-17 Thread Michael Egan

Tony,

When I first began dabbling with PHP a year or more ago I did try to reconfigure PHP 
to gain support for PDF files. I was using SUSE 7.0 at the time. 

I was determined to get to grips with configuring packages such as PHP, Apache and 
MySQL but I seemed to run into one problem after another.

I'm determined to have another go at this. With this in mind I've set one computer up 
with an older Linux distribution and intend to have a go at LFS over the next few 
weeks. Hopefully I will eventually overcome my fears of configuring software on a 
Linux system.

Thanks for the help.

Michael Egan

-Original Message-
From: Tony Earnshaw [mailto:[EMAIL PROTECTED]]
Sent: 17 September 2002 11:44
To: Michael Egan
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] jpeg thumbnail errors


tir, 2002-09-17 kl. 09:53 skrev Michael Egan:

 You would need to recompile PHP so that such support is
 offered - no mean feat from my own experiences. I gave up :-(

What's your exact problem, Michael?

I'm so new to PHP4 (done nothing at all with PHP for the last 3-4 years,
now I need to), that I'm reading, practicing reading etc. I don't even
have any questions, yet, I'm so green.

But I *do* know that I have compiled in jpg and png support to PHP 4.2.3
(phpinfo).

On Red Hat 7.2 +++, './configure --with-gd' - and other things, of
course.

Best,

Tony

-- 

Tony Earnshaw

Tha can allway tell a Yorkshireman, but tha canna tell 'im much.

e-post: [EMAIL PROTECTED]
www:http://www.billy.demon.nl
gpg public key: http://www.billy.demon.nl/tonni.armor

Telefoon:   (+31) (0)172 530428
Mobiel: (+31) (0)6 51153356

GPG Fingerprint = 3924 6BF8 A755 DE1A 4AD6 FA2B F7D7 6051 3BE7 B981
3BE7B981



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




RE: [PHP] Low Cost PHP Hosting

2002-09-06 Thread Michael Egan

Philip,

I've found UK Linux (http://www.uklinux.net) to offer a good service at low cost.  
They also offer 50% discount for charities.

Michael Egan

-Original Message-
From: Philip Radford [mailto:[EMAIL PROTECTED]]
Sent: 06 September 2002 05:47
To: [EMAIL PROTECTED]
Subject: [PHP] Low Cost PHP Hosting


Hi All,

I have recently subscribed to the list and would like to thank everyone for their 
support and guidance in the use of the PHP scripting language. I am trying to find a 
low cost host for testing out PHP web applications on the Internet. I have a similar 
account set up with Brinkster for ASP and ASP.NET code but would like a similar 
environment for PHP. Any ideas? Thanks.

Regards
Phil.



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

2002-08-21 Thread Michael Egan

Steve,

I think it's fairly standard that hosts provide you with a single database.

A suggestion made with earlier thread, which I follow, is simply to make sure you set 
up your tables with names that clearly identify their function to you.

Michael Egan

-Original Message-
From: Steve Jackson [mailto:[EMAIL PROTECTED]]
Sent: 20 August 2002 23:35
To: MySQL General Mailing list; PHP General
Subject: [PHP] phpMyAdmin


Is it possible to use phpMyAdmin to add new databases (not tables whole
databases) to my website? I ask because currently my host has provided
me with one database and I don't want to mix database tables when adding
new features (such as shopping carts and bulletin boards)? I am new to
MySQL and PHP so would like some advice, is the way I describe
(databases for each website function) a good way to design or should I
have all my functions in one large database?

Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com
[EMAIL PROTECTED]
Mobile +358 50 343 5159




-- 
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] Sorting a multi-dimensional array

2002-08-21 Thread Michael Egan

Ben,

I don't know whether this is the most efficient way of doing things but when I've 
tried in the past to sort multidimensional arrays according to a number of values I've 
ended up giving up on the PHP functions and creating a temporary table in MySQL.  

You can then retrieve the information sorted by various fields defined in your query 
to the database.

Others may well advise that this is not the best way of doing this but it's worked for 
me and has saved me beating myself up over not being able to get to grips with some 
complex functions!

Michael Egan


-Original Message-
From: Ben [mailto:[EMAIL PROTECTED]]
Sent: 20 August 2002 18:25
To: [EMAIL PROTECTED]
Subject: [PHP] Sorting a multi-dimensional array


I have looked at array_multisort, asort, etc. NONE of them do what I need.

My array looks like this:

$array[0][0] = First Id;
$array[0][1] = First Name;
$array[0][2] = First Rating;

$array[1][0] = Second Id;
$array[1][1] = Second Name;
$array[1][2] = Second Rating;

$array[2][0] = Third Id;
$array[2][1] = Third Name;
$array[2][2] = Third Rating;


Now, I want to sort the array (very very fast if possible cuz the array is
huge...150 such values) based on the Rating for each candidate, which is
the third column inside this matrix array. How should I ask PHP to do this?
Also, when I do sort by the Rating I want the ID and the name to remain the
same for each candidate, i.e., I want the indexes to be maintained.

HELP!

Thanks in advance
Ben



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

2002-08-21 Thread Michael Egan

I know similar threads have come up on this in the past but I suspect it's a 
constantly changing picture.

I recently saw a favourable review of Zend Studio 2.5 but wondered, out of curiosity, 
what sort of tools people use to develop PHP scripts and MySQL databases, tables and 
queries.

Up until now, in an attempt to try and get to grips with these packages, I've been 
using a variety of text editors from VI to Kwrite.  But I'm wondering whether it might 
speed up development times if I start to use one of the tools out there for working 
with PHP and MySQL.

Any thoughts?

Michael Egan

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




Re: [PHP] Error messages

2002-05-07 Thread Michael Egan

Ferry,

I think this is a fairly standard error message suggesting that the
password information being passed to the underlying database is
incorrect.

It would be the settings to connect to the database that need to be
altered in this case.

Michael Egan

 Warning: Access denied for user: 'icon@localhost' (Using password: YES) in
 /home/sites/www.icondolement.nl/web/com/icon2/include/mysql.inc.php on line
 8
 Connection Error

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




Re: [PHP] good php hosting environments

2002-04-26 Thread Michael Egan

Hamish,

I've been using UK Linux (www.uklinux.net) both at home and at work and
they really have been excellent.

From their various types of membership I think you would be able to find
a level of service that you want within the price range you suggest.

Best of luck,

Michael

hamish wrote:
 
 Hello,
 I'm looking for a really good, professional hosting environment in the uk
 that supports php (not in safe mode)), mysql and offers the use of a secure
 server and mail server. I'm looking for a client of mine who needs to rely
 on their site being up, and so needs a hoster who has enough redundancy in
 all systems. We have a budget of between £200 and £400 a year, but don't
 want to get stuck with bandwidth charges, database usage, etc etc..
 It would be good if the hoster also offered a remote control panel as well
 as ftp access to the server.
 Does any one have any suggested companies, or companies that they've had
 good experiences using?
 
 cheers
 Hamish
 
 --
 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] new to php/mysql - insert not working

2002-03-20 Thread Michael Egan

Robert,

I still feel fairly new to this myself but if I find that I'm having
problems writing to the database I generally try to echo the query to
the page and then test this out directly with the command line prompt
directly to the database.

At least that way you can test out the query in isolation.

Good luck,

Michael

 The following code gets me document contains no data.  I have done a
 successfull select from mysql db, but not an insertion.
 
 I don't know how to troubleshoot this.  Any help is much appreciated.
 Thanks!
 
 ?php
 
 $id = addslashes($id);
 $visitdate = addslashes($visitdate);
 $img_group = addslashes($img_group);
 $img_url = addslashes($img_url);
 $display = addslashes($display);
 
  $db = mysql_connect(www, mmc, mmc-WWW);
 
   if (!$db)
   {
  echo Error: Could not connect to database.  Please try again
 later.;
  exit;
   }
 
   mysql_select_db(mmc);
   $query = insert into visitorgallery values
 ('.$id.', '.$img_url.', '.$visitdate.',
 '.$img_group.', '.$display.', );
 
 
   $result = mysql_query($query);
   if ($result)
 echo mysql_affected_rows(). Image inserted! ;
 
 ?
 
 --
 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] Sessions / MySQL

2002-03-11 Thread Michael Egan

Chris,

There's a fairly comprehensive example of this included within
'Beginning PHP4' (ISBN 1861003730) - I think in Chapter 13.

You can download the code examples for this book from
http://p2p.wrox.com/php/ without actually buying the book - though I've
found this book and the more recent 'Professional PHP4' to be
invaluable.

Hope this helps,

Michael Egan

Chris Kay wrote:
 
 I am wanting to store session data in a mysql db..
 I have looked at a few examples and still cant get them to work
 
 Rather than asking for the answer, I perfer to try a few more time.
 
 Anyone have any links to tutorials that may help or examples that may
 help me out?
 
 Thanks in advance...
 
 ---
 Chris Kay, Eleet Internet Services
 [EMAIL PROTECTED]
 ---
 
 --
 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] cool PHP sites

2002-02-27 Thread Michael Egan

Chris,

This might be a bit late but a couple of graphioc designers I work with
use a forum on Flash at http://www.were-here.com. The forums themselves,
judging from the filenames, are done with PHP and are quite attractive
in terms of presentation and are clearly well used.

Hope this is of use,

Michael Egan

Chris Lott wrote:
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 It strikes me that my students really don't have a good grasp of what PHP
 is capable of doing, since they are getting bogged down in learning the
 minutiae of the language itself. So (quickly if possible-- I'd like to demo
 some sites tonight) what are some examples of cool and publically
 accessible sites that use PHP? I'm looking for sites that demonstrate what
 PHP can do, examples of big name sites using PHP, etc.
 
 I can explain how the back end technology is working if I have some good
 sites to use as a framework. I'd like to keep them excited about the
 potential, you know?
 
 c
 
 -BEGIN PGP SIGNATURE-
 Version: 6.5.8ckt - KeyID: 0x51046CFD - http://www.chrislott.org/geek/pgp/
 
 iQA/AwUBPHvc/daLYehRBGz9EQI9KwCgu7SKkrKqmcQ7zf+lAZBwKgvAlWcAmwQ7
 xCs+oCAo6Hn5UkHuDmR4ZzlT
 =koDz
 -END PGP SIGNATURE-
 
 --
 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] Dynamically created dropdowns

2001-12-05 Thread Michael Egan

Michael,

Many thanks for your help.

I've opted for the 'straight PHP' route and, in the process, saved
myself a lot of time pointlessly trying to see if JavaScript could read
from the database.

Michael Egan


Michael Hall wrote:
 
 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.
 
 Michael


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




[PHP] Dynamically created dropdowns

2001-12-04 Thread Michael Egan

Hope this isn't an inappropriate message to send to this list. I suspect
the response will largely concern JavaScript.

Is there a way of altering the contents of one drop down menu according
to the item selected in another? 

I'm creating a page allowing users to identify the make and model of
computers received by our charity for refurbishment. Ideally I'd like to
allow them to select a manufacturer from a drop down menu and for a
separate drop down menu to then be populated by the models produced by
that manufacturer. 

I have two separate tables in a MySQL database, one for manufacturers
and one for models with the latter containing a field for the
manufacturer ID.

Is this possible?

Michael Egan

-- 
PHP General Mailing List (http://www.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] Comparing strings

2001-11-01 Thread Michael Egan

I feel fairly new to this as well but I think that, whilst your logic is
right, the syntax may be a little off.

if ($action == textstring)
{
 echo true;
}
else
{
 echo false;
}

Above should show how the syntax will rok.

Good luck

Michael

phantom wrote:
 
 Bear with me, new to PHP and got a beginner's questions
 
 How do I run an if statement and the if statement compares a String?
 
 IN ASP (yes I Know, ASP is evil) I would have wrote
 
 if (String(Request(Action))==Submit)
   do this
 
 In PHP I have tried
 
 if ($Action == Submit)  but I get a parse error in that statement.
 What am I doing wrong?  Thank you.  I did an echo $Action to confirm
 that it's value is Submit.
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

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




[PHP] Assign multiple variables from mysql_fetch_row() call

2001-09-04 Thread Egan

In perl I can say something like:

   ($var1, $var2) = $sqh-fetchrow_array()


to assign column values to more than one variable at a time.  So I
tried similar syntax with PHP:


($var1, $var2) = mysql_fetch_row($sqh);


but could not seem to work it out.

I know you can do this with a temporary array, and then take values
out of the array.  But it would be nice to omit the temporary array.

Is it possible?


Egan




-- 
PHP General Mailing List (http://www.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] Assign multiple variables from mysql_fetch_row() call

2001-09-04 Thread Egan

On Tue, 4 Sep 2001 14:29:42 -0700 (PDT), Rasmus Lerdorf
[EMAIL PROTECTED] wrote:

 In perl I can say something like:

($var1, $var2) = $sqh-fetchrow_array()

($var1, $var2) is magic.  I hate magic.  What do you look up in the Perl
manual when you hit syntax like that?  In PHP the equivalent syntax is:

list($var1, $var2) = ...

It does exactly the same thing, and it is legible.


Sorry, I didn't mean to start a flame war.

I only wanted to know if there was a simple way of doing it, without
using a temporary array.  The only reason I mentioned perl is because
I did not know any other way to frame the question.

Your suggestion looks like just what I need, thanks!


Egan



-- 
PHP General Mailing List (http://www.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] The future of PHP

2001-08-30 Thread Egan

On Thu, 30 Aug 2001 02:52:33 -0500, Richard Lynch [EMAIL PROTECTED]
wrote:

Which dot-bomb had a business plan, with a revenue model, which did *NOT*
involve going into heavy debt and blowing huge piles of VC money for several
years in a market-share grab on the Internet, where the barrier to change
brands is one (1) click

Internet market share is an illusion when you can change brands with a
few clicks.  The only way to keep Internet customers is to provide
good service and products at competitive prices, and continue doing so
year after year.

It's virtually impossible for big corporations to compete on that
playing field, because their overhead costs are too high.  The only
way they can sell at a competitive price is to lose money on every
sale, a dead-end tactic that only works until you burn through all
your investors' cash.

Businesses need profit to survive.  So why would any business be
willing to lose money on a sale?  To gain Internet market share which
is an illusion in the first place?  Obviously, that's a fundamental
mistake made by many large corporations trying to grab Internet market
share.

Small businesses, like CDBaby, are the future of this market.


Egan




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




[PHP] virtual() call to CGI script

2001-08-28 Thread Egan

I use the PHP virtual() function to call a CGI script, and that works
fine.  But I need to prevent the CGI from being executed directly, in
case someone tries to access its URL.

Since HTTP_REFERER is unreliable, I was wondering how others have
solved this problem ...


Egan




-- 
PHP General Mailing List (http://www.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] virtual() call to CGI script

2001-08-28 Thread Egan

On Tue, 28 Aug 2001 16:38:14 +1000, Jason Brooke [EMAIL PROTECTED] wrote:

 I use the PHP virtual() function to call a CGI script, and that works
 fine.  But I need to prevent the CGI from being executed directly, in
 case someone tries to access its URL.

 Since HTTP_REFERER is unreliable, I was wondering how others have
 solved this problem ...

move it out of the document tree if you don't want it executed via http, and
use system or exec or something instead of virtual

Thanks for the idea, but ...

That would cause the script to be executed with permissions of the web
server, and for security, that is generally prohibited by the ISP (we
are the ISP).  The only exception to that rule is public scripts which
reside in:

  safe_mode_exec_dir = /host/runphp

and are thus allowed to execute with permissions of the web server.

To provide for the execution of private user CGIs, each user has their
own /cgi directory.  Apache is configured to recognize /cgi in any URL
as an executable CGI, and wraps all user CGIs with SuEXEC, to run them
with permissions of the user, not the web server.

But of course that means user scripts are accessible via URL.  So the
question remains, how to limit their access.

As the ISP, we could use any feature of the web server for our own
CGIs, but we intentionally avoid that.  We have a hosting environment
with a rich set of customer accessible tools, and we demonstrate that
fact by using only those tools ourselves.  IOW, we use what we sell.

I have some techniques for limiting access to user CGIs, but I still
wonder how others have approached this problem ...


Egan




-- 
PHP General Mailing List (http://www.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] virtual() call to CGI script

2001-08-28 Thread Egan

On Tue, 28 Aug 2001 23:38:30 +1000, Jason Brooke [EMAIL PROTECTED] wrote:

if you're using apache, something along the lines of the following untested
directives should prevent anyone but the localhost (which is where your
virtual() calls should be coming from) from accessing the cgi's via http

Directory /path/to/usr/cgi
order deny, allow
deny from all
allow from localhost
/Directory


We don't define any virtual hosts in httpd.conf; instead, we use a
custom handler hooked into post-read-request.  So I won't be able to
define /path/to/usr/cgi in httpd.conf.

But if that concept will work in user .htaccess files, it would be an
improvement over my current techniques.  I'll give it a try ...

Thanks for the idea!


Egan




-- 
PHP General Mailing List (http://www.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] virtual() call to CGI script

2001-08-28 Thread Egan

On Wed, 29 Aug 2001 00:16:10 +1000, Jason Brooke [EMAIL PROTECTED] wrote:

It will work in .htaccess if you enable it, or you might even be able to use
something like:
DirectoryMatch ^/path/to/.*/cgi

(untested again)


After testing this I see that:

Apache uses the IP address of the remote host to determine whether to
allow or deny access.

Even though PHP is running on localhost, and making a request via the
virtual() function, Apache still knows the IP address of the remote
host, and uses that.

So what happens is that denying localhost makes it impossible to run
the CGI at all, unless you are running lynx from a local shell.  Not
exactly what I had in mind.

Unless there is some way that Apache can be tricked into believing a
request originates from the IP address of localhost, it appears that
allow/deny directives will not solve the problem of preventing direct
access to user CGIs.

It sounded like a good idea, though!


Egan




-- 
PHP General Mailing List (http://www.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] virtual() call to CGI script

2001-08-28 Thread Egan

On Wed, 29 Aug 2001 02:14:10 +1000, Jason Brooke [EMAIL PROTECTED] wrote:

Another way you might be able to do it is find an environment variable that
is only present when the cgi's are executed by the virtual() call,

Could not find any ...


use the apache SetEnvIf directive combined with DirectoryMatch

But that gave me an idea for a solution with .htaccess control, and
after some testing, I was able to work it out:


My document root .htaccess file includes:

  SetEnvIf Request_URI the_cgi_caller\.php$ CGI_REFERER=local


And my /cgi subdirectory .htaccess file includes:

  Order Allow,Deny
  Allow from env=CGI_REFERER


The environment variable CGI_REFERER does not exist unless Apache is
processing a request for the_cgi_caller.php in document root, and
thus requesting any file in the /cgi subdirectory via its URL results
in a HTTP Error 403 - Forbidden.

And since PHP virtual() causes Apache to execute a sub-request, the
environment variable CGI_REFERER *does* exist while the CGI is being
called via virtual() from the_cgi_caller.php

It will be simple to add SetEnvIf lines to .htaccess in document root,
one for each .php file which needs to call a CGI with virtual().

This is the solution I was looking for.  Thanks for the ideas!


Egan



-- 
PHP General Mailing List (http://www.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] Maintaining a session without cookies

2001-08-24 Thread Egan

On Fri, 24 Aug 2001 17:33:51 +0100, Saurabh Kapoor
[EMAIL PROTECTED] wrote:

I would like to maintain a session without cookies, what would be the best
way of going about this?

You missed a related discussion by just a few days.  But here is a
summary of it ...

To initialize a session and force the browser to inject the PHPSESSID
string into the url of every page, including the first, use this code
in the very first page (and only the very first page!)


  ?
  $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];
  session_start();
  if (!session_is_registered('vsid')) {
  session_register('vsid');
  $HTTP_SESSION_VARS['vsid'] = session_id();
  $sidurl = Location: $PHP_SELF . '?' . SID;
  header($sidurl);
  exit();
  }
  
   remaining code on first page
  
  ?



And then use this code on all pages you link to:


  ?
  session_start();
  
   remaining code
  
  ?



This approach has another benefit too:

On all pages you link to after the first, you can test the value of
vsid to see if it matches the value of PHPSESSID.  That way, you can
determine whether the user reached the other pages by going through
the initial page.  If not, you can reject the request with a message
like improper request or something similar.


In your php.ini, use:

  variables_order = ECGPS

to make GET data override cookie data, and use:

  session.use_trans_sid = 1

to have PHP inject the PHPSESSID string into document links (PHP also
needs a compile flag set, for this .ini value to work).  And to turn
off cookies, use:

  session.use_cookies = 0


Or if you have permission for setting these values in an .htaccess
file, then in .htaccess you can use:

  php_value session.use_cookies 0
  php_value session.use_trans_sid 1
  php_value variables_order ECGPS



Hope that helps!


Egan



-- 
PHP General Mailing List (http://www.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] The future of PHP

2001-08-24 Thread Egan

On Fri, 24 Aug 2001 15:34:04 -0300, Manuel Lemos [EMAIL PROTECTED]
wrote:
 
 Many small businesses would like to do e-commerce, but can't afford
 expensive consultants, expensive hardware, and expensive software
 tools developed by huge corporations.

e-commerce? You mean B2C? Can small business live from that? I'm afraid
not! Maybe I am wrong. :-)


100 years ago you could easily do business without a telephone.  But
what percentage of businesses today operate without a telephone?

A web presence with web commerce will become a utility like the
telephone.  Having it will be more important than measuring artificial
distinctions between B2C vs. B2B.

 
 Look at all the large corporations bleeding money and cutting staff.
 Mega-corporations are in decline, and their era is ending.  Long live
 the small business!

What? Large business are being affected because the whole networking
business is in recession.


Large corporations don't know you or care about you as an individual
customer.  You're just an account number to them.  The only thing they
care about is the big sale to other big corporations.  But even
then, do they really care?  Not in my experience.

The networking recession is just one symptom of their disease.

Why would anyone want to do business that way?  If I can find a small
business that sells the service or product I need, that's who gets my
business first.

If people ask how large my company is, I tell them We're large enough
to handle your business, and small enough to care.


Egan



-- 
PHP General Mailing List (http://www.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] The future of PHP

2001-08-24 Thread Egan

On Fri, 24 Aug 2001 16:30:04 -0300, Manuel Lemos [EMAIL PROTECTED]
wrote:
 
Can small business live from e-commerce today?

What is the relevance of your question?  Do businesses live from
their telephone?  Whether they do or not, they need it in either case.


Do you really believe that? As far as I can recall, this recession
started when a mean judge convicted Microsoft for anti-trust
practices. That caused NASDAQ crash that scared people away from
investing in tech company stocks.


One mean judge all by himself, caused the NASDAQ crash, eh?

I am surely astounded to learn that!  Good day and goodbye!



Egan



-- 
PHP General Mailing List (http://www.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] The future of PHP

2001-08-24 Thread Egan

On Fri, 24 Aug 2001 14:40:47 -0500, Navid Yar [EMAIL PROTECTED]
wrote:

Until Linux gets better at certain things, I think I have no choice but
to stick with Windows for now (especially in the design area).

True enough, for now.

Steam locomotives were an impressive technology, deeply entrenched
with 100 years or more of history.  They did not disappear from
railroads overnight.  But when the railroads realized it was cheaper
to operate diesel locomotives, the end of the steam era was just a
matter of time.


Egan



-- 
PHP General Mailing List (http://www.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] The future of PHP

2001-08-24 Thread Egan

On Fri, 24 Aug 2001 20:54:33 +0100, Sean C. McCarthy
[EMAIL PROTECTED] wrote:

Also the effect that this downturn is going through all the chain, from
transportation to food and goods. And BTW most companies that caused
this were startups not really big companies. Much more information on
this can be found on the Wall Street Journal.

WSJ writers can believe whatever they like.

But I believe this:

Large corporations are like railroad steam locomotives whose era has
ended.  They may continue running for a while, but in time, many will
disappear like the steam locomotive did.


Egan



-- 
PHP General Mailing List (http://www.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] The future of PHP

2001-08-23 Thread Egan

On Thu, 23 Aug 2001 20:32:10 -0500, Christopher CM Allen
[EMAIL PROTECTED] wrote:

hmmm, I might live in a smaller world than you but I find tons of  small to
middle businesses that have no clue as to why or how things are done in
applications(primarily web). Sure they know the buzz words of Java etc but
when I come in and tell them I work with a certain tool set and that I can
get it done for less $ and time they really don't care if I have a hammer or
a mallet.

Many small businesses would like to do e-commerce, but can't afford
expensive consultants, expensive hardware, and expensive software
tools developed by huge corporations.

There is a vast market for web developers who use free software tools
like Linux/Apache/PHP, and offer their services to small businesses at
modest rates.

Look at all the large corporations bleeding money and cutting staff.
Mega-corporations are in decline, and their era is ending.  Long live
the small business!


Egan



-- 
PHP General Mailing List (http://www.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] Creditcard checksum and identification

2001-08-22 Thread Egan

On Thu, 23 Aug 2001 00:22:28 +0200, Peter Ostry [EMAIL PROTECTED] wrote:

Has anyone a PHP Script for the checksum of Creditcards?
And a Script which can identify card types based on their first numbers?
(VISA, AMEX, MASTER, DINERS, JBC, DISCOVERY)

There where a lot of JavaScript pages on the web some years ago, but I 
have lost my local copies and the pages are vanished...


TIA,
Peter

Here is what I use for Visa, MasterCard, AMEX, and Discover. Feel free
to improve it by adding other card types:


SCRIPT LANGUAGE=php
function test_mod10 ($mycard) {

$mylen = strlen($mycard);
$sumdigits = 0;

// Add doubled digits from odd/even positions in even/odd length
for ($tx = ($mylen % 2); $tx  $mylen; $tx += 2) {
$digit = substr($mycard, $tx, 1) * 2;
if ($digit  10) {
$sumdigits += $digit;
} else {
$sumdigits += $digit - 9;
}
}

// Add single digits from even/odd postions in even/odd length
for ($tx = 1 - ($mylen % 2); $tx  $mylen; $tx += 2) {
$digit = substr($mycard, $tx, 1);
$sumdigits += $digit;
}

// If divisible by 10, return true
return (($sumdigits % 10) == 0);
}


$cn = $HTTP_GET_VARS['cn'];

$tn = substr(ereg_replace([^0-9], , $cn) , 0, 25);

$vl = strlen($tn);
$v1 = substr($tn, 0, 1);
$v2 = substr($tn, 0, 2);
$v4 = substr($tn, 0, 4);

$ep_cn = '';

if ($ct == 'V') {
if (($vl != 13  $vl != 16) || $v1 != 4 || !(test_mod10($tn))) {
$ep_cn = $cn is not a Visa card.;
}

} elseif ($ct == 'M') {
if ($vl != 16 || $v1 != 5 || !(test_mod10($tn))) {
$ep_cn = $cn is not a MasterCard.;
}

} elseif ($ct == 'A') {
if ($vl != 15 || $v2 != 37 || !(test_mod10($tn))) {
$ep_cn = $cn is not an AMEX card.;
}

} elseif ($ct == 'D') {
if ($vl != 16 || !($v4 == 6100) || !(test_mod10($tn))) {
$ep_cn = $cn is not a Discover card.;
}
}
/SCRIPT


-- 
PHP General Mailing List (http://www.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] GET method and forms....

2001-08-22 Thread Egan

On Thu, 23 Aug 2001 03:23:16 +0100, Seb Frost [EMAIL PROTECTED]
wrote:

 how do I prevent getting submit=shop%21 in the url window?

 reason to use get, I want variables to become part of the url.

Using a frameset prevents the GET url from appearing in the browser
window, if that's all you want to achieve -- and you don't need lynx
compatibility.

Here's a dummy frameset that should get you started.  Just put it in a
file by itself, perhaps named myscript.html

Also notice the second frame uses myscript.php as its source:


HTMLHEADTITLE/TITLE/HEAD 
FRAMESET COLS=0,* BORDER=0 FRAMEBORDER=no
FRAME NAME=fm0 MARGINHEIGHT=0 MARGINWIDTH=0 SCROLLING=no
 NORESIZE=NORESIZE
FRAME NAME=fm1 MARGINHEIGHT=0 MARGINWIDTH=0 SCROLLING=yes
 SRC=myscript.php 
NOFRAMESBODY 
PThis document requires frames./P/BODY
/NOFRAMES
/FRAMESET/HTML



-- 
PHP General Mailing List (http://www.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] Advanced Form Processing HELP

2001-08-22 Thread Egan

On Thu, 23 Aug 2001 05:24:17 -0700, Arcadius  A.
[EMAIL PROTECTED] wrote:

:
How could i make the values filled in the  form  remain unchanged even after
the user click on  the browser Refresh/Reload button without submittingf
the form ?

Until they submit the form, PHP has nothing to act on.

For this problem, you need a client-side solution:  Javascript

  

Egan



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




  1   2   >