[PHP] Dropping Tables

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

Thanks
Steve


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


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



RE: [PHP] Dropping Tables

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


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


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

At 10:21 PM 12/29/2002 -0500, you wrote:
> Basically just do a a php script the sends the sql "show tables";
>
> Then do a strchr() to see if "a" is the first letter in the resuts and
if
> so do a delete table.
>
> Just yo play safe do a dump of your db first.


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

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

---John W. Holmes...

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



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


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




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


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




[PHP] sorting multi-dimensional array

2003-02-13 Thread Steve Buehler
PHP version 4.2.2
I sure hope that I can get somebody to help me figure this one out.  I have 
a multi-dimensional array that I need to sort.  Here is the code that I 
have so far:
function gettourndivs(){
GLOBAL $sea_id,$PHP_SELF;
	$result=get_mysql_query("SELECT * FROM `games` WHERE sea_id = '$sea_id' 
AND deleted != '1'
			GROUP BY div_id ORDER BY `type`");
	$i="0";
	while(($row=mysql_fetch_object($result))){
		$divname=getdivisionname($row->div_id);
		$array[$i][divid]=$row->div_id;
		$array[$i][divname]=$divname;
		$array[$i++][type]=$row->type;
	}
 	reset($array);
// I need it to sort the array on the divname field here before going to 
the output.
// and instead of it doing it by the $ii, it should ouput in the correct 
alphabetic order of the "divname" field.
	for($ii=0;$ii<$i;$ii++){
	echo "$ii," . $array[$ii][divid].",";
	echo $array[$ii][divname].",";
	echo $array[$ii][type] . "\n";
	}
}

Here is the output: and I need to sort it on the third field so that it 
would be in alphabetic order, but keeping the other items on that line when 
it moves to the correct position.
0,91,Mens Open ,0
1,20,U11 Boys ,0
2,65,U17-19 Boys ,0
3,30,U12 Boys Premiership ,0
4,69,U16-17 Girls ,0
5,34,U12 Girls Premiership ,0
6,29,U12 Boys ,1
7,78,U19 Girls ,1
8,100,Mens O-30 ,1
9,11,U10 Boys ,1
10,47,U14 Boys ,1
11,56,U15 Boys ,1
12,24,U11 Girls ,1
13,42,U13 Girls ,1
14,60,U15 Girls ,1
15,35,U12 Girls UEFA Cup ,1
16,53,U14 Girls UEFA Cup ,1
17,52,U14 Girls Premiership ,1
18,38,U13 Boys ,2
19,110,U16 Boys ,2

Is this possible?  I have looked at array_multisort and unless I am reading 
it wrong, it doesn't look like it would do what I needed.

Thank You
Steve



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



Re: [PHP] sorting multi-dimensional array

2003-02-19 Thread Steve Buehler
Ahhhfinally did it with usort.  Thanks to those who gave me that 
answer.  Now here is a question for that.  I would like to re-use my "cmp" 
function without having to rewrite it each time.  Can it be written so that 
instead of "divname" being hard coded, that I can pass the sort field in 
the usort call.  That way, I can either sort by "divname" and do another 
sort by "divid" for seperate results without having to have multiple "cmp" 
type functions.  I hope that made since.  Lack of sleep isn't good when 
programming.  Below is my sorting code.


function cmp ($a, $b) {
return strcmp($a["divname"], $b["divname"]);
}

usort($array, "cmp");

ThanksSteve



At 01:08 PM 2/13/2003 -0600, you wrote:
PHP version 4.2.2
I sure hope that I can get somebody to help me figure this one out.  I 
have a multi-dimensional array that I need to sort.  Here is the code that 
I have so far:
function gettourndivs(){
GLOBAL $sea_id,$PHP_SELF;
$result=get_mysql_query("SELECT * FROM `games` WHERE sea_id = 
'$sea_id' AND deleted != '1'
GROUP BY div_id 
ORDER BY `type`");
$i="0";
while(($row=mysql_fetch_object($result))){
$divname=getdivisionname($row->div_id);
$array[$i][divid]=$row->div_id;
$array[$i][divname]=$divname;
$array[$i++][type]=$row->type;
}
reset($array);
// I need it to sort the array on the divname field here before going to 
the output.
// and instead of it doing it by the $ii, it should ouput in the correct 
alphabetic order of the "divname" field.
for($ii=0;$ii<$i;$ii++){
echo "$ii," . $array[$ii][divid].",";
echo $array[$ii][divname].",";
echo $array[$ii][type] . "\n";
}
}

Here is the output: and I need to sort it on the third field so that it 
would be in alphabetic order, but keeping the other items on that line 
when it moves to the correct position.
0,91,Mens Open ,0
1,20,U11 Boys ,0
2,65,U17-19 Boys ,0
3,30,U12 Boys Premiership ,0
4,69,U16-17 Girls ,0
5,34,U12 Girls Premiership ,0
6,29,U12 Boys ,1
7,78,U19 Girls ,1
8,100,Mens O-30 ,1
9,11,U10 Boys ,1
10,47,U14 Boys ,1
11,56,U15 Boys ,1
12,24,U11 Girls ,1
13,42,U13 Girls ,1
14,60,U15 Girls ,1
15,35,U12 Girls UEFA Cup ,1
16,53,U14 Girls UEFA Cup ,1
17,52,U14 Girls Premiership ,1
18,38,U13 Boys ,2
19,110,U16 Boys ,2

Is this possible?  I have looked at array_multisort and unless I am 
reading it wrong, it doesn't look like it would do what I needed.

Thank You
Steve



--
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 multi-dimensional array

2003-02-20 Thread Steve Buehler
This would work (and might still if I changed things), but the part that 
calls it is in another function also.

Steve

At 02:35 PM 2/20/2003 +, you wrote:
> -Original Message-
> From: Steve Buehler [mailto:[EMAIL PROTECTED]]
> Sent: 20 February 2003 05:25
>
> Ahhhfinally did it with usort.  Thanks to those who gave me that
> answer.  Now here is a question for that.  I would like to
> re-use my "cmp"
> function without having to rewrite it each time.  Can it be
> written so that
> instead of "divname" being hard coded, that I can pass the
> sort field in
> the usort call.  That way, I can either sort by "divname" and
> do another
> sort by "divid" for seperate results without having to have
> multiple "cmp"
> type functions.  I hope that made since.  Lack of sleep isn't
> good when
> programming.  Below is my sorting code.
>
>
> function cmp ($a, $b) {
>  return strcmp($a["divname"], $b["divname"]);
> }
>
> usort($array, "cmp");

Well, the only obvious way I can think of is to use a global variable to 
set the array index you want to sort by -- something like:

   function cmp ($a, $b) {

  global $field;

  return strcmp($a[$field], $b[$field]);
   }


   $field = "divname";
   usort($array, "cmp");


   $field = "divid";
   usort($array, "cmp");

I haven't tested this, but I think it should work...!

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211



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




[PHP] sorting multi-dimensional array part 2

2003-02-20 Thread Steve Buehler
The following "Seems" to work.  But does anybody know how reliable this 
might be?  Baically, I have a multi-dimensional array and want to sort by 
one column first, than another than another.  Right now, I am using a 
temporary table in MySQL, but want to speed things up if possible.  The 
command there would be to "ORDER BY column1,column3,column2" in my select 
statement.  If I kept it in a multi-dimensional array, would the following 
be "reliable"
1,b,a
2,a,c
1,e,b

function dostuff(){
	usort($array, "column1");
	usort($array, "column3");
	usort($array, "column2");
// I would be doing any of my outputting here after the sorting.
}

function column1 ($a, $b) {
return strcmp($a["column1name"], $b["column1name"]);
}

function column2 ($a, $b) {
return strcmp($a["column2name"], $b["column2name"]);
}

function column3 ($a, $b) {
return strcmp($a["column3name"], $b["column3name"]);
}

output should be
1,b,a
1,e,b
2,a,c

Yes, this is only 3 rows in this array, but the live one would have 
hundreds or thousands in it.  I do hope that you experts understand what I 
am trying to do here.
The above problem is why I was wondering also if I could have the function 
collect one more variable so that I could call it with the column name that 
I want to sort by.  So that I don't have to have 3 different functions to 
do the job.  Anybody know who I could go about doing that?


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



[PHP] testing for < 0

2003-02-28 Thread Steve Buehler
I have a form that has input for minutes.  My problem is that I am trying 
to test to see if the field is blank or not and if they enter a "0" (zero), 
my test always show it as blank.  I have tried !$timemb and 
!is_numeric($timemb).

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


RE: [PHP] testing for < 0

2003-02-28 Thread Steve Buehler
There we go.  Thank You so much.  I also found that I had another error in 
my script and !is_numeric($timemb) did work after all.

Steve

At 10:41 AM 2/28/2003 -0800, you wrote:
See isset() and empty()

-Original Message-
From: Steve Buehler [mailto:[EMAIL PROTECTED]
Sent: Friday, February 28, 2003 10:29 AM
To: PHP
Subject: [PHP] testing for < 0
I have a form that has input for minutes.  My problem is that I am
trying
to test to see if the field is blank or not and if they enter a "0"
(zero),
my test always show it as blank.  I have tried !$timemb and
!is_numeric($timemb).
Thank You
Steve
--
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] delete from array

2003-03-10 Thread Steve Buehler
Not sure if there is a function that I missed when I did a search on this 
at php.net, but here is the situation:

I have an array that looks something like this:
12:00:00
12:05:00
12:10:00
12:15:00
Bascially, it just has all times in it for a day in 5 minute 
increments.  This is more of a template array for other things that I am 
doing.  How do I delete a specific time out of the array or how do I delete 
a range of times out of the array?  I would like to be able to delete 
12:05:00 but if I want, delete a range like 12:05:00 to 12:10:00.  I have 
other arrays that do NOT have numbers (times) in them and would like to be 
able to delete a specific item out of them too.

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


[PHP] strip white space

2003-07-02 Thread Steve Buehler
I am not sure how to go about this and hope that someone can help here.  I 
have a variable like the following:
$team_name="BV Stars  Black";

it has two spaces between the words Stars and Black.  What I am trying to 
do is to take this variable, check for and strip the following:
1.  Leading spaces
2.  Ending spaces
3.  Double (or more) spaces in the variable leaving only one space between 
words.

Does php have any built in function that I can not find that will do this?

Thank You in Advance
Steve
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] strip white space

2003-07-02 Thread Steve Buehler
Figures, right after I emailed this, I found it after looking for over an 
hour.  Here is the result and some people had emailed me parts of this:

$team_name=" BV Stars  Black";
wsstrip($team_name);
function wsstrip(&$str)
{
$str=ereg_replace (' +', ' ', trim($str));
$str=ereg_replace("[\r\t\n]","",$str);
}
echo $team_name; // Would produce the following line

BV Stars Black

Thank you all for helping on this.  I found the answer by "David Gillies" at:
http://us4.php.net/trim
Another question is this.  The "&" in wsstrip(&$str).  Does that mean that 
it takes the input to the function as Global and changes it Globally?  I am 
assuming that because that is what the whole function seems to do for me.

Thanks again everybody
Steve


At 11:49 AM 7/2/2003 -0500, you wrote:
I am not sure how to go about this and hope that someone can help here.  I 
have a variable like the following:
$team_name="BV Stars  Black";

it has two spaces between the words Stars and Black.  What I am trying to 
do is to take this variable, check for and strip the following:
1.  Leading spaces
2.  Ending spaces
3.  Double (or more) spaces in the variable leaving only one space between 
words.

Does php have any built in function that I can not find that will do this?

Thank You in Advance
Steve
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
This message has been scanned for viruses and
dangerous content by the MailScanner at ow4, and is
believed to be clean.


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


[PHP] cookies on localhost WinXP

2003-07-30 Thread Steve Buehler
I have PHP/Apache/MySQL installed on my WinXP laptop.  I do this so that I 
can write programs when not connected to the Internet (like when 
traveling).  I am trying to set a cookie from the http://localhost site on 
my computer and it doesn't get set.  Does this sound like something wrong 
in my php.ini file or my browsers?  The program works fine on my 
RedHat/Apache/PHP/MySQL server.

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


Re: [PHP] cookies on localhost WinXP

2003-07-30 Thread Steve Buehler
Sorry about that.  Here is my code:
if(isset($coach_access[login_id])){
}elseif(($lusername) && ($lpassword)) {
if(($lusername=="me") AND ($lpassword=="apass")){
$cookhost=$_SERVER["HTTP_HOST"];
setcookie ("coach_access[login_id]", 
"coach",0,"/","$cookhost");
}else{
$result=get_mysql_query("SELECT `login_id`,`cont_id` FROM 
`login_coach` where `login`='$lusername' AND `login_passwd`='$lpassword'");
if($row=mysql_fetch_row($result)){
$cookhost=$_SERVER["HTTP_HOST"];
setcookie ("coach_access[login_id]", 
"$row[0]",0,"/","$cookhost");
}else{
login_page();
}
}
}else{
login_page();
}

I have put in the "if(($lusername=="me") AND ($lpassword=="apass"))" 
statement so that I can bypass the database lookup.  I have also tried to 
just set a cookie on a page like this:

setcookie ("coach_access[login_id]", "coach",0,"/","localhost");
?>
That doesn't seem to work either.  I am using two browsers for 
testing.  Netscape 7.1 and MS IE 6.0.2800.  Netscape 7.1 has a cookie 
manager that will let me see all cookies that are set and it doesn't show 
up in there after I try to set it.  Again, the program will set the cookie 
if run from my RedHat/Apache/PHP/MySQL server.

Thanks
Steve
At 02:54 PM 7/30/2003 -0400, CPT John W. Holmes wrote:
> I have PHP/Apache/MySQL installed on my WinXP laptop.  I do this so that I
> can write programs when not connected to the Internet (like when
> traveling).  I am trying to set a cookie from the http://localhost site on
> my computer and it doesn't get set.  Does this sound like something wrong
> in my php.ini file or my browsers?  The program works fine on my
> RedHat/Apache/PHP/MySQL server.
HOW are you trying to set it? What browser are you using? How do you know
it's "not set"?




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


Re: [PHP] cookies on localhost WinXP

2003-07-30 Thread Steve Buehler
h.  This seemed to set the cookie just fine.  Does this mean that 
either localhost in the browser or Apache/PHP on a windows box has to set 
the cookie differently than on RedHat/Apache/PHP?  I am going on vacation 
next week and need to keep working on a project that is working fine on the 
RedHat server, but not on my localhost.  Basically, by this test, it sounds 
like on my laptop I have to use a
header('Set-Cookie: ...);
instead of
setcookie ("coach_access[login_id]", "coach",0,"/","$cookhost");
If so, I can't seem to get it to work with "coach_access[login_id]" as the 
cookie name.
On another note, why would this work on the RedHat, but not the WinXP 
Apache/PHP?

Thanks
Steve
At 12:34 PM 7/30/2003 -0700, Chris Shiflett wrote:
Can you try this example? Let's call the file cookie_test.php

\n";
 echo "Test\n";
}
?>
I think it's best to start simple. Hope this helps.

Chris

=
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/


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


Re: [PHP] cookies on localhost WinXP

2003-07-30 Thread Steve Buehler
hm.  Looks like on my localhost I can't seta cookie like this:
setcookie ("coach_access[login_id]", "coach",0,"/","$cookhost");
if I change it to just:
setcookie ("coach_access_login_id", "coach",0,"/","$cookhost");
it will work.  But then my script won't work without a lot of re-writing 
because it uses $coach_access[login_id] instead.  Any help here?  Am I just 
doing something wrong?  I can't set it with the following either.
header('Set-Cookie: coach_access[login_id]=coach');
But can as:
header('Set-Cookie: coach_access_login_id_=coach');
but again, I would have to re-write a lot of script.

Thanks
Steve
At 12:34 PM 7/30/2003 -0700, Chris Shiflett wrote:
Can you try this example? Let's call the file cookie_test.php

\n";
 echo "Test\n";
}
?>
I think it's best to start simple. Hope this helps.

Chris

=
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/


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


Re: [PHP] cookies on localhost WinXP

2003-07-30 Thread Steve Buehler
That still won't work for me for some reason.  I am just going to rewrite 
parts of the script to use a cookie name with out a [something] IN the 
name.  I will rename it to ca_id or something like that.

Thanks for your help
Steve
At 01:38 PM 7/30/2003 -0700, you wrote:
--- Steve Buehler <[EMAIL PROTECTED]> wrote:
> header('Set-Cookie: coach_access[login_id]=coach');
Well, that is ugly, but it is actually a valid name. The name of a cookie,
as described by http://wp.netscape.com/newsref/std/cookie_spec.html, is "a
sequence of characters excluding semi-colon, comma and white space."
Now, when a browser sends this, it will be something like this:

Cookie: coach_access[login_id]=coach

PHP, in an effort to interpret this "coach_access[login_id]" as a valid
variable name, will actually translate it into an array, so this will be
similar to:
$_COOKIE['coach_access']['login_id'] = 'coach';

Is this what you mean to do? It is best (in my opinion) to stick with
normal names for your cookies - names that would make valid variable
names.
Hope that helps.

Chris

=
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
This message has been scanned for viruses and
dangerous content by the MailScanner at ow4, and is
believed to be clean.


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


Re: [PHP] cookies on localhost WinXP

2003-07-30 Thread Steve Buehler
At 04:37 PM 7/30/2003 -0400, you wrote:

You'd be better of if you re-wrote your code to make it correct, but you
could just put:
$coach_access['login_id'] = $_COOKIE['coach_access[login_id]'];
I guess I will rewrite my code.  I still can't understand it working on the 
RedHat and not the Windows, but that's programming.  The way it was, it was 
keeping it in an array for me because I would have other cookies like:
coach_access[team]

Please don't tell us that you're storing login IDs in a cookie and actually
depending upon them for anything??
Yes, but not the type you are thinking of.  It is just the name of a column 
in a table.  I haven't figured out how to use session id's yet.

Steve



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


[PHP] check for duplicate databases

2003-07-30 Thread Steve Buehler
I have a program that I am writing in PHP/MySQL.  I have made some upgrades 
to the database and like an idiot, forgot to write down the changes or to 
make the changes in several other databases for the other clients that are 
using the program also.  What I am trying to do is to have a program, 
(preferably in PHP) that will look at the structure of the main database 
that I changed, then it will check the other databases to make sure that 
the structure is identical and if not, it will change them to make them 
identical.  Is there a program already out there that would do this?  Or is 
there someone out there that can help me to write it?

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


[PHP] Cookies on WinXP

2003-07-31 Thread Steve Buehler
I still can't figure something out.  I am using WinXP/Apache 1.3.24/PHP 
4.2.3 on my laptop and my cookies still don't work like they 
should.  Hopefully someone can explain to me why.

$cookhost=$_SERVER["HTTP_HOST"];
header("Set-Cookie: aa_host=$cookhost;");
setcookie ("aa_host", "$cookhost",0,"/","$cookhost");
setcookie ("aa_host", "localhost",0,"/","localhost");
setcookie ('aa_host', 'localhost',0,'/','localhost');
?>

I can set the cookie with the "header" line with no problem, but either one 
of the "setcookie" lines will not set the cookie.  Has anybody seen 
this?  Does anybody know why this might be happening?  BTW, no, I do not 
try to set all of these at once.  Just showing the lines that I use.  The 
"header" line and the first two "setcookie" lines work just fine on a 
RedHat 7.3/Apache 1.3.27/PHP 4.2.2 machine.

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


Re: [PHP] Cookies on WinXP

2003-07-31 Thread Steve Buehler
h.  Just found out what was wrong.  These are the specs that php.net 
says a setcookie function can have:
setcookie ( string name [, string value [, int expire [, string path [, 
string domain [, int secure])
Well, if I take off the "string domain" part, it will work just fine.  The 
problem is that I can't use the "int secure".  No biggy right now, but I 
might want to do that in the future.  So the following works just fine now:
setcookie("aa_host",$cookhost,'0','/');
Can anybody explain this now?  BTW, I put on an actual domain name to my 
laptop and put that domain name in the "string domain" parameter and it 
still didn't work.

Steve

At 05:53 PM 7/31/2003 -0500, Steve Buehler wrote:
I still can't figure something out.  I am using WinXP/Apache 1.3.24/PHP 
4.2.3 on my laptop and my cookies still don't work like they 
should.  Hopefully someone can explain to me why.

$cookhost=$_SERVER["HTTP_HOST"];
header("Set-Cookie: aa_host=$cookhost;");
setcookie ("aa_host", "$cookhost",0,"/","$cookhost");
setcookie ("aa_host", "localhost",0,"/","localhost");
setcookie ('aa_host', 'localhost',0,'/','localhost');
?>

I can set the cookie with the "header" line with no problem, but either 
one of the "setcookie" lines will not set the cookie.  Has anybody seen 
this?  Does anybody know why this might be happening?  BTW, no, I do not 
try to set all of these at once.  Just showing the lines that I use.  The 
"header" line and the first two "setcookie" lines work just fine on a 
RedHat 7.3/Apache 1.3.27/PHP 4.2.2 machine.

Thanks
Steve


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


Re: [PHP] Cookies on WinXP

2003-07-31 Thread Steve Buehler
Something else I found out now.  I think it was Cpt John W. Holmes (not 
sure though) that said I couldn't have a cookie as an array like this the 
following.  So i am not sure if it is something that is going away or not.
setcookie ("admin_access[host]", "$cookhost",0,"/","$cookhost");
setcookie ("admin_access[hostName]", "$hostName",0,"/","$cookhost");

But I found the following on the php site at:
http://us3.php.net/manual/en/function.setcookie.php
-snip-
   * Cookies names can be set as array names and will be available to your 
PHP scripts as arrays but seperate cookies are stored on the users system. 
Consider explode() or 
serialize() to set one 
cookie with multiple names and values.


// after the page reloads, print them out
if (isset($_COOKIE['cookie'])) {
foreach ($_COOKIE['cookie'] as $name => $value) {
echo "$name : $value \n";
}
}
/* which prints

three : cookiethree
two : cookietwo
one : cookieone
*/
?>
-end snip
I want to thank everybody for your help.

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


[PHP] case insensitive sort

2003-08-26 Thread Steve Buehler
I am using the following function for a sort on an array.  I hope someone 
can help me out here and let me know how to change it to make it a "case 
insensitivie" sort.  Right now, it is "case sensitive" so the sort of the 
array will put the Capital letters first.  Here are the results of the search:
Buehler, Steve
Buehler, Steve
Teste, Teste
a, a
asdf, adsf
asdf, asdf
dsdlkj, sd

Here is the code to sort:
$GLOBALS[sortterm]="cont_name";
usort($logins, "cmp");
function cmp ($a, $b) {
GLOBAL $sortterm;
return strcmp($a[$sortterm], $b[$sortterm]);
}
Thanks
Steve
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] case insensitive sort

2003-08-26 Thread Steve Buehler
Ok.  Now I REALLY feel like an idiot.  Thanks so much for your help.

Steve

At 05:46 PM 8/26/2003 +0200, you wrote:
It right there under your nose:
strcasecmp()
Steve Buehler wrote:

I am using the following function for a sort on an array.  I hope someone 
can help me out here and let me know how to change it to make it a "case 
insensitivie" sort.  Right now, it is "case sensitive" so the sort of the 
array will put the Capital letters first.  Here are the results of the search:
Buehler, Steve
Buehler, Steve
Teste, Teste
a, a
asdf, adsf
asdf, asdf
dsdlkj, sd
Here is the code to sort:
$GLOBALS[sortterm]="cont_name";
usort($logins, "cmp");
function cmp ($a, $b) {
GLOBAL $sortterm;
return strcmp($a[$sortterm], $b[$sortterm]);
}
Thanks
Steve


--
This message has been scanned for viruses and
dangerous content by the MailScanner at ow4, and is
believed to be clean.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] sorting an array

2003-03-20 Thread Steve Buehler
I am having problems sorting a multi-dimensional array.  I am hoping that 
somebody can help me figure out what I am doing wrong.  It should sort on 
the "field" than on the "fac".  Here is my code:
-start code-
$sortterm;
get_locations();

function cmp ($a, $b) {
GLOBAL $sortterm;
return strcmp($a[$sortterm], $b[$sortterm]);
}
function get_locations(){
GLOBAL $sortterm;
$i="1";
while(($row=mysql_fetch_object($result))){
$locs[$i][loc_id]=$row->loc_id;
$locs[$i][fac]=$row->fac;
$locs[$i++][field]=$row->field;
}
	reset($locs);
	$sortterm="field";
	usort($locs, "cmp");
	reset($locs);
	$sortterm="fac";
	usort($locs, "cmp");
	reset($locs);
	while (list ($key, $value) = each ($locs)) {
		echo $locs[$key][loc_id].", ".$locs[$key][fac].", 
".$locs[$key][field]."\n";
	}
}
-end code-

Here is how it comes out when run:
12, Johnson County Community College, C
11, Johnson County Community College, B
13, Johnson County Community College, D
14, Johnson County Community College, E
10, Johnson County Community College, A
8, Johnson County Girls Athletic Assoc, D
6, Johnson County Girls Athletic Assoc, B
7, Johnson County Girls Athletic Assoc, C
5, Johnson County Girls Athletic Assoc, A
9, Shawnee Civic Center, 1
1, Tomahawk Sports Dome, 1
2, Tomahawk Sports Dome, 2
3, Tomahawk Sports Dome, 3
4, Tomahawk Sports Dome, 4
As you can see, the fac is sorted correctly, but the field isn't.

Thanks
Steve


--
This message has been scanned for viruses and
dangerous content by the MailScanner at ow5, and is
believed to be clean.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] greater than question

2003-05-27 Thread Steve Buehler
Hopefully someone has done this and has an easy answer.  I know that I can 
do what I need with a LOT of code, but am trying to come up with something 
a little shorter that 50 lines of code.  Here is the problem.  I have 4 
variables that each have a number in them.  I need to find which one has 
the highest number.  I then just need to do something with that number.  If 
two or more have the same "highest" number, than I need to do the same 
thing with them.  So..
$a=5
$b=1
$c=5
$d=3

$a and $c are the highest number.  I need to run something on those two 
variables.

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


Re: [PHP] cannot get php through apache to write to my home dir on shared server

2003-06-26 Thread Steve Buehler
Another option might be to create a directory in your web space to hold 
your file and open up just that directory as 777.

Steve

At 08:17 AM 6/26/2003 -0400, you wrote:
From: "frank reeves" <[EMAIL PROTECTED]>
> I have an account on shared server and am trying to
> write a logfile (a dump of an email which i use mail()
> to send) to a logfile in my home dir.  This logfile
> will grow with all emails send by my app and will thus
> give me an archive of sorts.
>
> However, because php is executed through apache as
> user nobody it does not have permission to write to my
> linux home dir (fopen("log.file","a")) fails with
> permission denied). I dont want to open my home dir to
> the world to allow this operation but I also dont want
> to write my log to /var/tmp as user nobody.
>
> Does anyone know how I can get php to write as me to
> my home dir ?
You can only get this with PHP as a CGI.

> I suppose i could write a shell script and have my app
> call this but that seems a bit convoluted.
Other option is to read/write the file over FTP, since you'll be able to log
in as you.
---John Holmes...

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
This message has been scanned for viruses and
dangerous content by the MailScanner at ow4, and is
believed to be clean.


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


[PHP] filling an array(2)

2002-07-26 Thread Steve Buehler

h.  Ok.  Can somebody explain this one?  Why won't it work correctly?

for($m=1;$m<=5;$m++){
$div_idd[$m]=${'row->sub' . $m . 'd'};
}

Can it not be done with a 3 parter?  The columns in the table that $row 
gets, are sub1d, sub2d, sub3d, sub4d and sub5d.  Or is it the "->" that is 
messing it up?  I have tried escaping them "row\-\>sub", but that didn't work.
What would I search for on the PHP site or where are directions located 
that tells me how to use this type of putting a variable together.  It 
makes it hard to search for it if I don't know what it is called.

Thanks
Steve


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


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




[PHP] filling an array

2002-07-26 Thread Steve Buehler

Thank You Andrey, Matt and Martin for your answers.  To summarize for 
everyone, here are the answers:

 From Andrey (tested, works):
for($m=1;$m<=5;$m++){
$div_id[$m]=${'divid'.$m};
}

 From Matt:
for($m=1;$m<=5;$m++){
$varName = 'divId' . $m;
$div_id[$m]=${$varName}
}

 From Martin:
for($i =0; $i < 5; $i++) {
$offset = $m + 1;
$divid[$m] = $div_id{$offset};
}

At 10:55 PM 7/26/2002 +0300, you wrote:


>- Original Message -
>From: "Steve Buehler" <[EMAIL PROTECTED]>
>To: "PHP" <[EMAIL PROTECTED]>
>Sent: Friday, July 26, 2002 10:48 PM
>Subject: [PHP] filling an array
>
>
> > Can anyone tell me what I am doing wrong?
> >
> > I am essentially trying to do this:
> > $divid[1] = $div_id1;
> > $divid[2] = $div_id2;
> > $divid[3] = $div_id3;
> > $divid[4] = $div_id4;
> > $divid[5] = $div_id5;
> >
> > But I was looking for a tighter way, like the following (which does not
>work):
> > for($m=1;$m<=5;$m++){
> > $div_id[$m]=$divid$m;
> > }
> >
> > Can anybody tell me how to do this in a "for" statement?
> >
> > Thanks In Advance
> > Steve
> >
> >
> > --
> > This message has been scanned for viruses and
> > dangerous content by MailScanner, and is
> > believed to be clean.
> > ow3
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
>--
>This message has been scanned for viruses and
>dangerous content by MailScanner, and is
>believed to be clean.
>ow3



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


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




Re: [PHP] filling an array(2)

2002-07-26 Thread Steve Buehler

Ok.  That makes since.

Thanks
Steve

At 04:20 PM 7/26/2002 -0500, you wrote:
>var names can only be letters, numbers, and underscores.
>
>Jim Grill
>Support
>Web-1 Hosting
>http://www.web-1hosting.net
>- Original Message -
>From: "Steve Buehler" <[EMAIL PROTECTED]>
>To: "PHP" <[EMAIL PROTECTED]>
>Sent: Friday, July 26, 2002 3:53 PM
>Subject: [PHP] filling an array(2)
>
>
> > h.  Ok.  Can somebody explain this one?  Why won't it work correctly?
> >
> > for($m=1;$m<=5;$m++){
> > $div_idd[$m]=${'row->sub' . $m . 'd'};
> > }
> >
> > Can it not be done with a 3 parter?  The columns in the table that $row
> > gets, are sub1d, sub2d, sub3d, sub4d and sub5d.  Or is it the "->" that is
> > messing it up?  I have tried escaping them "row\-\>sub", but that didn't
>work.
> > What would I search for on the PHP site or where are directions located
> > that tells me how to use this type of putting a variable together.  It
> > makes it hard to search for it if I don't know what it is called.
> >
> > Thanks
> > Steve
> >
> >
> > --
> > This message has been scanned for viruses and
> > dangerous content by MailScanner, and is
> > believed to be clean.
> > ow3
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
>
>
>
>--
>This message has been scanned for viruses and
>dangerous content by MailScanner, and is
>believed to be clean.
>ow3



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


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




[PHP] filling an array

2002-07-26 Thread Steve Buehler

Can anyone tell me what I am doing wrong?

I am essentially trying to do this:
$divid[1] = $div_id1;
$divid[2] = $div_id2;
$divid[3] = $div_id3;
$divid[4] = $div_id4;
$divid[5] = $div_id5;

But I was looking for a tighter way, like the following (which does not work):
for($m=1;$m<=5;$m++){
$div_id[$m]=$divid$m;
}

Can anybody tell me how to do this in a "for" statement?

Thanks In Advance
Steve


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


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




Re: [PHP] Re: Q:What is the easiest way to test my PHP+Html pages?

2002-07-27 Thread Steve Buehler

Install PHP on your desktop.  You will need a web server too.  I use 
PHP/MySQL/Apache on my Laptop, Desktop, Servers and workstations.

Steve

At 07:56 AM 7/27/2002 -0700, you wrote:
>I guess I should reiterate;
>
>"What is the easiest way to test locally (on my desktop) without having to
>upload?"
>
>Thanks,-Marcus
>
>Tim Luoma wrote:
>
> > Marcus Unlimited wrote:
> >
> > > So what is the absolute simplest and easiest path to open my .html pages
> > > with some php mysql in em. and see them as they will work on the web???
> >
> > To quote a friend of mine: "The only way to see how this will work is to
> > see how this will work."
> >
> > Get some server space with the software installed, and play with it.
> >
> > There's free space available for this purpose at http://www.evolt.org
> > and http://f2o.org/ and I'm sure others as well, but it's best if you
> > can setup a little 'sandbox' to play in on the actual machine that you
> > are using so that you are testing on the same versions, same config that
> > you will be running on.
> >
> > TjL
>
>--
>||
>
>Marcus Unlimited
>http://marcusunlimited.com
>Multimedia Internet Design and Education
>||
>
>---
>Also visit:
>-  http://www.chromaticus.com
>-  http://ampcast.com/chromaticus
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>--
>This message has been scanned for viruses and
>dangerous content by MailScanner, and is
>believed to be clean.
>ow3



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


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




[PHP] Re: filling an array(2)

2002-07-29 Thread Steve Buehler

That did the trick.  Thank you SO MUCH.

Steve

At 03:48 AM 7/29/2002 -0500, Richard Lynch wrote:
> >h.  Ok.  Can somebody explain this one?  Why won't it work correctly?
> >
> >for($m=1;$m<=5;$m++){
> > $div_idd[$m]=${'row->sub' . $m . 'd'};
> >}
> >
> >Can it not be done with a 3 parter?  The columns in the table that $row
> >gets, are sub1d, sub2d, sub3d, sub4d and sub5d.  Or is it the "->" that is
> >messing it up?  I have tried escaping them "row\-\>sub", but that didn't 
> work.
> >What would I search for on the PHP site or where are directions located
> >that tells me how to use this type of putting a variable together.  It
> >makes it hard to search for it if I don't know what it is called.
>
>You want to search for "variable variables"
>
>At a guess, you need:
>
>$div_idd[$m] = $row->{'sub' . $m . 'd'};
>
>For sure, you need to get the subXd part together before you get the -> or
>the $row involved.
>
>--
>Like Music?  http://l-i-e.com/artists.htm
>I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
>major distro).  Need to record live events (mixed already) to stereo
>CD-quality.  Soundcard Recommendations?
>Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
>post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
>audio-to-disk.
>
>--
>This message has been scanned for viruses and
>dangerous content by MailScanner, and is
>believed to be clean.
>ow3



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


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




[PHP] time stamp

2002-08-27 Thread Steve Buehler

I am using PHP with MySQL and have a timestamp field in my db table.  What 
would be the easiest way to get the newest timestamp out of the db?

Thanks in Advance
Steve


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


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




[PHP] RE: time stamp

2002-08-28 Thread Steve Buehler

Thank you David Lopez and David Robley.  That was what I was looking 
for.  Here is how I used it.

$date=getlastupdatetime(array("team_id" => $team_id,
 "season" => $season,
 "div_id" => $div_id));
echo "$date";

function getlastupdatetime($a){
 extract($a);
 $result=mysql_query ("SELECT MAX(UNIX_TIMESTAMP(updated)) as 
epoch_time FROM games
 WHERE (hteam='$team_id' OR vteam='$team_id')
 AND sea_id = '$season' AND div_id = 
'$div_id'");
 $date = mysql_result ($result, 0, 0);
 if(!$date){
 return;
 }else{
 return date("l dS of F Y h:i:s A O",$date);
 }
}


Which gives me the following line:
Wednesday 28th of August 2002 06:00:06 PM -0500

I was doing the following which was a bit more code and I wanted to use a 
little less code.  Plus it should make the search and processing quicker.

$date=getlastupdatetime(array("team_id" => $team_id,
 "season" => $season,
 "div_id" => $div_id));
echo "$date";

function getlastupdatetime($a){
 extract($a);
 $result=mysql_query("SELECT updated FROM games WHERE 
(hteam='$team_id' OR vteam='$team_id')
 AND sea_id = '$season' AND 
div_id = '$div_id'");
 $b=0;
 while(($row=mysql_fetch_object($result))){
 if($row->updated > $b){
 $b=$row->updated;
 }
 }
 $date=$b;
 $year=substr($date,0,4);
 $month=substr($date,4,2);
 $day=substr($date,6,2);
 $hour=substr($date,8,2);
 $min=substr($date,10,2);
 if($hour >= 12){$ap = "pm";}else{$ap = "am";}
 if($hour > 12){$hour = $hour-12;}
 if(!$month){
 return "nothing";
 }else{
     return "$month-$day-$year $hour:$min $ap";
 }
*/
}


Thank Again
Steve


At 08:28 AM 8/28/2002 -0700, you wrote:
>Steve
>
>Try: SELECT MAX(field_timestamp) from table1;
>
>David
>
> > -Original Message-
> > From: Steve Buehler [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, August 27, 2002 5:21 PM
> > To: mysql; PHP
> > Subject: time stamp
> >
> >
> > I am using PHP with MySQL and have a timestamp field in my db
> > table.  What
> > would be the easiest way to get the newest timestamp out of the db?
> >
> > Thanks in Advance
> > Steve
> >
> >
> > --
> > This message has been scanned for viruses and
> > dangerous content by MailScanner, and is
> > believed to be clean.
> > ow3
> >
> >
> > -
> > Before posting, please check:
> >http://www.mysql.com/manual.php  (the manual)
> >http://lists.mysql.com/  (the list archive)
> >
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail
> > <[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> >
>
>--
>This message has been scanned for viruses and
>dangerous content by MailScanner, and is
>believed to be clean.
>ow3



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


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




Re: [PHP] lynx and crontab

2002-10-15 Thread Steve Buehler

Info: Lynx has nothing to do with supporting or not supporting PHP.  PHP is 
not a client side language, it is a server side language, so the browser 
that you use does not even know or need to know that it is running PHP.
Solutions (hopefully):  Take out the space between the "-" and the word 
"dump".  Your command should be:
lynx -dump http://www.mysite.com/test.php

Steve

At 01:11 PM 10/15/2002 +0100, you wrote:
>my isp lets me control crontab so i've been trying to
>run a php script every 30 mins.
>
>the command is like this:
>lynx - dump http://www.mysite.com/test.php
>
>which gives the error
>
>lynx: Start file could not be found or is not text/html or text/plain
>
>what do i telll my isp to do to get lynx to supprt .php files?
>(i get a better response from them if i tell them exactly what to do ;-)  )



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


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




[PHP] query question

2002-11-14 Thread Steve Buehler
I have been trying to figure something out here and am having 
problems.  What I have is a problem with outputting some info in a 
table.  Here is what I have and the problem is in the "getstart_end" 
function.  This should be a working copy if you want to run it and I have 
put in some sample times.

//  $dend is actually how many hours from the start time.  It is not a 
clock time in itself.
//  So that would mean that a $dstart of 07:00:00 and a $dend of 6:00:00 
would actually make
//  the $dend time 13:00:00 (1pm)
createtemptable();
populatetemptable();
$dstart="07:00:00";
$dend="6:00:00";
deletetimes($dstart,$dend);
$dstart="18:00:00";
$dend="3:40:00";
deletetimes($dstart,$dend);
getstart_end();
droptemptable();

// This just creates the table and works
function createtemptable(){
	$result=mysql_query("CREATE TEMPORARY TABLE IF NOT EXISTS aplayabletimes
		(`min` time
		) TYPE=MyISAM");
}

// This just populates the table in 5 minute increments and works
function populatetemptable(){
	for($i=0;$i<1435;$i=$i+5){
		$minutes=$minutes+5;
		if($minutes=="60"){
			$minutes="00";
			$hours=$hours+1;
		}
	$time="$hours:$minutes:$seconds";
	$result=mysql_query("INSERT INTO aplayabletimes
		(min)
		values
		(\"$time\")");
	}
}

/ / This deletes times from the table and works
function deletetimes($dstart,$dend){
	list($hours,$minutes,$seconds)=split(":",$dstart);
	list($houre,$minutee,$seconde)=split(":",$dend);
	$minutee=$minutee+$minutes;
	$houre=$houre+$hours;
	if($minutee>=60){$minutee=$minutee-60;$houre=$houre=1;}
	$dend="$houre:$minutee:00";
	$result=mysql_query("DELETE FROM aplayabletimes WHERE min > '$dstart' AND 
min < '$dend'");
}

//  Here is where I am having problems.  I need it to give me the start time
//  And the end time.  There can be gaps in the table for times.
//  It starts at 00:00:00 and goes to 23:55:00 (in 5 minute 
increments).  Once time frames are deleted,
//  it could have times from (example) 07:00:00 - 13:00:00 and another time 
frame from
//  18:00:00 to 21:40:00.  What I need it to do is to output like this:
//  "First Start Time - First End Time" newline
//  "Next Start Time - Next End Time" newline
//  etc... (because there can be multiple start and end times)
//  To determine if there is a new time block, there would be more than a 5 
minute gap between
//  the end of one time block and the start of another time block.
//  The $i is just to grab the first block and I know there has to be a 
better way then this to do that too.
function getstart_end(){
	$result=mysql_query("SELECT * FROM aplayabletimes ORDER BY min");
	while(($row=mysql_fetch_object($result))){
		if(!$i){
			echo $row->min . " - ";
		}else{
		
		}
	$i++;
	}
}

//  This just deletes the temporary table
function droptemptable(){
	$result=mysql_query("DROP TEMPORARY TABLE playabletimes");
}


Thank You in advance for any help that you can give me on the problem.
Steve


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


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



Re: [PHP] query question

2002-11-14 Thread Steve Buehler
Thanks for the help, but that is not actually producing the desired results 
either.  This returns the following results:
00:00:05 - 00:00:05
00:00:05 - 5
00:00:05 - 10
00:00:05 - 15
00:00:10 - 20
00:00:10 - 25
00:00:10 - 30
00:00:10 - 35
00:00:15 - 40
00:00:15 - 45
00:00:15 - 50
00:00:15 - 55
00:00:20 - 60
00:00:20 - 65

I am not going to post all of them. :)

Here is the code that is now in the getstart_end() function.  I had to 
change the line that you had because the 5 minutes would give an error.  I 
just took out the "minutes" part.
$tmp = $i+5 minutes; // add 5 minutes to $i, 
implement it yourself
function getstart_end(){
$result=mysql_query("SELECT * FROM aplayabletimes ORDER BY min");
while(($row=mysql_fetch_object($result))){
if(!$i){
echo $row->min . " - ";
$i=$row->min;
}else{
$tmp = $i+5; // add 5 minutes to $i, implement it 
yourself
if($tmp != $row->min) {  // there is a gap
echo $i ."\n";  // print previous time 
as end
echo $row->min . " - ";  // print this 
time as new start
}
$i = $tmp; // keep this new time for next loop
}
}
echo $row->min ."\n";  // print last row
}

At 07:09 PM 11/14/2002 +0100, you wrote:
Untested, but should work

Steve Buehler wrote:



function getstart_end(){
$result=mysql_query("SELECT * FROM aplayabletimes ORDER BY min");
while(($row=mysql_fetch_object($result))){
if(!$i){
echo $row->min . " - ";


   $i=$row->min;



}else{


$tmp = $i + 5 minutes // add 5 minutes to $i, implement it yourself
if($tmp != $row->min) {  // there is a gap
   echo $i ."\n";  // print previous time as end
   echo $row->min . " - ";  // print this time as new start
}
$i = $tmp; // keep this new time for next loop



}
}


echo $row->min ."\n";  // print last row



}






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


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




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


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




Re: [PHP] query question

2002-11-14 Thread Steve Buehler
Ok.  That output was my fault.  I had an error in one of my other 
functions.  I needed to set $hours to "00" to start with in my 
populatetemptable() function.  Now my output is:
00:05:00 - 00:05:00
00:05:00 - 00:10:00
00:10:00 - 00:15:00
00:10:00 - 00:20:00
00:15:00 - 00:25:00
00:15:00 - 00:30:00

Problem is that it isn't giving me just the start and end times.  I will 
keep working on it.

Thanks
Steve


At 12:48 PM 11/14/2002 -0600, you wrote:
Thanks for the help, but that is not actually producing the desired 
results either.  This returns the following results:
00:00:05 - 00:00:05
00:00:05 - 5
00:00:05 - 10
00:00:05 - 15
00:00:10 - 20
00:00:10 - 25
00:00:10 - 30
00:00:10 - 35
00:00:15 - 40
00:00:15 - 45
00:00:15 - 50
00:00:15 - 55
00:00:20 - 60
00:00:20 - 65

I am not going to post all of them. :)

Here is the code that is now in the getstart_end() function.  I had to 
change the line that you had because the 5 minutes would give an error.  I 
just took out the "minutes" part.
$tmp = $i+5 minutes; // add 5 minutes to $i, 
implement it yourself
function getstart_end(){
$result=mysql_query("SELECT * FROM aplayabletimes ORDER BY min");
while(($row=mysql_fetch_object($result))){
if(!$i){
echo $row->min . " - ";
$i=$row->min;
}else{
$tmp = $i+5; // add 5 minutes to $i, implement it 
yourself
if($tmp != $row->min) {  // there is a gap
echo $i ."\n";  // print previous 
time as end
echo $row->min . " - ";  // print this 
time as new start
}
$i = $tmp; // keep this new time for next loop
}
}
echo $row->min ."\n";  // print last row
}

At 07:09 PM 11/14/2002 +0100, you wrote:
Untested, but should work

Steve Buehler wrote:



function getstart_end(){
$result=mysql_query("SELECT * FROM aplayabletimes ORDER BY min");
while(($row=mysql_fetch_object($result))){
if(!$i){
echo $row->min . " - ";


   $i=$row->min;



}else{


$tmp = $i + 5 minutes // add 5 minutes to $i, implement it yourself
if($tmp != $row->min) {  // there is a gap
   echo $i ."\n";  // print previous time as end
   echo $row->min . " - ";  // print this time as new start
}
$i = $tmp; // keep this new time for next loop



}
}


echo $row->min ."\n";  // print last row



}




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


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




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


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


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




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


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




Re: [PHP] query question

2002-11-14 Thread Steve Buehler
Not sure if I wrote and thanked you or not, but this did the trick.  THANK 
YOU THANK YOU THANK YOU!!!

Steve

At 08:41 PM 11/14/2002 +0100, Marek Kilimajer wrote:
This is checked:

function getstart_end(){
   $result=mysql_query("SELECT * FROM aplayabletimes ORDER BY min");
   while(($row=mysql_fetch_object($result))){
   if(!$i){
   echo $row->min . " - ";
   $i=$row->min;
   } else {
   list($houre,$minutee,$seconds)=explode(":",$i);
   $minutee=$minutee+5;

if($minutee>=60){$minutee=$minutee-60;$houre=$houre+1;}
   $tmp = 
implode(':',array(str_pad($houre,2,'0',STR_PAD_LEFT) 
,str_pad($minutee,2,'0',STR_PAD_LEFT),'00'));

   if($tmp != $row->min) {  // there is a gap
   //echo $row->min ." != $tmp";
 echo $i ."\n";  // print previous time 
as end
 echo $row->min . " - ";  // print this time 
as new start
   }
   $i = $row->min; // keep this new time for next loop
   }
   //echo $i." - $tmp  --tmp\n";
   //echo $row->min."\n";
   }
   echo $i ."\n";  // print last row
}

Steve Buehler wrote:

Ok.  That output was my fault.  I had an error in one of my other 
functions.  I needed to set $hours to "00" to start with in my 
populatetemptable() function.  Now my output is:
00:05:00 - 00:05:00
00:05:00 - 00:10:00
00:10:00 - 00:15:00
00:10:00 - 00:20:00
00:15:00 - 00:25:00
00:15:00 - 00:30:00

Problem is that it isn't giving me just the start and end times.  I will 
keep working on it.

Thanks
Steve


At 12:48 PM 11/14/2002 -0600, you wrote:

Thanks for the help, but that is not actually producing the desired 
results either.  This returns the following results:
00:00:05 - 00:00:05
00:00:05 - 5
00:00:05 - 10
00:00:05 - 15
00:00:10 - 20
00:00:10 - 25
00:00:10 - 30
00:00:10 - 35
00:00:15 - 40
00:00:15 - 45
00:00:15 - 50
00:00:15 - 55
00:00:20 - 60
00:00:20 - 65

I am not going to post all of them. :)

Here is the code that is now in the getstart_end() function.  I had to 
change the line that you had because the 5 minutes would give an 
error.  I just took out the "minutes" part.
$tmp = $i+5 minutes; // add 5 minutes to $i, 
implement it yourself
function getstart_end(){
$result=mysql_query("SELECT * FROM aplayabletimes ORDER BY min");
while(($row=mysql_fetch_object($result))){
if(!$i){
echo $row->min . " - ";
$i=$row->min;
}else{
$tmp = $i+5; // add 5 minutes to $i, implement 
it yourself
if($tmp != $row->min) {  // there is a gap
echo $i ."\n";  // print previous 
time as end
echo $row->min . " - ";  // print this 
time as new start
        }
$i = $tmp; // keep this new time for next loop
}
}
echo $row->min ."\n";  // print last row
}

At 07:09 PM 11/14/2002 +0100, you wrote:

Untested, but should work

Steve Buehler wrote:



function getstart_end(){
$result=mysql_query("SELECT * FROM aplayabletimes ORDER BY min");
while(($row=mysql_fetch_object($result))){
if(!$i){
echo $row->min . " - ";



   $i=$row->min;



}else{



$tmp = $i + 5 minutes // add 5 minutes to $i, implement it yourself
if($tmp != $row->min) {  // there is a gap
   echo $i ."\n";  // print previous time as end
   echo $row->min . " - ";  // print this time as new start
}
$i = $tmp; // keep this new time for next loop



}
}



echo $row->min ."\n";  // print last row



}



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


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





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


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


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





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




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


--
This message has 

[PHP] Expert Paid Help Needed

2002-11-19 Thread Steve Buehler
I have been working on a program and have come up to a block.  A lot of 
people on the PHP list have been able to help me for free already.  But 
what I have left to do would probably be to much to ask for someone to do 
for free.  Are their any EXPERT PHP (with MySQL) programers out there that 
would be willing to help?  If so, please send me privately the following:

Name:
Email:
City:
State:
Country (USA preferred):
Phone Number:
Hourly Rate or (Work for Trade) Server space requirements:

Somebody in the Kansas City Missouri/Kansas area would be preferred, just 
because I would be able to meet with you to discuss this.  But it is NOT a 
requirement.  This project will require me to at least talk with you on the 
phone because it would just take a lot less time than trying to email 
everything.  We can also work out a trade for server space instead of 
payments for someone if that would help.  We have some people that work for 
us JUST for web/server space.


Steve Buehler
IT Director
Internet Business Applications, LLC
11638 W. 90th St.
Overland Park, Kansas 66214
913-438-3074 x 7
steve @ vespro.com



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


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



[PHP] copying tables

2002-11-20 Thread Steve Buehler
Using PHP and MySQL.
I have looked and can't find the answer to this problem.  What I am trying 
to do is to copy a mysql table to a new table name in a PHP script.  The 
reason for this is to keep the original table the way it is and editing the 
copy.  Now, I know that I can go through a loop reading the old table and 
putting it into the new table, but is there an easier way that would just 
duplicate or copy the mysql table to a new table name?

The reason for all of this is my script will create the original table (a 
temporary table), populate it, delete what needs to be deleted out of it, 
then I need a copy of that table for a subroutine that will be running 
multiple times and need the same information to start off with.

Thanks for any help
Steve


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


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



[PHP] PHP Apache Module AND command Line

2002-06-05 Thread Steve Buehler

Is there doc somewhere to would tell how to install PHP as a command line 
interpreter (like perl) without messing up the installation of PHP that is 
installed as a module in/for Apache?  Basically, I want to have both on the 
same server.  Or can this even be done?

Thank You
Steve


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




[PHP] htaccess

2002-06-05 Thread Steve Buehler

I have a php script in an .htaccess protected directory.  Is there a way 
that PHP could find out what login was used?

Steve


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




[PHP] Re: Cyber Cafe software

2002-06-04 Thread Steve Buehler

Bret
 Thanks for the reply.  I put that message up on three list (PHP, 
MySQL, RedHat) and this has been the only reply.  There are a lot of 
software packages that I found searching google.com, but they are all for 
cyber cafe's that have the computers all ready set up for people to log 
into.  I have found none that would allow someone to bring in their own 
laptop and be able to just hook it up and also keep track of the time.  I 
was hoping to find one that would run the server on RedHat/PHP/MySQL and do 
what is needed.
 The customer is not actually going to be running a regular cyber 
cafe.  But for the things that they want to do, it is pretty much the same 
thing.  I guess they have some clients that travel a lot and want to come 
in and use their network when they are in town.  From what I understand, it 
is getting pretty annoying but they don't want to tell the people NO.  I 
don't know all of the details about that, I just know that they want it, so 
I am going to try and get it for them.  I have not tried to connect my 
laptop in an airport yet, but from the way it sounds, that is part of the 
type of setup that we want.
 If I can ever figure out how to do this, I will try to post the 
results to the lists so other people can use it and improve it as they see fit.

Thanks
Steve

At 09:08 PM 6/3/2002 -0500, Bret Hughes wrote:
>On Mon, 3 Jun 2002, Steve Buehler wrote:
>
> > Does anybody know of any software all ready written or what would have to
> > be done, to allow us to run a cyber cafe style setup.  What we need the
> > software to do is to allow someone to come in and plug in their computer to
> > our network (actually a customers network).  They want the following:
> > 1.  A customer comes in and signs up starting a clock so they could charge
> > the customer for the time.
> > 2.  They want it to work for wired or wireless networks.  So when they sign
> > in, it would either have to set their IP address on their machine
> > automatically, or we would have to give them an IP address to put in to
> > their system.
> > 3.  It would have to send a report once a day to an email address (or
> > multiple email addresses) with the days summary of time used and amount of
> > money made.
> > 4.  A regular customer could come in and use the same login each time so
> > that they could track everything over long periods of time, on a per
> > customer basis.  They might want to give discounts to these people and/or
> > give away free stuff.  Kind of likefor every minute someone has been
> > on, they get one credit point.  Those credit points can be used for
> > purchasing extra time, or other products in the business.  Now, if it is
> > kept in a mysql database, than that would not be hard to pull.
> >
> > I know that there are cyber cafe's out there now, so I am assuming that I
> > should not have to reinvent the wheel for this software.  If not, how would
> > somebody go about setting this up.  Basically, if I could get it set up so
> > that ALL IP addresses on the local network are not allowed in unless they
> > sign in first, than what file would it have to put that IP address in and
> > what would have to be restarted to allow that customer access?  Preferably,
> > I would like the program to work with RedHat Linux, PHP and MySQL.
> >
> > Thanks In Advance
> > Steve Buehler
>
>Steve I am sitting in a cyber cafe right now in Las Vegas, and no inspite
>of what the reservations people tell you there is no highspeed internet
>connectivity in the Flamingo Hilton.  Pisses me off but I will leave that
>for tomorrow.
>
>Any way I have used these types of thing occationally while traveling
>probably 3 or four times but have yet to see anyone do this cleverly.  It
>is usually writting your name on a peice of paper with the time and then
>paying as you leave.
>
>However If I was going to try to do this I would probably start with a
>simple php generated html form that everyone should be able to use and
>have them obtain an address via dhcp but have the firewall setup to block
>all outgoing except for those that have logged in vi the php page.  THe
>phph script would of course have the ipaddress since that is part of the
>http packet and could then build a FW rule that would allow the machine to
>hit the net.
>
>Then logging off via the same page would then kill the rule and tell them
>how much they owe.  I don't know what happens when the shut down the
>machine without logging off but I am sure some business pratice could be
>put in place mabye a $2 stupid charge.
>
>If you wanted to get real fancy , I guess the php page could take a credit
>card and bill them automatically after verify

Re: [PHP] Removing ^M

2002-06-08 Thread Steve Buehler

I get this when running that command:
tr: only one string may be given when deleting without squeezing repeats


I looked at the tr man pages and it didn't help much.  I also tried using 
'\r' and `\r` and just \r , but always get the same result.

Steve

At 11:07 PM 6/8/2002 +0200, you wrote:
>why not just run
> tr -d "\r" htmlfile.htm
>
>
>- Original Message -
>From: "Michael Hall" <[EMAIL PROTECTED]>
>To: "PHP List" <[EMAIL PROTECTED]>
>Sent: Sunday, June 09, 2002 2:40 AM
>Subject: [PHP] Removing ^M
>
>
> >
> >
> > I am trying remove ^M characters (some kind of newline character) from an
> > HTML file. I've tried all sorts of ereg_replace and sed possibilities
> > but the
> > things just won't go away. Does anyone have a way of removing such
> > characters?
> >
> > TIA
> >
> > Mick
> >
> >
> >
> >
> > --
> > 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
>
>
>--
>This message has been scanned for viruses and
>dangerous content by MailScanner, and is
>believed to be clean.
>ow3



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




Re: [PHP] Fw: Hosting_submission

2002-06-12 Thread Steve Buehler

Ok guys.  Please take this OFF THIS LIST.  Your fight, in itself, has 
nothing to do with PHP.  If you want service, than be smart and don't go to 
a free service.  If you do go to a free service, than don't expect great 
service.  Actually, if you go to a free service, you don't have a right 
(IMHO) to complain if ANY OF IT is NOT what you want.  You get what you pay 
for.  I don't know what caused the argument and don't really care.  The 
person/company that gave the free service was nice enough to do it.  At the 
first sign that you didn't like it, you should have used your brain and 
backed out of it.  It isn't like you lost any money with them.  And if you 
did loose money because your business site was cut off, than you got what 
you deserved for trying to run a commercial site on a free service.  A free 
service can go off line or kill your account anytime they want.  You ever 
hear the saying "We reserve the right to refuse service to Anyone".  When 
you pay, you expect some support and to get something, when you don't pay 
for it

Steve

At 10:49 PM 6/12/2002 +1000, The_RadiX wrote:
>Abusing you???
>
>
>I am quite sorry but I am lost as to when I abused you?
>
>
>I simply had a "form of service" on your system and after I tried to keep
>updated with what was going on I was kicked off..
>
>
>
>If you couldn't handle the load.. Don't blame me..
>
>
>I was patient.. All I wanted was a reply..
>
>
>:::
>:  Julien Bonastre [The-Spectrum.org CEO]
>:  A.K.A. The_RadiX
>:  [EMAIL PROTECTED]
>:  ABN: 64 235 749 494
>:  QUT Student #: 04475739
>:::
>- Original Message -
>From: "Liam MacKenzie" <[EMAIL PROTECTED]>
>To: "The_RadiX" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
>Sent: Wednesday, June 12, 2002 9:49 PM
>Subject: Re: [PHP] Fw: Hosting_submission
>
>
> > I am providing a free hosting service for PHP Developers.  This is
>something
> > that costs me a considerable amount of money and time to maintain, and I
>am
> > giving it away for free.
> >
> > After being abused by you time and time again, I removed your account from
> > my servers and declined your request to re-join.
> > I think that was a fair move.
> >
> > Now, if you will, please leave me alone.
> >
> > Liam
> >
> >
> >
> > - Original Message -
> > From: "The_RadiX" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, June 12, 2002 9:34 PM
> > Subject: [PHP] Fw: Hosting_submission
> >
> >
> > Well anybody who wants to join Liam Mackenzie's hosting...
> >
> >
> > Here's the touching response I got...
> >
> >
> >
> > .. Shows a great deal of maturity... Thankfully he doesn't start some
> > sort of hosting company...
> >
> >
> > After all customers would be very very upset if there was some kind of
> > publicity stunt against his company. wouldn't they?
> >
> >
> > * snigger snigger *
> >
> >
> > :)... me threatening?? pfft. no.. how could you think that...
> >
> >
> > Anyway read the email I got back below.. Notice the lovely name he cooked
>up
> > for the "From" address... very cute..
> >
> >
> >
> >
> > - Original Message -
> > From: Fuck You
> > To: The_RadiX
> > Sent: Tuesday, June 11, 2002 6:50 AM
> > Subject: Re: Hosting_submission
> >
> >
> > No!
> >
> >
> >   - Original Message -
> >   From: website
> >   To: Liam Mackenzie ([EMAIL PROTECTED])
> >   Sent: Monday, June 10, 2002 11:26 PM
> >   Subject: Hosting_submission
> >
> >
> >   User registered with these details...
> >
> > Real Name The_RadiX
> > Username spectrum
> > Domain operationenigma.org
> > Password 1ReRqipo78
> > Email [EMAIL PROTECTED]
> >
> >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
>--
>This message has been scanned for viruses and
>dangerous content by MailScanner, and is
>believed to be clean.
>ow3



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




[PHP] Array Sorting

2002-06-12 Thread Steve Buehler

I have looked through php.net and the books that I have and I am confused, 
so I hope that someone can help me out here.  I am trying to sort an array 
that I have.  I use a while statement to fill the array:
$teams[++$i][team_id]=$row->team_id;
$teams[$i][name]=$row1->name;
$teams[$i][team_sea_id]=$row->team_sea_id;

Everything goes in the array as it should,  so no problem there.  I just 
want to know how do I sort the array by the "name" column?

Thanks In Advance
Steve


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




[PHP] Extracting Variables

2002-06-13 Thread Steve Buehler

I hope that someone will be kind enough to help me on this.
I have some variables on a page that are dynamic.  I can run this to view 
the variables (from a POST) for testing:

Foreach($HTTP_POST_VARS as $key=>$value) echo("$key => $value");

and the results are:
-results-
team_number_1 => 5
sub1_1 => 10
sub2_1 => B
team_number_2 => 7
sub1_2 => 10
sub2_2 => B
team_number_3 => 29
sub1_3 => 10
sub2_3 => B
team_number_4 => 23
sub1_4 => 10
sub2_4 => B
team_number_5 => 8
sub1_5 => 10
sub2_5 => B
team_number_6 => 20
sub1_6 => 10
sub2_6 => B
team_number_7 => 9
sub1_7 => 10
sub2_7 => B
team_number_8 => 11
sub1_8 => 10
sub2_8 => B
i => 8
action => Update
-end results-

I want to do something like the following, but it does not work:
testinput();
function testinput(){
GLOBAL $HTTP_POST_VARS;
extract($HTTP_POST_VARS);
echo "i = $i";
for($c=1;$c<=$i;$c++){
echo "team_number $team_number_$c";
echo "sub1_$c = $sub1_$c";
echo "sub2_$c = $sub2_$c";
echo "sub3_$c = $sub3_$c";
echo "sub4_$c = $sub4_$c";
echo "sub5_$c = $sub5_$c";
}
}

The above gives me these results:
---results--
i = 8
team_number 1
sub1_1 = 1
sub2_1 = 1
sub3_1 = 1
sub4_1 = 1
sub5_1 = 1
team_number 2
sub1_2 = 2
sub2_2 = 2
sub3_2 = 2
sub4_2 = 2
sub5_2 = 2
team_number 3
sub1_3 = 3
sub2_3 = 3
sub3_3 = 3
sub4_3 = 3
sub5_3 = 3
team_number 4
sub1_4 = 4
sub2_4 = 4
sub3_4 = 4
sub4_4 = 4
sub5_4 = 4
team_number 5
sub1_5 = 5
sub2_5 = 5
sub3_5 = 5
sub4_5 = 5
sub5_5 = 5
team_number 6
sub1_6 = 6
sub2_6 = 6
sub3_6 = 6
sub4_6 = 6
sub5_6 = 6
team_number 7
sub1_7 = 7
sub2_7 = 7
sub3_7 = 7
sub4_7 = 7
sub5_7 = 7
team_number 8
sub1_8 = 8
sub2_8 = 8
sub3_8 = 8
sub4_8 = 8
sub5_8 = 8
end results


Thank You in Advance
Steve


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




Re: [PHP] Ensim with PHP and MySQL

2002-06-24 Thread Steve Buehler

I have been running several servers using the ensim software and have had 
no problem with PHP and/or MySQL.  Well, none that was the fault of PHP or 
MySQL.  Neither one should give you a problem upgrading, except that you 
will have to edit the httpd_vwh.conf file by hand since both PHP and MySQL 
(if they upgrade the httpd.conf file) don't know it is now httpd_vwh.conf.

Steve

At 12:56 PM 6/24/2002 -0400, you wrote:
>Has anyone ever used Ensim on their server with PHP and MySQL.
>
>I am looking at purchase Ensim to management my web sites.  It looks like a
>great product, but because it is embedded into RedHat, I am worried about
>its flexible.
>
>If I want to upgrade my PHP, MySQL or Apache on it. It doesn't look like it
>is that easy.
>
>In short I just want to know if anyone out there is using Ensim and if so,
>do you like it.
>
>Thanks, Mark.
>
>--
>_
>Mark McCulligh, Application Developer / Analyst
>Sykes Canada Corporation www.SykesCanada.com
>(888)225-6824 ex. 3262
>[EMAIL PROTECTED]
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>--
>This message has been scanned for viruses and
>dangerous content by MailScanner, and is
>believed to be clean.
>ow3



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




[PHP] php,up2date and mcrypt

2003-09-08 Thread Steve Buehler
I have a new RedHat Linux v.9 server that gets its php through 
'up2date'.  I want the ability to use mcrypt with php.  I thought that I 
read somewhere a way to do this without having to recompile PHP.  Can 
anybody point me to the right place or explain to me how to do this?

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


[PHP] if statement

2003-09-30 Thread Steve Buehler
I have an "if" statement that I would like to make a little bit more 
generic.  This is how the statement looks now.

if($k2b=="/etc/bind/options.conf.wp" || $k2b=="/etc/bind/rndc.conf.wp" || 
$k2b=="/etc/bind/keys.conf.wp"){
	do this1
}else{
	do this2
}

What I would like to do is to have an array earlier in the script of just 
the items that it is checking for so that it can be more easily changed if 
I put this out as free or shareware software.  Here is what it might look 
like, but I know that if this is possible, it probably won't look at all 
like this:

$array=("/etc/bind/options.conf.wp","/etc/bind/rndc.conf.wp","/etc/bind/keys.conf.wp");
if($k2b==$array){
do this1
}else{
do this2
}
I think that might make enough since to see if someone can help me on 
this.  This would be real nice for me in use in a lot of scripts.

Thanks
Steve
PHP / MySQL

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


Re: [PHP] if statement

2003-09-30 Thread Steve Buehler
To Brad, Marek and Curt (and anybody who responds after this)
Thank you so much for your help.  This is going to help me out so 
much in a lot of my scripts.  It will sure make them a little.Noa 
LOT more portable now.

Thanks
Steve
At 11:26 AM 9/30/2003, you wrote:
Steve Buehler wrote:

[snip]

$array=("/etc/bind/options.conf.wp","/etc/bind/rndc.conf.wp","/etc/bind/keys.conf.wp"); 

if($k2b==$array){
do this1
}else{
do this2
}
You are close. Check out in_array(). http://us4.php.net/in_array

if (in_array($kb2, $array))

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


Re: [PHP] attach file with mail() function??

2003-10-06 Thread Steve Buehler
At 06:34 PM 10/5/2003, Roy W wrote:
Is there a way to attach a file with the mail() function?

Thanks!
Yes.  Take a look at http://www.php.net/mail

Steve

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


[PHP] duplicating databases

2003-10-08 Thread Steve Buehler
	I am running PHP/MySQL for a program that I am writing.  We will have 
100's or 1000's of databases that will be duplicates in structure.  The 
problem is when I make a change to the database, I have to go to every 
database manually and make the change.  All of the databases start with 
"a_" and are on the same server.  I would like to be able to have one 
master database and then run a script when I make a change to it that will 
get the structure of the master database and check all of the other 
databases to make sure that their structures match.  If not, it will make 
the change to the other databases.  Does anybody know if there is all ready 
a program out there that would do this?  Can anybody point me in the right 
direction?  Or if it is only a few lines of script that somebody all ready 
has to do this, can you share it?

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


Re: [PHP] \n \t don't work!!!

2003-10-13 Thread Steve Buehler
If you want it to work with \n, then you will need to use the  
tags.  Otherwise you need to translate the \n's into  tags.  \n is NOT 
an html tag so when you print them to the browser, it adds lines to the 
source, but as you might already know, a new line in the source of an html 
page does NOT give a new line in the output unless you use an html tag that 
would give the new line.

Steve

At 06:39 AM 10/13/2003, you wrote:

> They do work but you will not see that in the rendered html page (in a
> browser). Have a look at the source of the produced page and you will see
> the linebreaks.
 The page source shows:



> I suppose your manual was not intending on making html pages, or it was a
> very lousy one.
I do want to just make a html page.

The following is my source code, and what I expect is to see the new lines
when the \n appears, ok?
*


?>


**
So, what's the problem here?

cheers,

feng

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
This message has been scanned for viruses and
dangerous content by the MailScanner at ow4, and is
believed to be clean.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] \n \t don't work!!!

2003-10-13 Thread Steve Buehler
Do what I do, use both the \n and the  tags.  I am not worried about 
anybody else thinking the source is nice looking, I do it for debugging so 
that I can see how the source comes out in a readable format.

Steve

At 06:48 AM 10/13/2003, you wrote:
Ok, Now I see what happen (maybe).

So, the "\n" is not for the browser output, but for the *view source*? So,
it's different from the "echo "?
If so, what's the deal to do that? --- Makes it look nice if the user view
the source code?
cheers,

feng

- Original Message -
From: "Chris Hayes" <[EMAIL PROTECTED]>
To: "Wang Feng" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, October 13, 2003 9:29 PM
Subject: Re: [PHP] \n \t don't work!!!
> At 13:22 13-10-03, you wrote:
> >Guys,
> >
> >These codes are copied from the manual:
> >
> >*
> >  echo ("this is the simplest, an SGML processing instruction\n");
> >  echo "This spans
> >  multiple lines. The newlines will be
> >  output as well";
> >  echo "This spans\nmultiple lines. The newlines will be\noutput as
well.";
> >**
> >
> >None of them works.
> They do work but you will not see that in the rendered html page (in a
> browser). Have a look at the source of the produced page and you will see
> the linebreaks.
> I suppose your manual was not intending on making html pages, or it was a
> very lousy one. I would recommend reading the first chapters of the manual
> on www.php.net to get a general idea of PHP. Then read some tutorials on
> for instance phpfreaks.com.
>
>
> >  I mean there're not any new lines generated in my
> >browser and I have to use the echo"" to print a new line. But why
> >doesn't the \n work? BTW, the \t doesn't work either.
> >
> >(WindowsXP Pro + PHP Version 4.1.1)
> >
> >
> >Please advise.
> >
> >
> >cheers,
> >
> >feng
> >
> >--
> >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
--
This message has been scanned for viruses and
dangerous content by the MailScanner at ow4, and is
believed to be clean.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] \n \t don't work!!!

2003-10-13 Thread Steve Buehler
To give tabs in html, you might want to try using       
instead of \t

Steve

At 06:57 AM 10/13/2003, you wrote:
Wang Feng wrote:
 The page source shows:



The problem might be right here --+
(closing html tag)|
  |
Hello World Program




**
Simple:


In html you cannot use newlines for formating, use  if you need
newline. You can use  tag for preformated text however.
>
> So, what's the problem here?
>
>
> cheers,
>
> feng
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
This message has been scanned for viruses and
dangerous content by the MailScanner at ow4, and is
believed to be clean.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Error 1148 and 1045

2003-10-28 Thread Steve Buehler
I have upgraded my mysql  version to 3.23.58 and am coming up with a couple 
of errors using phpmyadmin to "Insert data from a textfile into table"  I 
didn't get this on the previous versions of mysql.  Here are the errors:

SQL-query :

LOAD DATA INFILE '/tmp/phpKFlQ2b' INTO TABLE `annsubscribers` FIELDS 
TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\r\n'(
`email`
)

MySQL said:

#1045 - Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)

---

SQL-query :

LOAD DATA LOCAL INFILE '/tmp/phpsj1WGM' INTO TABLE `annsubscribers` FIELDS 
TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\r\n'(
`email`
)

MySQL said:

#1148 - The used command is not allowed with this MySQL version

---
Can anybody shed some light on how to fix this?  I presume the first is a 
permission problem that is from the new way that MySQL handles things.  The 
second is just a mystery to me.

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


Re: [PHP] Problems with session_id() in Windows?

2003-11-09 Thread Steve Buehler
Check your php.ini file and see where it is trying to save your sessions 
at.  I "think" it is trying to save them to /tmp.  You might have to make 
sure that directory exists.  You might also have to put it in as the full 
path.  ex.C:\tmp.  Make sure to restart your apache, or whatever Web 
Server you are running after making this change.

Steve

At 12:10 AM 11/9/2003, you wrote:
Hello all:

We recently ported an application from Linux to Windows and had a few
sessions-handling issues (we were going from PHP 4.1.2 Linxu to PHP 4.3.3
Windows).
We traced this to PHP's session_id() function. It worked fine in Linux, but
apparently not at all in windows, or not as expected.
Has anyone seen or heard of this? The notes in the docs didn't tell me
anything special about this.
-- steve lane

--
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] single quotes in database

2003-11-07 Thread Steve Buehler
I am using PHP/MySQL and am having a problem.  We have some names and 
addresses in the database that have single quotes in them.  For 
instance.  There is a town around here called "Lee's Summit".  Also names 
like "O'connel".  When I pull from the database it skips these because of 
the quotes.  I know there is something that I have seen before about this, 
but can't find it now.  Can anybody help me?  I really hope this makes 
since because I am sick today and am having a hard time thinking 
straight.  Is it something that I will have to fix when putting things into 
the database?  I am hoping on being able to fix this when going in and when 
coming out of the database so that I don't have to go back and redo all the 
ones that are already in the database.

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


[PHP] stepping through alphabet

2003-11-19 Thread Steve Buehler
I am using PHP 4.3.4 and am trying to come up with a function that will 
step through the alphabet so that I get a menu/links that can be clicked on 
like below:
A
B
C
etc...

I am sure that this has been done and is probably pretty easy.  Any help 
here would be appreciated.  I know that I could just create a link for each 
letter, but I would like to learn to do this so that I can make code 
shorter.  Putting each letter into an array and steping through the array 
will work, but can it be done by telling a loop to start at A and end at Z?

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


RE: [PHP] stepping through alphabet

2003-11-19 Thread Steve Buehler
Yes, I found that the loop was written kind of backwards and would create a 
never ending loop.  I never thought to try setting $letter='A' before.  I 
didn't think you could loop through the Alphabet like that.  But I did a 
little changing to your loop and it works fine like this now:
$letter='A';
for($i=0;$i<=25;$i++){
echo $letter++." ";
}

Thank You So Much
Steve
At 08:24 AM 11/19/2003, you wrote:
[snip]
for ($letter = 'A'; $letter++; $letter <= 'Z')
 echo "$letter\n";
[/snip]
I tested this and found two small problems. The code works if you do
this (I was myself amazed that letters would increment)
for($letter = 'A'; $letter < 'Z'; $letter++){
echo $letter . "\n";
}
The problem seems to be that you cannot use <='Z' for some reason, as
the array becomes quite lengthy, as if 'Z' doesn't work properly. But,
if I do this
for($letter = 'A'; $letter < 'Z'; $letter++){
echo $letter . "\n";
}
echo $letter . "\n";
The second echo statement echos the 'Z' properly.

--
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] stepping through alphabet

2003-11-19 Thread Steve Buehler
YES  That is the kind of code that I was looking for.  I never thought 
you could do it like that either.  Meaning putting 2 things to do 
($letter++ and $i++) into the loop in this fashion.  This looks so much 
cleaner to me.  Here is my final function now.
for($letter = 'A', $i = 0; $i <= 25; $letter++, $i++ ){
echo "$letter ";
}

Thank You So Much
Steve
At 08:27 AM 11/19/2003, you wrote:
Sophie Mattoug wrote:

Maybe you can try this
for ($letter = 'A'; $letter++; $letter <= 'Z')
echo "$letter\n";
Hope this helps
The for loop is backwards

for ($letter = 'A'; $letter <= 'Z'; $letter++)

However, I don't think that will work, you probably need to do something 
like this (untested)

for ( $letter = 'A', $i = 0; $i <= 25; $letter++, $i++ )

Steve Buehler wrote:

I am using PHP 4.3.4 and am trying to come up with a function that will 
step through the alphabet so that I get a menu/links that can be clicked 
on like below:
A
B
C
etc...

I am sure that this has been done and is probably pretty easy.  Any help 
here would be appreciated.  I know that I could just create a link for 
each letter, but I would like to learn to do this so that I can make 
code shorter.  Putting each letter into an array and steping through the 
array will work, but can it be done by telling a loop to start at A and 
end at Z?

Thanks
Steve


--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] stepping through alphabet

2003-11-19 Thread Steve Buehler
I was hoping for something that looked (at least to me) a little 
cleaner.  Someone else gave me the answer and here is my final code that 
works out just great for me.
for($letter = 'A', $i = 0; $i <= 25; $letter++, $i++ ){
echo "$letter ";
}

Amazing what I learned today. :)  I love this list and its people.

Thanks for your help
Steve
At 08:15 AM 11/19/2003, you wrote:

Create a $letters array and the loop through it like this:

$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');

foreach($letters as $letter)
{
echo "$letter\n";
}
Luis
-Original Message-
From: Steve Buehler [<mailto:[EMAIL PROTECTED]>mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 19, 2003 8:03 AM
To: PHP
Subject: [PHP] stepping through alphabet
I am using PHP 4.3.4 and am trying to come up with a function that will
step through the alphabet so that I get a menu/links that can be clicked on
like below:
A
B
C
etc...
I am sure that this has been done and is probably pretty easy.  Any help
here would be appreciated.  I know that I could just create a link for each
letter, but I would like to learn to do this so that I can make code
shorter.  Putting each letter into an array and steping through the array
will work, but can it be done by telling a loop to start at A and end at Z?
Thanks
Steve
--
PHP General Mailing List (<http://www.php.net/>http://www.php.net/)
To unsubscribe, visit: 
<http://www.php.net/unsub.php>http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] operating system type

2002-04-25 Thread Steve Buehler

Does anybody know if there is a way for php to get the operating system 
type from a linux box?  I know how to get the kernel version, but not the 
operating version/type.
example.  RedHat Linux 6.1 or 6.2 or 7.1, etc


Thank You
Steve


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




Re: [PHP] operating system type

2002-04-25 Thread Steve Buehler

Thanks, but those just say "Linux".  I was looking for what version.  Like 
"RedHat 7.0".

Thanks
Steve

At 12:51 PM 4/25/2002, you wrote:
>Look at a phpinfo() page...seems like there should be something that says
>this.
>
>Looked for you...$HTTP_ENV_VARS["OSTYPE"] or $_ENV["OSTYPE"] should work for
>you.
>
>---John Holmes...
>
>- Original Message -
>From: "Steve Buehler" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Thursday, April 25, 2002 1:31 PM
>Subject: [PHP] operating system type
>
>
> > Does anybody know if there is a way for php to get the operating system
> > type from a linux box?  I know how to get the kernel version, but not the
> > operating version/type.
> > example.  RedHat Linux 6.1 or 6.2 or 7.1, etc
> >
> >
> > Thank You
> > Steve
> >
> >
> > --
> > 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] operating system type

2002-04-25 Thread Steve Buehler

I am running php version 4.06

Steve

At 01:05 PM 4/25/2002, Nathan wrote:
>What version of PHP?
>
>- Original Message -
>From: <mailto:[EMAIL PROTECTED]>Steve Buehler
>To: <mailto:[EMAIL PROTECTED]>Nathan
>Sent: Thursday, April 25, 2002 12:00 PM
>Subject: Re: [PHP] operating system type
>
>Yes, I can get it from the /etc/issue file.  I don't have an 
>_ENV["MACHTYPE"] listed when doing an phpinfo()
>
>Thanks
>Steve
>
>At 12:48 PM 4/25/2002, you wrote:
>>phpinfo() is telling me this...
>>_ENV["MACHTYPE"] i386-redhat-linux-gnu
>>
>>It doesn't give the version though. The System section info would be 
>>great, but I don't know that you can access that.
>>
>>
>>- Original Message -
>>From: "Steve Buehler" <<mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]>
>>To: <<mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]>
>>Sent: Thursday, April 25, 2002 11:31 AM
>>Subject: [PHP] operating system type
>>
>>Does anybody know if there is a way for php to get the operating system
>>type from a linux box?  I know how to get the kernel version, but not the
>>operating version/type.
>>example.  RedHat Linux 6.1 or 6.2 or 7.1, etc
>>
>>
>>Thank You
>>Steve
>>
>>
>>--
>>PHP General Mailing List (<http://www.php.net/>http://www.php.net/)
>>To unsubscribe, visit: 
>><http://www.php.net/unsub.php>http://www.php.net/unsub.php



Re: [PHP] operating system type

2002-04-25 Thread Steve Buehler

Good points.  I guess i will just have to hope that the /etc/issue file is 
correct.

Thanks
Steve

At 01:02 PM 4/25/2002, you wrote:
>On Thu, 25 Apr 2002, Steve Buehler wrote:
> > Does anybody know if there is a way for php to get the operating system
> > type from a linux box?  I know how to get the kernel version, but not the
> > operating version/type.
> > example.  RedHat Linux 6.1 or 6.2 or 7.1, etc
>
>That's probably pretty tricky. What is a Redhat installation? What is it
>after half the files have been gutted and replaced with packages from
>elsewhere or source-built binaries?
>
>Once /etc/issue gets changed, there's nothing that conclusively identifies
>the machine as RedHat except for an arbitrary assortment of files and
>directories that may or may not be intact.
>
>miguel
>
>
>--
>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] Ordering output

2002-04-25 Thread Steve Buehler

I am using PHP to access a mysql database.  I was told that what I need to 
do needs to be done in PHP and not mysql.  I can get mysql to order things 
like this:
Select * from $temp2 where sea_id = '$sea_id' order by pts DESC
The problem is that if there is a tie (as in ranking 4 and 5 below), I need 
to run another query to check to see if something else has happened and if 
it happened, than that team would be a higher rank than the other.  It is 
possible to have more than 2 teams tieing too.  So I have to be able to 
determine what order the teams should be in.


Division Standings
RankWLTFTeamPtsSFSASD
16210OSC Spirit Gold3959 3524
25400KC Legends White I3043 412
34410OSC Spirit White2751 510
43420BV Stars Gold II2439 48-9
53420BV Stars Gold I2441 52-11
62521KC Legends White II1843 48-5


Thank You in advance
Steve



Re: [PHP] Ordering output

2002-04-25 Thread Steve Buehler

First off, thank you Miguel and Nathan for responding.

The ordering changes.  Here is what I have for my query:
 $searchStmt="Select * from $temp2 where sea_id = '$sea_id' 
order by pts DESC";
 if($aa){$searchStmt .= ",$aa DESC";}
 if($bb){$searchStmt .= ",$bb DESC";}
 if($cc){$searchStmt .= ",$cc DESC";}
 if($dd){$searchStmt .= ",$dd DESC";}
 $searchStmt .= ",name ASC";

$aa, $bb, $cc and $dd will change depending on how the division does their 
ranking.  For the most part, I can sort with the mysql query as 
above.  There is one variable that can't be sorted (at least I was told it 
can't), by this query.  If there is a tie, I have to check to see if the 
teams have played each other and if they have, than whomever won that game 
will be ahead in the rankings.
 Nathan, on this list, suggested using a loop for this.  I am not 
that proficient in PHP to do that.  I could probably do that if there would 
only be two teams that might be in a tie, but you actually can have 
multiple ties for positions and/or more than 2 teams tieing for one 
position.  I have to program with the possibility that all teams can tie 
and than it has to loop through and get the games by who won in a one on 
one game.

Thanks
Steve

At 04:03 PM 4/25/2002, Miguel Cruz wrote:
>On Thu, 25 Apr 2002, Steve Buehler wrote:
> > I am using PHP to access a mysql database.  I was told that what I need to
> > do needs to be done in PHP and not mysql.  I can get mysql to order things
> > like this:
> > Select * from $temp2 where sea_id = '$sea_id' order by pts DESC
> > The problem is that if there is a tie (as in ranking 4 and 5 below), I 
> need
> > to run another query to check to see if something else has happened and if
> > it happened, than that team would be a higher rank than the other.  It is
> > possible to have more than 2 teams tieing too.  So I have to be able to
> > determine what order the teams should be in.
>
>Well, we don't know what the secondary sorting criterion is, but my guess
>is that you could have your database take care of that too in the same
>query.
>
>miguel


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




Re: [PHP] Ordering output

2002-04-25 Thread Steve Buehler

Thank you for wanting to try and tackle this in PHP/MySQL.  I will include 
the code that I have and also the sql for the tables.

CREATE TABLE b863765470 (
team_id int(10) default NULL,
  name varchar(30) default NULL,
  sea_id int(10) default NULL,
  w int(10) default '0',
  l int(10) default '0',
  t int(10) default '0',
  f int(10) default '0',
  s int(10) default '0',
  pts int(10) default '0',
  score_for int(10) default '0',
  score_against int(10) default '0',
  score_differential int(10) default '0',
  max_pt int(10) default '0',
  UNIQUE KEY team_id(team_id) ) TYPE=MyISAM;

INSERT INTO b863765470 VALUES (37, 'BV Stars Gold I', 1, 3, 4, 2, 0, 0, 24, 
41, 52, -11, 0);
INSERT INTO b863765470 VALUES (38, 'BV Stars Gold II', 1, 3, 4, 2, 0, 0, 
24, 39, 48, -9, 0);
INSERT INTO b863765470 VALUES (39, 'KC Legends White I', 1, 5, 4, 0, 0, 0, 
30, 43, 41, 2, 0);
INSERT INTO b863765470 VALUES (40, 'KC Legends White II', 1, 2, 5, 2, 1, 0, 
18, 43, 48, -5, 0);
INSERT INTO b863765470 VALUES (41, 'OSC Spirit Gold', 1, 6, 2, 1, 0, 0, 39, 
59, 35, 24, 0);
INSERT INTO b863765470 VALUES (42, 'OSC Spirit White', 1, 4, 4, 1, 0, 0, 
27, 51, 51, 0, 0);


Here is my Select statment
Select * from $temp2 where sea_id = '$sea_id' order by pts DESC,
score_for DESC, score_against DESC, score_differential DESC, max_pt DESC, 
name ASC


RankWLTFTeamPtsSFSASD

 $i=1;
 while (($row = mysql_fetch_object($result))){
 echo "$i
 $row->w
 $row->l
 $row->t
 $row->f
 $row->name
 $row->pts
 $row->score_for
 $row->score_against
 $row->score_differential";
 $i++;



Problem is, if they decide that HTH (Head to Head which is that if they are 
tied up to this point, than I have to check to see if they have played each 
other and if they have, who won) is more important than score_for or any of 
the other orderings, than it has to do the loop to see if they have played 
each other.  I hope that makes since.  I could write out all the criteria 
if you need, but I am hoping that this will be enough.

Thanks
Steve




At 04:08 PM 4/25/2002, you wrote:

>On Thursday, April 25, 2002, at 04:54  PM, Steve Buehler wrote:
>
>>I am using PHP to access a mysql database.  I was told that what I need
>>to do needs to be done in PHP and not mysql.  I can get mysql to order
>>things like this:
>>Select * from $temp2 where sea_id = '$sea_id' order by pts DESC
>>The problem is that if there is a tie (as in ranking 4 and 5 below), I
>>need to run another query to check to see if something else has happened and
>>if it happened, than that team would be a higher rank than the other.
>>It
>>is possible to have more than 2 teams tieing too.  So I have to be able 
>>to determine what order the teams should be in.
>
>I would like to try to tackle this -- can you give me a dump of this table 
>that I can work with?  No guarantees, though.
>
>
>Erik
>
>
>
>
>
>
>Erik Price
>Web Developer Temp
>Media Lab, H.H. Brown
>[EMAIL PROTECTED]


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




Re: [PHP] register_globals=Off Question

2002-04-28 Thread Steve Buehler

Looks like you forgot your ticks ' around the PHP_SELF.  If I am correct, 
it should be $_SERVER['PHP_SELF'].
Either way, you might want to try this.  Somebody else posted it before and 
I have been using it so that no matter what version of PHP my program runs 
on, it should work.
if (isset($_SERVER)) $PHP_SELF = $_SERVER['PHP_SELF'];

Steve

At 05:58 PM 4/28/2002, Kirk Babb wrote:
>How do I use $PHP_SELF with register_globals off?  I looked up the
>documentation on php.net but haven't gotten this line of code to work:
>
>
>
>I get this error instead:
>
>[28-Apr-2002 16:33:31] PHP Parse error:  parse error, expecting `T_STRING'
>or `T_VARIABLE' or `T_NUM_STRING' in - on line 140
>
>what am I doing wrong?  thanks,
>
>Kirk
>
>
>
>--
>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] $this->

2002-04-29 Thread Steve Buehler

I am not an expert at PHP and have been learning it through questions, 
books, online help, etc  I guess like most people. :)  Anyway, I see a 
lot of scripts that use $this->something and was wondering if this was just 
another variable or if the "->" has any special meaning.  One script from 
the PHPLIB (menu.inc) has this:
$this->setup();
and there are no other times in that .inc file that lists that.  The only 
other thing that comes close is just the "funtion setup()".  This is not 
the only program that I see this in and am just wondering about it and 
trying to see if it is something that I should be using in my scripts.  The 
only time that I use this is when getting results from a mysql query like this:
$result=mysql_query("SELECT $team from games where game_id = '$game_id'");
while (($row = mysql_fetch_object($result))){
$input = $row->$team;

Hopefully somebody can explain this to me.

Thanks in Advance
Steve


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




Re: [PHP] $this->

2002-04-29 Thread Steve Buehler

Thanks to Natalie, Jason and John.  Plus anybody who responds after this 
email.  I will have to do some reading up on this now to see if and where i 
can use this.

Thanks Again
Steve

At 09:50 AM 4/29/2002, 1LT John W. Holmes wrote:
>It's used in object oriented programming (OOP) with classes. $this refers to
>the current object.
>
>So $this->setup() in PHPLib is referring to the setup() function within the
>object.
>
>You can get a better explanation and examples by reading the manual page on
>OOP.
>
>http://www.php.net/manual/en/language.oop.php
>
>---John Holmes...
>
>- Original Message -
>From: "Steve Buehler" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Monday, April 29, 2002 10:37 AM
>Subject: [PHP] $this->
>
>
> > I am not an expert at PHP and have been learning it through questions,
> > books, online help, etc  I guess like most people. :)  Anyway, I see a
> > lot of scripts that use $this->something and was wondering if this was
>just
> > another variable or if the "->" has any special meaning.  One script from
> > the PHPLIB (menu.inc) has this:
> > $this->setup();
> > and there are no other times in that .inc file that lists that.  The only
> > other thing that comes close is just the "funtion setup()".  This is not
> > the only program that I see this in and am just wondering about it and
> > trying to see if it is something that I should be using in my scripts.
>The
> > only time that I use this is when getting results from a mysql query like
>this:
> > $result=mysql_query("SELECT $team from games where game_id = '$game_id'");
> > while (($row = mysql_fetch_object($result))){
> > $input = $row->$team;
> >
> > Hopefully somebody can explain this to me.
> >
> > Thanks in Advance
> > Steve
> >
> >
> > --
> > 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] javascript and PHP

2002-04-29 Thread Steve Buehler

Does anybody know of a good/short tutorial about passing variables from 
JavaScript to/from PHP?  For example, how to do the following:




data = "hello world";



";
?>



The above might at least give me a clue.  Just a note.  I really know 
nothing to speak of about JavaScript.

Thanks in Advance
Steve



[PHP] javascript and PHP

2002-04-29 Thread Steve Buehler

Ok.  My last post didn't go throught the list software because of the 
tags.  I am replacing the "<" and ">"'s with *'s now so that hopefully it 
will go through so that people can see it.

--Original message
Does anybody know of a good/short tutorial about passing variables from 
JavaScript to/from PHP?  For example, how to do the following:

*html*
*head*
*SCRIPT LANGUAGE="JavaScript"*
$data = "hello world";
*/script*
*/head*
*body*
*?
echo "$data*br*";
?*
*/body*
*/html*

The above might at least give me a clue.  Just a note.  I really know 
nothing to speak of about JavaScript.

Thanks in Advance
Steve


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




Re: [PHP] windows development -> linux production

2002-04-29 Thread Steve Buehler

That question can be difficult to answer.  It all depends on what you are 
developing.  I presume that since this is a PHP list, that you are 
developing PHP pages.  On my WinXP laptop, I run Apache, MySQL and 
PHP.  When I have the program finished, I upload it to the server and have 
had no problems in doing this so far.  I am not trying to do anything with 
mail though.  Not sure if there is a sendmail for Windows or not.  I think 
for that you would use "Blat" or something like that.  Again, it really 
depends on what you are programming.  I am not proficient enough to write 
some of the more complex programs that the more experienced people do.

Steve

At 04:05 PM 4/29/2002, Lee P Reilly wrote:
>Hi,
>
>Just a quick question. I'm developing on a Windows machine right now,
>and will later move it onto Linux. Should I expect to run into major
>difficulty at all? I anticipate a few problems - mainly altering the
>file system interaction, maybe even database connections.
>
>I don't know if anybody else works this way, but if so... did you run
>into any problems, or was it a relatively smooth ride?
>
>Cheers,
>
>Lee
>
>
>--
>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] Virus I-Worm/Klez.H (Someone does not like me)

2002-05-03 Thread Steve Buehler

To find out about viruses, you might want to go to a site that deals in 
them, like http://www.mcafee.com

Steve

At 06:08 AM 5/3/2002, r wrote:
>Hey all,
>In the last 14 days i got 9 emails with this virus "I-Worm/Klez.H", though
>my virus scanner detected it and told me to trash it, i am really curious
>can anybody tell me how destructive this virus is and what exactly does it
>do? also have any body else on this list recieved this?
>
>Please also note my apoligies for asking this on a PHP list, but other than
>being computer dudes and dudettes out there, you are also people, and I
>consider a lot of you my net pals, after all we all help each other out
>right? and isnt that what friends do?
>
>Cheers,
>- Ryan
>
>
>--
>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] Destroying Sessions

2002-05-09 Thread Steve Buehler

Best bet is to go to any book store that carries programming books and pick 
up a book on PHP.  There are so many different things that you need to know 
that nobody can mention them all here.  The other option is to go to 
http://www.php.net and read everything the site has.
$var = $value
assigns $value to the variable $var.
$var == $value
tests to see if $var and $value are equal.

Steve

At 07:00 PM 5/8/2002, Chris Knipe wrote:
>Nevermind
>
>For it sorted...   Does anyone have any reference to any documentation on
>how to use if statements properly?
>
>I know this sounds silly now, but when exactly do you use $var = $value, or
>$var == $value, and all the other operators?
>
>I'd really like to read up on this if someone can point me to a good
>reference... I'm having the same type of situations with Perl as well...
>Maybe it's just be who is stupid here... But hey, I'm trying :)
>
>--
>me
>
>
>- Original Message -
>From: "Chris Knipe" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Thursday, May 09, 2002 1:43 AM
>Subject: [PHP] Destroying Sessions
>
>
> > Hi all,
> >
> > Need some more help here unfortunately.  This time, I did check the
>manual,
> > and well, I'm not to sure what I'm doing wrong...
> >
> > From a global (shared) script, I start a session
> >
> > 
> >
> > I register session data, and use them throughout the site
> >
> > 
> >
> > Now, how on earth do I destroy that session?
> >
> >  >   include('../include/functions.inc');
> >   session_unset();
> >   $_SESSION = array();
> >   session_destroy();
> >   header ("Location: /index.php");
> > ?>
> >
> > I've tried all of that, to no prevail, the session remains, and my values
> > registered in $_SESSION['whatever'] still remains??
> >
> > Any help / pointers, much needed and appreciated.
> >
> > --
> > me
> >
> >
> >
> > --
> > 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] multi-dimensional array

2002-05-09 Thread Steve Buehler

I am trying to learn some new things in the hopes that it would help me 
with my mysql/PHP programming.  The following code gives me an error: " 
Warning: Illegal offset type in z.php on line 25 ".

$result=mysql_query("SELECT * FROM division");
while(($row=mysql_fetch_object($result))){
$div_id=$row->div_id;
$array=array("sub1" => $row->sub1,
 "sub1d" => $row->sub1d,
 "sub2" => $row->sub2,
 "sub2d" => $row->sub2d,
 "sub3" => $row->sub3,
 "sub3d" => $row->sub3d,
 "sub4" => $row->sub4,
 "sub4d" => $row->sub4d,
 "sub5" => $row->sub5,
 "sub5d" => $row->sub5d,
 "game_length" => $row->game_length);
// The following is the line 25
$division[$div_id][$array]=array();
}

What I am trying to do is to be able to later call $division[$div_id][sub5] 
etc...  I sure hope that this can be done.  If not, I will just have to 
stick with temporary tables.

Thanks
Steve



Re: [PHP] Destroying Sessions

2002-05-09 Thread Steve Buehler

 Nokeep writing to the list.  Next time, you might actually 
give the example like you did here so that, hopefully someone will be able 
to answer you better (I have a problem of not including enough 
myself).  The first question, in itself, sounded like a basic question.  I 
would be surprised if you didn't get a lot of heckling about it.  I tried 
to keep my answer from sounding bad to you the first time because I have 
been there and still am there.  Most of us have, but some won't admit 
it.  Sometimes I forget it too. :)
 I am not an expert at PHP / MySQL.  To me it would sound like the 
one = is assigning the $VerifyPasword[ContactID] whatever is in 
$_SESSION['ContactID'] which would mean that the else part would never be 
executed.  Honestly though, there is a lot that I don't know.  I know very 
little compared to how much I don't know.  So I will also post this to the 
list and hopefully someone will know the answer to this.

At 08:09 PM 5/9/2002, "Chris Knipe" <[EMAIL PROTECTED]> wrote:
>I don't want to keep flooding the mailing lists now with my crap, and I do
>hope you don't mind me emailing you privately, but these if statements are
>annoying to say the lease.
>
> >From what I read on php.net (as well as on various other documents for other
>languages like C, and Perl), I am using if statements correctly - syntax
>wise at least.
>
>What baffles me, is
>
> while ($VerifyPassword = mysql_fetch_array($PasswordCheckSQL)) {
>   // Compare UserIDs
>   if ($VerifyPasword[ContactID] = $_SESSION['ContactID']) {
> $_SESSION['Authenticated'] = "True";
> $AuthenticationFailure = "False";
>   } else {
> $_SESSION['Authenticated'] = "False";
> $AuthenticationFailure = "True";
>   }
>
>Works ($VerifiyPassword[ContactID] comes out of a MySQL Lookup,
>$_SESSION['ContactID'] was previously, also looked up via a MySQL Query).
>However, from what I understand in the documentation, in this case, the if
>statement should be '==' in which case, it doesn't work ?!?!?!?!?!?!?  This
>is exactly what I am talking about, and why it is so confusing.  Everywhere,
>I use either a double =, or triple = in the if statements, with a ! to use
>the is "not" true...  Only in this specific statement, the only way I can
>get it to work, was with a single =.  Now what makes that if statement so
>special over the others, that this one requires a single = and not a double
>like all the other hundreds I have in my code?
>
>:)  Thanks.
>
>--
>me
>
>
>- Original Message -
>From: "Steve Buehler" <[EMAIL PROTECTED]>
>To: "Chris Knipe" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
>Sent: Thursday, May 09, 2002 11:04 PM
>Subject: Re: [PHP] Destroying Sessions
>
>
> > Best bet is to go to any book store that carries programming books and
>pick
> > up a book on PHP.  There are so many different things that you need to
>know
> > that nobody can mention them all here.  The other option is to go to
> > http://www.php.net and read everything the site has.
> > $var = $value
> > assigns $value to the variable $var.
> > $var == $value
> > tests to see if $var and $value are equal.
> >
> > Steve
> >
> > At 07:00 PM 5/8/2002, Chris Knipe wrote:
> > >Nevermind
> > >
> > >For it sorted...   Does anyone have any reference to any documentation on
> > >how to use if statements properly?
> > >
> > >I know this sounds silly now, but when exactly do you use $var = $value,
>or
> > >$var == $value, and all the other operators?
> > >
> > >I'd really like to read up on this if someone can point me to a good
> > >reference... I'm having the same type of situations with Perl as well...
> > >Maybe it's just be who is stupid here... But hey, I'm trying :)
> > >
> > >--
> > >me
> > >
> > >
> > >- Original Message -
> > >From: "Chris Knipe" <[EMAIL PROTECTED]>
> > >To: <[EMAIL PROTECTED]>
> > >Sent: Thursday, May 09, 2002 1:43 AM
> > >Subject: [PHP] Destroying Sessions
> > >
> > >
> > > > Hi all,
> > > >
> > > > Need some more help here unfortunately.  This time, I did check the
> > >manual,
> > > > and well, I'm not to sure what I'm doing wrong...
> > > >
> > > > From a global (shared) script, I start a

Re: [PHP] eregi(mail)

2002-05-10 Thread Steve Buehler


function check_input($array){
 global $HTTP_REFERER;
 $valid = 1;
 if(gettype($array)=="array") {
 while (list($index, $subarray) = each($array) ) {
 if(ereg("required_", $index) && (($subarray == "") 
|| ($subarray == " "))) {
 $index = ereg_replace("required_", " ", 
$index);
 $index = ereg_replace("_", " ", $index);
 echo"
There is a problem with your submission. The field $index is required, 
please go back and fill in the form. (Or press the back button on your browser)
";
 $valid = 0;
 return 0;
 exit;
 }elseif(eregi("email", $index)){
 
if(ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.'@'.'[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'.'[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$',
 
$subarray)){
 $email_check = 1;
 }else{
 $index = ereg_replace("required_", 
" ", $index);
 echo"
There is a problem with your submission. The E-mail address you provided, 
$subarray, does not appear to be valid, please go back and give a valid 
address. (Or press the back button on your browser)
";
 return 0;
 exit;
 }
 }else{
 $email_check = 10;
 }
 }
 if($valid == "1" && ($email_check == "1" || $email_check 
== "10")) {
 return 1;
 }else{
 return 0;
 }
 }
}



At 11:48 AM 5/10/2002, you wrote:
>Does anyone have a decent eregi statement for
>validating e-mail addresses? I've tried the ones on
>the site, but there seems to be small bugs with each
>of them. They tell me that [EMAIL PROTECTED] is an
>invalid e-mail address.
>
>__
>Do You Yahoo!?
>Yahoo! Shopping - Mother's Day is May 12th!
>http://shopping.yahoo.com
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] eregi(mail)

2002-05-10 Thread Steve Buehler

Either Google is wrong (probably) or they are now allowing things like 
spaces into an email address.  There are actually several things that are 
not allowed in a standard email address.  Here is the code that I use.
ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.'@'.'[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'.'[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$',
 
$subarray))
I am honestly not sure where I got this code, but it has always worked for 
me and I have not found any YET that are good address that this kills.  I 
have also not found any bad ones YET that this lets through (unless the 
domain or user doesn't exist, of course).

Steve

At 01:26 PM 5/10/2002, you wrote:
>I had always been suspicious about email validators so I did a big long
>search on Google about standard address formats.  It turns out that aside
>from the @ symbol emails have no standard format whatsoever.  So ereg('@',
>$email) is really the only functional email validator.
>
>You also have to think about what kind of email validation you need.  Do you
>really need to control the format of the emails being stored in your
>database?  Or do you need to control the validity of the emails being stored
>in your database?  There is a big difference.  A valid email address isn't
>necessarily one that is formated in the way you expect.  It is one that is
>active and can be mailed to.  There are a number of techniques you can use
>to determine that.
>
>Well.. anyway sorry for going off on a tangent there.  In your search for an
>email validator you got a bit more information than you expected.  I hope it
>was useful in some tiny miniscule sort of way.  :)
>
>--
>Kevin Stone
>[EMAIL PROTECTED]
>
>
>- Original Message -
>From: "Analysis & Solutions" <[EMAIL PROTECTED]>
>To: "PHP List" <[EMAIL PROTECTED]>
>Sent: Friday, May 10, 2002 10:59 AM
>Subject: Re: [PHP] eregi(mail)
>
>
> > Hi Liam:
> >
> > On Fri, May 10, 2002 at 09:48:58AM -0700, Liam Gibbs wrote:
> > > Does anyone have a decent eregi statement for
> > > validating e-mail addresses?
> >
> > eregi('^[a-z0-9_.=+-]+@([a-z0-9-]+\.)+([a-z]{2,6})$', $Email);
> >
> > Enjoy,
> >
> > --Dan
> >
> > --
> >PHP classes that make web design easier
> > SQL Solution  |   Layout Solution   |  Form Solution
> > sqlsolution.info  | layoutsolution.info |  formsolution.info
> >  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
> >  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
> >
> > --
> > 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] eregi(mail)

2002-05-10 Thread Steve Buehler

To tell you the truth, I can't read it.

Steve

At 01:32 PM 5/10/2002, Miguel Cruz wrote:
>On Fri, 10 May 2002, Steve Buehler wrote:
> > 
> 
>if(ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.'@'.'[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'.'[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$',
> 
>
>
>If I'm reading it correctly, this will let invalid addresses through. The
>domain component (after the @ sign) can only contain a-zA-Z0-9\.\-
>
>miguel
>
>
>--
>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] PHP 4.2.1 release announcement

2002-05-14 Thread Steve Buehler

I know that I just saw something like this last week on the list, but can't 
find it now.  Anyway, I have just installed PHP 4.2.1 on my WinXP laptop 
running Apache 1.3.23.  phpinfo() is still showing 4.1.2.  I think I 
remember something about a dll that needs to be deleted or something like 
that.  Can anybody let me know how to fix this?

Thanks
Steve

At 02:42 AM 5/14/2002, you wrote:
>Hello,
>
>PHP 4.2.1 is released today, it's a bug fix release which addresses some
>serious bugs (and a lot of other little bugs) in 4.2.0. The full release
>announcement follows below:
>
>
>
>This bug fix release solves a few bugs found in PHP 4.2.0. PHP 4.2.1
>includes the following fixes:
>
> * Fix for the MySQL extension not be able to connect to a MySQL
>   server.
> * Fix for a crash in the COM extension when using an outproc server.
> * Fix for SID logic in the session extension.
> * Fixes for the mbstring extension, including SJIS directory name
>   handling and mb_output_buffer().
> * Fix for a bug in socket_select() that could cause unexpected
>   behavior when using a statement like $w = $e = array($sock);
> * Almost full DOM compliance for the domxml extension, and fixes for
>   several functions.
> * Safe_mode checks for show_source(), parse_ini_file() and rmdir().
>
>For a full list of changes in PHP 4.2.1, see the NEWS file.
>(http://www.php.net/ChangeLog-4.php)
>
>
>Compatibility
>
>PHP 4.2.1 also has improved (but still experimental) support for Apache
>version 2. We do not recommend that you use this in a production
>environment, but feel free to test it and report bugs to the bug system.
>(http://bugs.php.net)
>
>
>External variables
>
>We would also like to attend you on a big change in PHP 4.2.0 concerning
>variable handling. External variables (from the environment, the HTTP
>request, cookies or the web server) are no longer registered in the global
>scope by default. The preferred method of accessing these external
>variables is by using the new Superglobal arrays, introduced in PHP 4.1.0.
>More information about this change:
>
> * PHP Manual: Predefined variables
>   (http://www.php.net/manual/en/language.variables.predefined.php)
>
> * The PHP 4.1.0 release announcement
>   (http://www.php.net/release_4_1_0.php)
>
> * Thomas Oertli's article on secure programming in PHP
>   (http://www.zend.com/zend/art/art-oertli.php)
>
>
>
>regards,
>Derick
>
>
>--
>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] PHP 4.2.1 release announcement

2002-05-14 Thread Steve Buehler

Sorry, I forgot to move my php4ts.dll to the windows/system32 directory.

Steve
---snip---
I know that I just saw something like this last week on the list, but can't 
find it now.  Anyway, I have just installed PHP 4.2.1 on my WinXP laptop 
running Apache 1.3.23.  phpinfo() is still showing 4.1.2.  I think I 
remember something about a dll that needs to be deleted or something like 
that.  Can anybody let me know how to fix this?
---snip---

Thanks
Steve

At 02:42 AM 5/14/2002, you wrote:
>Hello,
>
>PHP 4.2.1 is released today, it's a bug fix release which addresses some
>serious bugs (and a lot of other little bugs) in 4.2.0. The full release
>announcement follows below:
>
>
>
>This bug fix release solves a few bugs found in PHP 4.2.0. PHP 4.2.1
>includes the following fixes:
>
> * Fix for the MySQL extension not be able to connect to a MySQL
>   server.
> * Fix for a crash in the COM extension when using an outproc server.
> * Fix for SID logic in the session extension.
> * Fixes for the mbstring extension, including SJIS directory name
>   handling and mb_output_buffer().
> * Fix for a bug in socket_select() that could cause unexpected
>   behavior when using a statement like $w = $e = array($sock);
> * Almost full DOM compliance for the domxml extension, and fixes for
>   several functions.
> * Safe_mode checks for show_source(), parse_ini_file() and rmdir().
>
>For a full list of changes in PHP 4.2.1, see the NEWS file.
>(http://www.php.net/ChangeLog-4.php)
>
>
>Compatibility
>
>PHP 4.2.1 also has improved (but still experimental) support for Apache
>version 2. We do not recommend that you use this in a production
>environment, but feel free to test it and report bugs to the bug system.
>(http://bugs.php.net)
>
>
>External variables
>
>We would also like to attend you on a big change in PHP 4.2.0 concerning
>variable handling. External variables (from the environment, the HTTP
>request, cookies or the web server) are no longer registered in the global
>scope by default. The preferred method of accessing these external
>variables is by using the new Superglobal arrays, introduced in PHP 4.1.0.
>More information about this change:
>
> * PHP Manual: Predefined variables
>   (http://www.php.net/manual/en/language.variables.predefined.php)
>
> * The PHP 4.1.0 release announcement
>   (http://www.php.net/release_4_1_0.php)
>
> * Thomas Oertli's article on secure programming in PHP
>   (http://www.zend.com/zend/art/art-oertli.php)
>
>
>
>regards,
>Derick
>
>
>--
>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] Changes in 4.2.1

2002-05-14 Thread Steve Buehler

I don't know what I did wrong.  I just installed 4.2.1 and can NOT do:


But I can do the following:



I can also do:
$admin_index_title";

echo "

 
 


You must use a browser that supports frames to use the admin section.
";

pagefooter();
?>

I sure hope that somebody can help me.  I am running Apache 1.3.23 on a 
WinXP laptop.  There has to be something that I am missing, but I can't 
figure it out.

Thanks
Steve





[PHP] Changes in 4.2.1

2002-05-14 Thread Steve Buehler

Ok.  Now the first two examples work and the one with the frames does NOT 
work.  I never had these problems in PHP 4.1??

Steve

-snip-
I don't know what I did wrong.  I just installed 4.2.1 and can NOT do:


But I can do the following:



I can also do:
$admin_index_title";

echo "

 
 


You must use a browser that supports frames to use the admin section.
";

pagefooter();
?>

I sure hope that somebody can help me.  I am running Apache 1.3.23 on a 
WinXP laptop.  There has to be something that I am missing, but I can't 
figure it out.

Thanks
Steve





RE: [PHP] Changes in 4.2.1

2002-05-14 Thread Steve Buehler

At 11:43 AM 5/14/2002, Jon Haworth wrote:
>Hi Steve,
>
> > I don't know what I did wrong.  I just installed 4.2.1
> > and can NOT do:
> >  > echo "hi";
> > ?>
>
>What, you mean Bill Gates comes round and beats you up whenever you try it?
>
>Can you be more specific about what "I cannot do" means? (an error message
>would be particularly handy at this point)


Your right.  I should give more specifics.  Ok.  I have a page called 
main.php.  The only thing in it is:

That's it.  I tried to run it and it gave me an "HTTP 500 - Internal server 
error".

Thanks
Steve


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




RE: [PHP] Changes in 4.2.1

2002-05-14 Thread Steve Buehler

Yes, short tags were/are on.  I had installed from:
PHP_4.2.1_installer
I now reinstalled with:
PHP_4.2.1_zip_package
and it is working finefor the moment.  I think I had a problem like 
this on the old version that I used too.  I guess that I just have to use 
the zip package instead.  Probably because of the API version for Apache 
(since that is what I am using) that is in the zip package but not the 
"installer".  You know.  If I ever learned to read.

Steve

At 12:08 PM 5/14/2002, Jon Haworth wrote:
>Hi Steve,
>
> > Your right.  I should give more specifics.  Ok.  I have a page called
> > main.php.  The only thing in it is:
> >  > echo "hi";
> > ?>
> > That's it.  I tried to run it and it gave me an "HTTP 500 - Internal
>server
> > error".
>
>Are you sure you've got short tags turned on? What happens if you try
>
>   echo "hi";
>?>
>
>Cheers
>Jon


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




Re: [PHP] Using PHP on Windows for the first time

2002-05-14 Thread Steve Buehler

Either put the following line at the top of your php script:
error_reporting(E_ALL & ~(E_NOTICE | E_USER_NOTICE | E_WARNING | 
E_COMPILE_WARNING | E_CORE_WARNING | E_USER_WARNING) );

Or change the error reporting in your php.ini file.

Steve

At 08:48 AM 5/14/2002, Bob Strasser wrote:
>Anyone know a simple explanation of how to use forms using the post method 
>on PHP for Windows.  I use PHP on Linux and I don't have any problems.  I 
>do the same thing on Windows and I get an unregistered variable message on 
>Windows.  I assume I've missed something.  Global variables is on.  Why 
>isn't the info tranferring?


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




Re: [PHP] can any one see a problem with this script?

2002-05-16 Thread Steve Buehler

Not sure, but it might be the space that you have after the limit=10

Steve

At 11:39 PM 5/16/2002, Peter wrote:
>hi can any one see a problem with this script .. I am trying to use
>phpbuilder's rss link for a site but am having errors
>
>
>$content .= "\n\n";
>$content .= "test\n";
>$content .= "\n";
>$content .= "\n";
>//line 8 starts {
>$fp = fopen("http://www.phpbuilder.com/rss_feed.php?type=general&limit=10 ",
>"r") or die("Error reading RSS data.");
>// } line 8 finishes
>
>fclose($fp);
>
>$content .= "\n";
>$content .= "\n";
>
>echo $content;
>?>
>
>The error is as follows
>
>Warning: php_hostconnect: connect failed in c:\phpdev\www\test.php on line 8
>
>Warning: 
>fopen("http://www.phpbuilder.com/rss_feed.php?type=general&limit=10","r";) 
>- Bad file descriptor in c:\phpdev\www\test.php on line 8
>Error reading RSS data.
>
>Cheers
>
>Peter
>"the only dumb question is the one that wasn't asked"
>
>
>
>--
>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] smtp

2002-05-21 Thread Steve Buehler

I am trying to use the "smtp class" from phpguru.org with a mysql database 
using PHP.  My question is this.  I understand that I can send out email to 
multiple email addresses using this class.  How can I populate these arrays 
with the email addresses.  The fields that would have all of the addresses 
in them would be the ones that have [EMAIL PROTECTED] as the address.

$send_params['recipients'] = array('[EMAIL PROTECTED]');   // The recipients 
(can be multiple)
$send_params['headers'] = array('From: "' . $mailer . '" <[EMAIL PROTECTED]>',
'To: [EMAIL PROTECTED]' , 'Subject: ' . $mail_subject
   );
I figure that I would be using a while loop like the following:
while($query_data = mysql_fetch_row($result)) {
$row=mysql_fetch_object($result);
//  This is where I would use something to add $row->email to the arrays.
}

Thank you in Advance
Steve Buehler


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




[PHP] Problem with if statement and while loops

2002-05-24 Thread Steve Buehler

I am having trouble with the following function.  What it should do is to 
check one table for team_id's.  Than it goes to another table and gets all 
rows with that team_id.  If the team_id is in the new table, it should do 
one thing, else it should do something else.  Can somebody look at this 
code and see if they can find out where my problem is besides in my 
inexperience?  It always goes to the else statement inside the if statement.

function searchbyteamname($team_name){
GLOBAL $PHP_SELF;
$result=mysql_query("SELECT team_id,name FROM team WHERE name like 
'%$team_name%' AND deleted NOT LIKE '1' ORDER BY 'name'");
$i=1;
while (($row=mysql_fetch_object($result))){
if(!($result1=mysql_query("SELECT * FROM team_season WHERE team_id = 
'$row->team_id' AND deleted NOT LIKE '1'"))){
echo "$i.  $row->name";
$i++;
}else{
while(($row1=mysql_fetch_object($result1))){
echo "$i. team_id\">$row->name";
echo getdivisionnameshort($row1->div_id);
echo getseasonnameshort($row1->sea_id)\n";
$i++;
}
}
}
}


Thank You In Advance
Steve


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




Re: [PHP] Problem with if statement and while loops

2002-05-24 Thread Steve Buehler

At 01:54 AM 5/25/2002 +0800, Jason Wong wrote:
>Your biggest problem is that you're trying to nest mysql_query() but you're
>only using 1 link identifier. You need to establish another connection using
>another mysql_connect().

Why?  I can nest 1000's of these as long as I don't use $result= for each 
one.  As in the one below, I use $result= for one and $result1= for 
another.  I have it like that in a lot of my scripts.  You only need to 
have ONE connect to run these.  I use mysql_pconnect which will stay 
connected as long as the page is running.  If it is not possible to do, 
than PHP has a bug in it in the older and newest versions.  Try it out, it 
comes in real handy.  It keeps down the overhead of all of the connections 
that might have to be made during a script run.  I do agree that there are 
times when you should use mysql_connect and close it after running 
something, but for what I am doing, it makes more since and is easier on me 
if I use the mysql_pconnect.

> > function searchbyteamname($team_name){
> > GLOBAL $PHP_SELF;
> > $result=mysql_query("SELECT team_id,name FROM team WHERE name like
> > '%$team_name%' AND deleted NOT LIKE '1' ORDER BY 'name'");
> > $i=1;
> > while (($row=mysql_fetch_object($result))){
> >   if(!($result1=mysql_query("SELECT * FROM team_season WHERE team_id =
> > '$row->team_id' AND deleted NOT LIKE '1'"))){
>
>The value returned from mysql_query() is an indication of whether or not the
>query itself succeeded. It is not an indication of whether the query returned
>any records.

Ok.  I should rephrase my first question.  If the query returns either 
nothing, or if it does not succeed, than it should do one thing, otherwise 
it should do something else.



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




Re: [PHP] Problem with if statement and while loops

2002-05-24 Thread Steve Buehler

At 12:29 PM 5/24/2002 -0500, Steve Buehler wrote:
>I am having trouble with the following function.  What it should do is to 
>check one table for team_id's.  Than it goes to another table and gets all 
>rows with that team_id.  If the team_id is in the new table, it should do 
>one thing, else it should do something else.  Can somebody look at this 
>code and see if they can find out where my problem is besides in my 
>inexperience?  It always goes to the else statement inside the if statement.
>
>function searchbyteamname($team_name){
>GLOBAL $PHP_SELF;
>$result=mysql_query("SELECT team_id,name FROM team WHERE name like 
>'%$team_name%' AND deleted NOT LIKE '1' ORDER BY 'name'");
>$i=1;
>while (($row=mysql_fetch_object($result))){
> if(!($result1=mysql_query("SELECT * FROM team_season WHERE 
> team_id = '$row->team_id' AND deleted NOT LIKE '1'"))){
> echo "$i.  $row->name";
> $i++;
> }else{
> while(($row1=mysql_fetch_object($result1))){
> echo "$i.  href=\"$PHP_SELF?action=edit&team_id=$row->team_id\">$row->name";
> echo getdivisionnameshort($row1->div_id);
> echo getseasonnameshort($row1->sea_id)\n";
> $i++;
> }
> }
>}
>}

Ok.  Nobody (that has seen this) was able to and/or wanted to solve this or 
they just haven't had the time to yet. :)  Anyway, I have found a solution 
to the problem and am listing it here so that other people can learn.  That 
is what this list is about, right?  I just used mysql_num_rows() to find 
out if it returned something or not.  Here is the code that works:

function searchbyteamname($team_name){
GLOBAL $PHP_SELF;
$result=mysql_query("SELECT team_id,name FROM team WHERE name like 
'%$team_name%' AND deleted NOT LIKE '1' ORDER BY 'name'");
$i=1;
while (($row=mysql_fetch_object($result))){
 $result1=mysql_query("SELECT * FROM team_season WHERE team_id = 
'$row->team_id' AND deleted NOT LIKE '1'");
 $num_results = mysql_num_rows($result1);
 if(!$num_results){
 echo "$i. $row->name";
 $i++;
 }else{
 while(($row1=mysql_fetch_object($result1))){
 echo "$i. team_id\">$row->name";
 echo getdivisionnameshort($row1->div_id);
 echo getseasonnameshort($row1->sea_id);
 $i++;
 }
 }
}
}



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




Re: [PHP] unexpected T_IF

2002-05-25 Thread Steve Buehler

put a ; at the end of line 31 and see if it still gives you the error.

Steve

At 10:33 AM 5/25/2002 +0100, you wrote:
>Hmm, can anyone explain why I'm getting this error?
>
>Parse error: parse error, unexpected T_IF in 
>/usr/local/htdocs/san.loc/upload-img.php on line 34
>
>Code reads:
>
>11:#--if form submitted then process file upload
>12:if($HTTP_POST_VARS['ttl']) {
>13:
>14: #--check if there is already a picture called this
>15: include $DOCUMENT_ROOT . 'incs/db.php';
>16: @mysql_select_db("infoNav") or die("unable to connect to table");
>17: $qry = "SELECT ttl FROM imgLst WHERE site = 
>$HTTP_SESSION_VARS[site_no] AND ttl = '$HTTP_POST_VARS[ttl]';";
>18: $imgTst = MYSQL_QUERY($qry);
>19:
>20: if(mysql_numrows($imgTst) < 1) {
>21:
>22:  #-- check file type
>23:  $ulf = $HTTP_POST_FILES['uplfile']['type'];
>24:  if($ulf == 'image/pjpeg' || $ulf == 'image/gif') {
>25:
>26:   #-- get ext
>27:   ($ulf == 'image/pjpeg') ? $ext = '.jpg' : $ext = '.gif';
>28:
>29:   #-- create unique filename
>30:   $flNme = '\/imgs\/user-imgs\/' . time() . $REMOTE_HOST . $ext;
>31:   $FulflNme = $DOCUMENT_ROOT . $flNme
>32:
>33:   #-- check file is realy uploaded for security then copy to store folder
>34:   if (is_uploaded_file($HTTP_POST_FILES['uplfile'])) {
>
>Thanks
>
>Zac
>--
>This message has been scanned for viruses and
>dangerous content by MailScanner, and is
>believed to be clean.



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




Re: [PHP] unsetting function

2002-05-29 Thread Steve Buehler

You might want to give an example of what you are trying to do or at least, 
why.  I am not an expert (not by a long ways), but to me, the way your 
question is worded, I would have to sayOpen up the page in whatever 
editing program you want to use delete the function and put in a new 
function that you want in its place.  It would make it easier if you used 
the same function name, or you will have to change all calls to it.

Steve

At 11:33 AM 5/29/2002 +0200, Laurent Drouet wrote:
>Hi the ML
>
>I would like to know if there is a way to unset a function or to replace
>function contents by an other ?
>
>Regards
>
>Laurent
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>--
>This message has been scanned for viruses and
>dangerous content by MailScanner, and is
>believed to be clean.



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




Re: [PHP] Avoid escaping

2002-05-29 Thread Steve Buehler

http://www.php.net/manual/fi/function.stripslashes.php

Steve

At 11:36 AM 5/29/2002 +0200, you wrote:
>i have some html that i submit using html
>example
>
> Perro
>
>
>When i submit this and retrieve it on the target page the value looks like
>this:
>Perro
>
>Can I somehow avoid that somehow?
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>--
>This message has been scanned for viruses and
>dangerous content by MailScanner, and is
>believed to be clean.



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




Re: [PHP] for loops

2002-05-30 Thread Steve Buehler

it works for me just the way you have itexcept of course that you are 
telling it to only print to "y" because you are saying On Thursday 30 May 2002 11:46, Peter wrote:
> > Just a query ... has any one else noticed this
> >
> > for($i = a; $i < z; $i++)
> >  {
> >  print $i;
> > echo "";}
> >
> > will print out a right down to yz
>
>It should only print to 'y' ...
>
> > but replace the letters with numbers eg
> >
> > for($i = 1; $i < 10; $i++)
> >  {
> >  print $i;
> > echo "";}
> >
> > and it prints 1 thru to 10
>
>... and should only print to '9' ...
>
> > and any one know a reason for this?
>
>... so if it does otherwise for you then you've got a bug in your version of
>php!
>
>--
>Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
>Open Source Software Systems Integrators
>* Web Design & Hosting * Internet & Intranet Applications Development *
>
>/*
>Many people are desperately looking for some wise advice which will
>recommend that they do what they want to do.
>*/
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>--
>This message has been scanned for viruses and
>dangerous content by MailScanner, and is
>believed to be clean.
>ow3



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




  1   2   >