[PHP] 2d array help

2002-01-21 Thread kurth

arg- trying to get the data that I pull outta my db into a 2d assoc array...

any help?

~kurth

$result = mysql_query( "SELECT pkgid FROM plans");
while($row = mysql_fetch_assoc($result)){
$resultpkg = mysql_query( "SELECT * FROM plans WHERE 
pkgid='$row[pkgid]'");
$package = mysql_fetch_assoc($resultpkg);
}

print_r($plan);


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




[PHP] Putting text data into a associative array

2003-02-24 Thread Richard Kurth
I need to add the following to an array so that I can add,delete and
change the data to the right of the last : I am thinking I first have
to split this into an array and then split the part I what into
another array. Would this be called a associative array? How do I
create this type of array from data that is in a text file and then
save it back to the text file. I am lost on how to do this. after
reading the manual and a couple of books I am even more lost. I just
need some help in getting this going once I get it I can expand on it
from there.

site1:x:503:tester1
site2:x:504:tester2,tester2a
site3:x:505:tester3,tester3a,tester3b
site4:x:506:tester4
site5:x:507:tester5,tester5a,tester5b
site6:x:508:tester6
site7:x:509:tester7,tester7a,tester7b

  

-- 
Best regards,
 rdkurth  mailto:[EMAIL PROTECTED]


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



[PHP] array question

2003-02-24 Thread Richard Kurth
This is the code I am using to get the data out of the text file
below. Now I need to turn the $group[3] into an array of its own so
that I can make changes to it. How do I turn this into an array that
I can reference with $group[0]. What I need to be able to do is
search for the label in $group[0] and then make changes to the stuff
in $group[3] like delete add or change.












The DATA

site1:x:503:tester1
site2:x:504:tester2,tester2a
site3:x:505:tester3,tester3a,tester3b
site4:x:506:tester4
site5:x:507:tester5,tester5a,tester5b
site6:x:508:tester6
site7:x:509:tester7,tester7a,tester7b

  

-- 
Best regards,
 Richard  mailto:[EMAIL PROTECTED]


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



[PHP] Manipulating a text file

2003-02-26 Thread Richard Kurth
Hello php-general,

I need to be able to add and delete to a text file that look like
this. I only need to manipulate the part after site:x:503:

site1:x:503:tester1,tester6
site2:x:504:
site3:x:505:
site4:x:506:
site5:x:507:
site6:x:508:
site7:x:509:tester2,tester3,tester4
site8:x:510:
site9:x:511:

I can get to this value by using this code below. But I have know Idea
on how to go about this. I want to be able to add to this list and
delete from the list. Example I would like to remove tester3 from
site7 and then I would like to add tester10 to site4. This should give
you an idea of what I am trying to do. I have asked this question
before but have never received an answer that I could understand.

$groups= file("group");
$number_in_group = count($groups);
for( $i = 0; $i < $number_in_group; $i++){
$group = explode(":",$groups[$i]);
$group[0];
$group[3]; //this is the group I what to be able to change but referenced by group[0]
I need to be able to add to and delete from this group and then save it to a file
}

-- 
Best regards,
 Richard  mailto:[EMAIL PROTECTED]


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



[PHP] HELP!! with array's

2003-02-27 Thread Richard Kurth
Hello ,

I need a way to read the following text file and add to or delete from
or change the data.
I have been able to move it all into an array using this code
$groups= file("group");
for ($i=0; $i<$number_in_group; $i++){
}
But I can not figure out how to search the array and delete from or add
to the array at a given point. I would like to say add another user to
the end of site6 or delete a user from site3.
Could sombody give me a hand here. I have read the manual for arrays
and still can't figure it out.

site1:x:503:tester1
site2:x:504:tester2,tester2a
site3:x:505:tester3,tester3a,tester3b
site4:x:506:tester4
site5:x:507:tester5,tester5a,tester5b
site6:x:508:tester6
site7:x:509:tester7,tester7a,tester7b

  

-- 
Best regards,
 Richard  mailto:[EMAIL PROTECTED]


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



[PHP] Help!! with array's Please

2003-02-27 Thread Richard Kurth

I really need somebody to help me with this I am totally lost on what
to do

I need a way to read the following text file and add to or delete from
or change the data.
I have been able to move it all into an array using this code
$groups= file("group");
for ($i=0; $i<$number_in_group; $i++){
$groups[0];
$groups[3]; <-- this is the part of the array that I need to change
}
But I can not figure out how to search the array and delete from or add
to the array at a given point. I would like to say add another user to
the end of site6 or delete a user from site3.
Could somebody give me a hand here. I have read the manual for arrays
and still can't figure it out.

site1:x:503:tester1
site2:x:504:tester2,tester2a
site3:x:505:tester3,tester3a,tester3b
site4:x:506:tester4
site5:x:507:tester5,tester5a,tester5b
site6:x:508:tester6
site7:x:509:tester7,tester7a,tester7b  

-- 
Best regards,
 Richard  mailto:[EMAIL PROTECTED]


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



Re[2]: [PHP] Help!! with array's Please

2003-02-27 Thread Richard Kurth
Hello Tom,

Thursday, February 27, 2003, 7:39:52 PM, you wrote:

TR> Hi,

TR> Friday, February 28, 2003, 12:20:38 PM, you wrote:

RK>> I really need somebody to help me with this I am totally lost on what
RK>> to do

RK>> I need a way to read the following text file and add to or delete from
RK>> or change the data.
RK>> I have been able to move it all into an array using this code
RK>> $groups= file("group");
RK>> for ($i=0; $i<$number_in_group; $i++){
RK>> $groups[0];
RK>> $groups[3]; <-- this is the part of the array that I need to change
RK>> }
RK>> But I can not figure out how to search the array and delete from or add
RK>> to the array at a given point. I would like to say add another user to
RK>> the end of site6 or delete a user from site3.
RK>> Could somebody give me a hand here. I have read the manual for arrays
RK>> and still can't figure it out.

RK>> site1:x:503:tester1
RK>> site2:x:504:tester2,tester2a
RK>> site3:x:505:tester3,tester3a,tester3b
RK>> site4:x:506:tester4
RK>> site5:x:507:tester5,tester5a,tester5b
RK>> site6:x:508:tester6
RK>> site7:x:509:tester7,tester7a,tester7b  

RK>> -- 
RK>> Best regards,
RK>>  Richard  mailto:[EMAIL PROTECTED]

TR> your groups array will look like this

TR> groups[0] = site1:x:503:tester1
TR> groups[1] = site2:x:504:tester2,tester2a
TR> so loop through the array

TR> $x = 0;
TR> while(list($key,$val) = each($groups)){

TR> //you need split the array values like this
TR>   list($name,$pass,$gid,$user_list) = split (":", $groups[$x]);
TR>   //see if we have the right one
TR>   if($name = $wanted_name){ //site6
TR>  //then split the usernames into a sub array
TR>  $users = explode(',',$userlist);
TR>  // to add
TR>  $users[] = $newuser;
TR>  // to delete
TR>  unset($users[3])
TR>  // now add it back
TR>  $userlist = implode(',',$users)
TR>  $list = $name.':'.$pass.':'.$gid.':'.$userlist;
TR>  $groups[$x] = $list;
TR>   }
TR>   $x++;
TR>   //here you could fputs to a temp file then copy to the original
TR>   // after finished
TR> }

TR> Then write groups back to disk
TR> -- 
TR> regards,
TR> Tom

Thanks for the help!!

I still can't seam to get it to add a new user at the end of a line of
the selected site name.
Also how do I use the unset($users[3]) do I first have to determine
what number the one I what to delete is.
Here is what I have so far
$newuser="tester45";
$wanted_name="site7";
$groups= file("group");
$x = 0;
while(list($key,$val) = each($groups)){
//you need split the array values like this
 list($name,$pass,$gid,$user_list) = split (":", $groups[$x]);
 //see if we have the right one
 if($name = $wanted_name){ //site6
//then split the usernames into a sub array
 $users = explode(',',$userlist);
 // to add
 $users[] = $newuser;
  // to delete
 //unset($users[3]);
 // now add it back
 $userlist = implode(',',$users);
 $list = $name.':'.$pass.':'.$gid.':'.$userlist;
 $groups[$x] = $list;
  }
  
  $x++;
$handle = fopen("group2", 'a');
fputs($handle, $groups[$x]);
  //here you could fputs to a temp file then copy to the original
  // after finished
}
//Then write groups back to disk





-- 
Best regards,
 Richardmailto:[EMAIL PROTECTED]


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



[PHP] Getting error REG_EMPTY

2003-03-04 Thread Richard Kurth

Way does this give me this error

Warning: REG_EMPTY: in emailusers.php on line 52


$lines = file("data/members.txt");
foreach($lines as $line){
list ($logged_email,$logged_title,$logged_first_name,$logged_last_name) = split("|", 
$line);
if ($logged_email==$email) {print "This email has already been 
registered.";
exit;}
}


this is what is in the members.txt file

[EMAIL PROTECTED]|Mr.|Richard|Kurth|1046828998|03/04/2003

-- 
Best regards,
 Richard  mailto:[EMAIL PROTECTED]


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



[PHP] remove a line from a text list

2003-03-05 Thread Richard Kurth

This script will remove a line from a text list of email address and
then re-write the list. The only problem I am having is when it
re-writes the list it adds a extra line between each record. How can I
stop this from happening

$recordsarray = file($members);
$remove = "[EMAIL PROTECTED]";
$temp = array();
for ($i=0;$imailto:[EMAIL PROTECTED]


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



Re[2]: [PHP] remove a line from a text list

2003-03-05 Thread Richard Kurth
Hello Jason,


Wednesday, March 5, 2003, 12:38:39 PM, you wrote:


JW> On Thursday 06 March 2003 04:18, Richard Kurth wrote:
>> This script will remove a line from a text list of email address and
>> then re-write the list. The only problem I am having is when it
>> re-writes the list it adds a extra line between each record. How can I
>> stop this from happening
>>
>> $recordsarray = file($members);
>> $remove = "[EMAIL PROTECTED]";
>> $temp = array();
>> for ($i=0;$i> {
>>   if (!strstr($recordsarray[$i], $remove))
>>   {
>> $temp[] = $recordsarray[$i];
>>   }
>> }
>> $recordsarray = $temp;
>> $lines = implode($recordsarray,'');
>> $fp = fopen($members, "w");
>> fwrite($fp, $lines, strlen($lines));
>> fclose($fp);
>>
>> This is what the list looks like befor
>> [EMAIL PROTECTED]|Mr.|Richard|Kurth|1046848049|03/04/2003
>> [EMAIL PROTECTED]|Mr.|Richard|Kurth|1046854222|03/05/2003
>> [EMAIL PROTECTED]|Mr.|Richard|Kurth|1046848049|03/04/2003
>>
>> This is what it looks like after I remove a line
>> [EMAIL PROTECTED]|Mr.|Richard|Kurth|1046848049|03/04/2003
>>
>> [EMAIL PROTECTED]|Mr.|Richard|Kurth|1046854222|03/05/2003

JW> I tried your code and it works fine for me :-)

It didn't add a extra lines in between the lines in the list. Because it
does it every time for me. I guess it does not mater I just wanted
it to keep the list nice and tight and together.




-- 
Best regards,
 Richardmailto:[EMAIL PROTECTED]


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



Re[2]: [PHP] remove a line from a text list

2003-03-05 Thread Richard Kurth
Hello Chris,
Don't know how I did that but it worked strange. Maybe the reason I am
getting the extra line is because I am testing the script on Windows
200 and not on a good Linux box.

Wednesday, March 5, 2003, 1:37:43 PM, you wrote:


CW> On Wed, 5 Mar 2003, Richard Kurth wrote:

>> This script will remove a line from a text list of email address and
>> then re-write the list. The only problem I am having is when it
>> re-writes the list it adds a extra line between each record. How can I
>> stop this from happening

CW> Your code works as you'd expect ... on my mod_php 4.2.2 & Apache 1.3.26
CW> setup.  It's amazing though, because implode() is used incorrectly.
CW> See below:

>> $recordsarray = file($members);
>> $remove = "[EMAIL PROTECTED]";
>> $temp = array();
>> for ($i=0;$i> {
>>   if (!strstr($recordsarray[$i], $remove))
>>   {
>> $temp[] = $recordsarray[$i];
>>   }
>> }
>> $recordsarray = $temp;
>> $lines = implode($recordsarray,'');

CW> The above line:
CW> I'm assuming you want to collapse $recordsarray into a sting, with the
CW> elements of $recordsarray separated by a null char.  Well, you told
CW> implode() to collapse a null char into a string with the elements of null
CW> char separated by $recordsarray ... inverted the arguments to implode().
CW> I have no idea why an error isn't raised instead of kind-of working, but
CW> anywho 

CW> Try switching the arguments around in the call to implode(), to:
CW> $lines = implode('',$recordsarray);

CW> http://www.php.net/manual/en/function.implode.php

CW> If that doesn't correct the problem you're experiencing, let us know.
CW> I have other ideas for you, but they may not be necessary if that solves
CW> it.

CW> HTH,
CW> ~Chris




-- 
Best regards,
 Richardmailto:[EMAIL PROTECTED]


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



[PHP] adding a comma between a list of file names

2003-03-05 Thread Richard Kurth
   The scrip below will list all the files in a directory and also strip off every
   thing in the file name after a .
   so if I have files named 1.txt 2.txt 324.txt 5.txt it gives me a list that
   looks like this 123245. I need to add a , in between each of these file
   names so they will look like 1,2,324,5
   For some reason I keep looking at this and for the life of me can't
   figure out what I need to do.

  $handle = opendir($emaildir);
while (false !== ($file = readdir($handle))) { 
if ($file != "." && $file != "..") { 
 $emailes .=substr($file,0,strpos($file,'.'));
 } 
}
closedir($handle); 

  

-- 
Best regards,
 Richard  mailto:[EMAIL PROTECTED]


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



Re[2]: [PHP] adding a comma between a list of file names

2003-03-05 Thread Richard Kurth
Hello Jonathan,
Thanks I know it was something simple like that.

Wednesday, March 5, 2003, 2:42:41 PM, you wrote:


JP> Richard,


JP>   $handle = opendir($emaildir);
JP> $emailes = "";
JP>  while (false !== ($file = readdir($handle))) {
JP>  if ($file != "." && $file != "..") {
JP> if ($emailes != "") {   
JP> $emailes .=substr($file,0,strpos($file,'.'));
JP> } else {
JP> $emailes .= ','. substr($file,0,strpos($file,'.'));
JP> }
JP>   }
JP>  }
JP>  closedir($handle);

JP> That should do it. The if statement takes care of not adding a Comma at 
JP> the first of the string and then the rest of the loop goes through the 
JP> else part of the statement adding in the comma for you.

JP> Hope this helped.

JP> Jonathan Pitcher

JP> On Wednesday, March 5, 2003, at 04:36  PM, Richard Kurth wrote:

>>The scrip below will list all the files in a directory and also 
>> strip off every
>>thing in the file name after a .
>>so if I have files named 1.txt 2.txt 324.txt 5.txt it gives me a 
>> list that
>>looks like this 123245. I need to add a , in between each of these 
>> file
>>names so they will look like 1,2,324,5
>>For some reason I keep looking at this and for the life of me can't
>>figure out what I need to do.
>>
>>   $handle = opendir($emaildir);
>> while (false !== ($file = readdir($handle))) {
>> if ($file != "." && $file != "..") {
>>  $emailes .=substr($file,0,strpos($file,'.'));
>>  }
>> }
>> closedir($handle);
>>
>>
>>
>> -- 
>> Best regards,
>>  Richard  mailto:[EMAIL PROTECTED]
>>
>>
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>





-- 
Best regards,
 Richardmailto:[EMAIL PROTECTED]


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



[PHP] while loop with mysql

2003-03-10 Thread Richard Kurth
 Can somebody look at this and tell me way the first while loop will
 only loop through the database once when there is more than one record
 that should be processed.


while($members = @mysql_fetch_object($result)) {
$logged_email=$members->email;
$logged_title=$members->title;
$logged_first_name=$members->first_name;
$logged_last_name=$members->last_name;
$logged_time=$members->mtime;
$logged_date=$members->signdate ;
$logged_sent=$members->sent;
$current_time = time();
$high_level = $current_time - $logged_time;
$low_level = $high_level - 86400;
$result1=safe_query("Select * from email");
while ($emails = @mysql_fetch_object($result1)) {
$keys= $emails->days_send;
$keys=trim($keys);
$sendoff = $keys * 86400;
if ($sendoff > $low_level) {
if ($sendoff < $high_level) {
$logged_sent=trim($logged_sent);
if ($logged_sent==$keys){
}else{
//update the members table sent field with the key #
$sql1="Update members set  sent='$keys' where 
email='$logged_email'";
$result=safe_query($sql1);
send_email();
}}}//end of all three if statements
}//end of $emails while loop

} //end $members while loop
  

-- 
Best regards,
 Richard  mailto:[EMAIL PROTECTED]


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



Re[2]: [PHP] while loop with mysql

2003-03-10 Thread Richard Kurth
Hello Tom,
I have been looking at this for an hour and thought it was something
like that but I could not see it. I guess it is time to go to bed.

Thanks

Monday, March 10, 2003, 1:47:27 AM, you wrote:


TR> Hi,

TR> Monday, March 10, 2003, 7:20:37 PM, you wrote:
RK>>  Can somebody look at this and tell me way the first while loop will
RK>>  only loop through the database once when there is more than one record
RK>>  that should be processed.


RK>> while($members = @mysql_fetch_object($result)) {
RK>> $logged_email=$members->email;
RK>> $logged_title=$members->title;
RK>> $logged_first_name=$members->first_name;
RK>> $logged_last_name=$members->last_name;
RK>> $logged_time=$members->mtime;
RK>> $logged_date=$members->signdate ;
RK>> $logged_sent=$members->sent;
RK>> $current_time = time();
RK>> $high_level = $current_time - $logged_time;
RK>> $low_level = $high_level - 86400;
RK>> $result1=safe_query("Select * from email");
RK>> while ($emails = @mysql_fetch_object($result1)) {
RK>> $keys= $emails->days_send;
RK>> $keys=trim($keys);
RK>> $sendoff = $keys * 86400;
RK>> if ($sendoff > $low_level) {
RK>> if ($sendoff < $high_level) {
RK>> $logged_sent=trim($logged_sent);
RK>> if ($logged_sent==$keys){
RK>> }else{
RK>> //update the members table sent field with the key #
RK>> $sql1="Update members set  sent='$keys' where 
email='$logged_email'";
RK>> $result=safe_query($sql1);
RK>> send_email();
RK>> }}}//end of all three if statements
RK>> }//end of $emails while loop

RK>> } //end $members while loop
  

RK>> -- 
RK>> Best regards,
RK>>  Richard  mailto:[EMAIL PROTECTED]



TR> This resets $result

TR> //update the members table sent field with the key #
TR> $sql1="Update members set  sent='$keys' where 
email='$logged_email'";
TR> $result=safe_query($sql1);
TR> send_email();


TR> needs $result3 or something




-- 
Best regards,
 Richardmailto:[EMAIL PROTECTED]


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



[PHP] Removing a Blank line from a text file

2003-03-10 Thread Richard Kurth

This function removes a line from a text file list. It has one problem if
it removes a line from the beginning or middle of the text file list
it leaves a blank line. How can I make it remove the blank line also?

function remove_email($email){
global $members,$datadir,$email;
$recordsarray = file($members);
$temp = array();
for ($i=0;$imailto:[EMAIL PROTECTED]


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



[PHP] warning when I compile PHP

2003-03-25 Thread Richard Kurth
What does this mean I get this when I compile PHP. It is all
  through the out put when make is run. What can I do to make it not
  be there

cc1: warning: changing search order for system directory "/usr/include"
cc1: warning:   as it has already been specified as a non-system directory
  
-- 
Best regards,
 Richard  mailto:[EMAIL PROTECTED]


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



[PHP] using a for loop but it is not working how come

2003-06-05 Thread Richard Kurth
I am having a problem with this script It pulls a list of numbers from
one field in the database (the numbers are in this format
(275,277,278,276) It needs to pull each number and run it through the
function dofunction and then move on to the next one in tell there are
no more to process. What am I doing wrong or is there a better way to
do this.

sql="Select Numbers from dom where name = '$name'";
$results=safe_query($sql);
$DBRow = mysql_fetch_array($results);
$numbers = $DBRow["Numbers"];
$numbers = array($numbers);
   for($i = 0; $i < count($numbers); $i++){
$number = $numbers[$i];
dofunction($number);
}
  

-- 
Best regards,
 Richard  mailto:[EMAIL PROTECTED]


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



[PHP] Problem with adding quotations to a mysql insert statement

2003-12-15 Thread Richard Kurth
I need to add extra quotation marks in to the following insert command for
mysql.

I need one that is part of the info right before the |$wrapper resend and
right after the
$outgoing,nobody
$query = "insert into majordomoaliases
(domain,listname,var,address1,address2)values
(/"$domname/",\"$listname\",\"a\",\"$listdomain-$listname:\",\" |$wrapper
resend -C $domaincf -l
$listname -h $listdomain $listdomain-$listname-$outgoing,nobody\")";

The whole line should look like this when it is printed out to the page it
will be written to from the database
"|/var/wrapper resend -C /var/domaincf -l list1 -h domain.com
domain.com-list1-outgoing,nobody"

I am totaly stuped on haw to add this extra quotation mark no mater what I
do I get mysql errors.

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



[PHP] searching and replacing in a file

2003-12-15 Thread Richard Kurth
How can I read through a file and find a string and then replace it with a
new string and then save the whole file.

Below is a peace of what I need to search through. I need to find the string
subscribe_policy = open and replace it with subscribe_policy = open+confirm.
Then save the whole file.

I have tried str_replace but it just wipes out the original file.

$file = "/var/lib/majordomo/domain.com/lists/listname.config";
$fp = fopen("$file", "w+");
$content = fread($fp, filesize($file));
$replace= "subscribe_policy =  open+confirm";
$search_str = "subscribe_policy =  open";
$content2 = str_replace($search_str,$replace, $content);
fwrite($fp,$content2);
fclose($fp);

# restrict_post[restrict_post] (autoupdates) 
# If defined, only addresses listed in these files (colon or space
# separated) can post to the mailing list. By default, these files
# are relative to the lists directory. These files are also checked
# when get_access, index_access, info_access, intro_access,
# which_access, or who_access is set to 'list'. This is less useful
# than it seems it should be since there is no way to create these
# files if you do not have access to the machine running resend.
# This mechanism will be replaced in a future version of
# majordomo/resend.
restrict_post = autoupdates.posters

# subscribe_policy [enum] (open)  /open;closed;auto;op
# One of three values: open, closed, auto; plus an optional
# modifier: '+confirm'.  Open allows people to subscribe themselves
# to the list. Auto allows anybody to subscribe anybody to the list
# without maintainer approval. Closed requires maintainer approval
# for all subscribe requests to the list.  Adding '+confirm', ie,
# 'open+confirm', will cause majordomo to send a reply back to the
# subscriber which includes a authentication number which must be
# sent back in with another subscribe command.
subscribe_policy = open

# unsubscribe_policy   [enum] (closed)  /open;closed;auto/
# One of three values: open, closed, auto.  Open allows people to
# unsubscribe themselves from the list. Auto allows anybody to
# unsubscribe anybody to the list without maintainer approval. The
# existence of the file .auto is the same as specifying
# the value auto.  Closed requires maintainer approval for all
# unsubscribe requests to the list. In addition to the keyword, if
# the file .closed exists, it is the same as specifying
# the value closed. The value of this keyword overrides the value
# supplied by any existent files.
unsubscribe_policy = open

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



[PHP] searching and replacing in a file

2003-12-15 Thread Richard Kurth
How can I read through a file and find a string and then replace it with a
new string and then save the whole file.

Below is a peace of what I need to search through. I need to find the string
subscribe_policy = open and replace it with subscribe_policy = open+confirm.
Then save the whole file.

I have tried str_replace but it just wipes out the original file.

$file = "/var/lib/majordomo/domain.com/lists/listname.config";
$fp = fopen("$file", "w+");
$content = fread($fp, filesize($file));
$replace= "subscribe_policy =  open+confirm";
$search_str = "subscribe_policy =  open";
$content2 = str_replace($search_str,$replace, $content);
fwrite($fp,$content2);
fclose($fp);

# restrict_post[restrict_post] (autoupdates) 
# If defined, only addresses listed in these files (colon or space
# separated) can post to the mailing list. By default, these files
# are relative to the lists directory. These files are also checked
# when get_access, index_access, info_access, intro_access,
# which_access, or who_access is set to 'list'. This is less useful
# than it seems it should be since there is no way to create these
# files if you do not have access to the machine running resend.
# This mechanism will be replaced in a future version of
# majordomo/resend.
restrict_post = autoupdates.posters

# subscribe_policy [enum] (open)  /open;closed;auto;op
# One of three values: open, closed, auto; plus an optional
# modifier: '+confirm'.  Open allows people to subscribe themselves
# to the list. Auto allows anybody to subscribe anybody to the list
# without maintainer approval. Closed requires maintainer approval
# for all subscribe requests to the list.  Adding '+confirm', ie,
# 'open+confirm', will cause majordomo to send a reply back to the
# subscriber which includes a authentication number which must be
# sent back in with another subscribe command.
subscribe_policy = open

# unsubscribe_policy   [enum] (closed)  /open;closed;auto/
# One of three values: open, closed, auto.  Open allows people to
# unsubscribe themselves from the list. Auto allows anybody to
# unsubscribe anybody to the list without maintainer approval. The
# existence of the file .auto is the same as specifying
# the value auto.  Closed requires maintainer approval for all
# unsubscribe requests to the list. In addition to the keyword, if
# the file .closed exists, it is the same as specifying
# the value closed. The value of this keyword overrides the value
# supplied by any existent files.
unsubscribe_policy = open

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



[PHP] Help with where clause

2003-12-16 Thread Richard Kurth
I need to know how I can do a where clause in a select statement for mysql
where
one of the fields can have two solutions. In the example below
field3 needs to equal all with a and also all with b. Can this be done and
if so how.
 I am stumped on this one.

select * from table where field1= '$this' and field2 = '$that' and field3 =
'a and b'

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



[PHP] Having problems with a while loop

2004-01-01 Thread Richard Kurth


Way does this while loop not work.
It does not read anything in  the file. If I add ! in front of feof it
will just loop forever but still it will not read the next line in the
file. The file has two lines in it that look like this.
tester3:$1$09BZpdge$b7TQcsYSsAP1hgiCuCWtS1
tester5:$1$5eq3i75D$XK9QzaS.7bHyWVf4bdyJs/


$filenum="test";
$fpHt = fopen($filenum, "r");
$fpLine = fgets($fpHt,512);
while(feof($fpHt)) {
$fpLine = trim($fpLine);
$fpData = explode(":", $fpLine);
$fpData[0] = trim($fpData[0]);
echo $fpData[0];
}

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



Re[2]: [PHP] Having problems with a while loop

2004-01-01 Thread Richard Kurth


Ok I changed it to look this way but it still is not working
$filenum="test";
$fpHt = fopen($filenum, "r");
while(feof($fpHt)) {
$fpLine = fgets($fpHt,512);
$fpLine = trim($fpLine);
$fpData = explode(":", $fpLine);
$fpData[0] = trim($fpData[0]);
echo $fpData[0];
}

And no I am just reading a .htpasswd file to get the user name out of
it



RD> your fgets should be inside the loop. else you are in an infite loop.

RD> ps: are you brute forcing password file ;-)



>>Way does this while loop not work.
>>It does not read anything in  the file. If I add ! in front of feof it
>>will just loop forever but still it will not read the next line in the
>>file. The file has two lines in it that look like this.
>>tester3:$1$09BZpdge$b7TQcsYSsAP1hgiCuCWtS1
>>tester5:$1$5eq3i75D$XK9QzaS.7bHyWVf4bdyJs/
>>
>>
>>$filenum="test";
>>$fpHt = fopen($filenum, "r");
>>$fpLine = fgets($fpHt,512);
>>while(feof($fpHt)) {
>>$fpLine = trim($fpLine);
>>$fpData = explode(":", $fpLine);
>>$fpData[0] = trim($fpData[0]);
>>echo $fpData[0];
>>}

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



[PHP] Problem with using php at the command line with mysql

2004-01-05 Thread Richard Kurth

I am using PHP to do some command line work on a Linux box. I keep
getting this error and can not figure out way. Is there something I am
missing because this should work. There is a copy of the code at the
bottom of this message.

Warning: mysql_fetch_array(): supplied argument is not a valid
MySQL result resource in /usr/.autoserv/html/auto/updatequota.php on line 8

I am using the CLI version of php at the command line as you can see
by the php -v output below
PHP 4.3.3 (cli) (built: Sep 18 2003 14:15:53)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
with Zend Optimizer v2.1.0, Copyright (c) 1998-2003, by Zend Technologies

I also no that I have mysql installed with this version here is a list
of all compiled in Modules

[PHP Modules]
Zend Optimizer
bcmath
calendar
ctype
dba
ftp
gd
gettext
imap
ldap
mbstring
mcrypt
mhash
mysql
overload
pcre
posix
readline
session
sockets
standard
tokenizer
xml
zip
zlib
[Zend Modules]
Zend Optimizer


#!/usr/.autoserv/php/bin/php


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



[PHP] Problem with while loop

2004-01-07 Thread Richard Kurth
 I can't seam to get this while loop to work properly. It should
 create a message that has the first two lines and then it will list
 all the domain that meat the criteria.


$lines = "The following are web sites that are at 95% usage or more of there web 
space\n";
$lines = "Site Name Used(MB)   Free(MB)   Allowed(MB)  \n";
$result=mysql_query("SELECT * FROM domplans");
while($row = mysql_fetch_array($result)){
  $dom=$row["domname"];
  $total=$row["quota"];
  $result1=mysql_query("SELECT * FROM datasubused where domname = '$dom'");
  $proccess = mysql_fetch_array($result1);
  $totalused=$proccess["quotaused"];
  $totalfree=$total - $totalused;
  $percent = ceil(100*$totalused/$total);
If($percent>="95"){
  $lines = "$dom $totalused   $totalfree   $total  \n";
for( $i=0;$ihttp://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] 2d array?

2001-01-10 Thread Kurth Bemis

i'm confused by the method the go about this.

i want to have a location: home / company / about on a page like 
server.com/company/aboutus.php

i'm thinking that i can use an array containing the page name and then 
search the array and return the page title.  now - how do i do this with an 
array?  I know that i've seen it done like aboutus.php:About Company or 
something.  Its hard to explain - can anyone help me?

~kurth
Kurth Bemis - Network/Systems Administrator, USAExpress.net/Ozone Computer

People disagree with me.  I just ignore them.
 -- Linus Torvalds, regarding the use of C++ for the Linux kernel

[EMAIL PROTECTED] | http://www.usaexpress.net/kurth
PGP key available - http://www.usaexpress.net/kurth/pgp

Fight Weak Encryption!  Donate your wasted CPU cycles to Distributed.net 
(http://www.distributed.net)


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




Re: [PHP] Homepage

2001-01-17 Thread Kurth Bemis

At 04:35 PM 1/17/2001, S Bey wrote:

you need to set that in you apache configuration.

open it in pico the press +w and type DocumentIndex

add index.php to the line that you getmine looks like this

DirectoryIndex index.html index.htm index.shtml index.php3 index.php 
index.phtml default.html default.htm

not hard :-)

~kurth

>Just a small (and hopefully easy) question.
>
>Is there a PHP equivalent of index.html? I want to be able to go straight
>to a PHP script without the user specifying the filename.
>
>Thanks, Steve.
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] Hyperlink?

2001-01-17 Thread Kurth Bemis

At 04:42 PM 1/17/2001, Wee Chua wrote:

their defined in style sheets.  Point your browser to www.w3c.org for more 
information

~kurth

>Hi all,
>Could anyone tell me how to show a hyperlink without underline, just regular
>text which contains link. Thanks.
>
>regards
>Calvin Chua
>Systems Analyst
>InterClean Equipment, Inc.
>734-975-2967
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] What "PHP" Stands For....

2001-01-22 Thread Kurth Bemis

At 10:27 PM 1/22/2001, Fraser MacKenzie wrote:

i like people hate perl :-)

~kurth

>Acthually, it stands for Personal Home Page
>
>Frasre
>
>On Tue, 23 Jan 2001, Alexander Wagner wrote:
>
> > Brian White wrote:
> > > 'PHP, which stands for "PHP: Hypertext Preprocessor" ...'
> > >
> > > I frankly don't beleive that "PHP" started life as a recursively
> > > defined acronym - I remember reading somewhere that it stood for
> > > "Personal Home Page" which makes more sense to me.
> > >
> > > Anybody know the truth?
> >
> > IIRC it started as Personal Home Pages and later PHP: Hypertext 
> Preprocessor"
> > was voted to be the new name.
> >
> > Wagner
> >
> >
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] non-php related question.

2001-01-23 Thread Kurth Bemis

At 12:05 PM 1/23/2001, Jason Jacobs wrote:

on linux use wget on windows use websnake.

both are available somewhere on the net.  wget is at freshmeat and websnake 
is available at download.com

~kurth

>Hey guys and gals!  I have my personal site on go.com, and I wanna move it.
>The problem is I don't have it all backed up on my machine (I think I only
>have some of the images), but I want to move it to my server at work.  Does
>anyone know of a script of some sort that will go to my site, copy all the
>files to a specified folder, and follow my internal links?  Thanks for the
>info.
>
>Jason
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




[PHP] updating time fields

2001-01-26 Thread Kurth Bemis

i am wondering if anyone has written a snippet to process the current date 
or mktime into a mysql timestamp feild.

~kurth


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




[PHP] update db

2001-01-26 Thread Kurth Bemis

whats the php function that will let me update a db field?  I've been 
looking at the manual but there seems to be no mention of it.

~kurth


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




[PHP] disregard last two questions

2001-01-26 Thread Kurth Bemis

i'm a bit slow todayplease disregard those last 2 questions from me and 
i answered them myself :-)


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




[PHP] arg....

2001-01-26 Thread Kurth Bemis

i'm having a horrible time updating 2 fields in the same db.  I don't get 
an error but the fields aren't updatedcan anyone send me a snippet for 
the to learn from?

~kurth


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




RE: [PHP] arg....

2001-01-26 Thread Kurth Bemis

At 12:31 PM 1/26/2001, Krznaric Michael wrote:

sorry - here you all go..


// number crunching time
$count++;
$time = date("Y-m-d H:i:s");

$result = mysql_query("INSERT INTO links (count) VALUES $count WHERE lid=$id");

echo $result;



> You need to be a little more specific about DB and problem type.
>You may have to commit the transaction if commit is not implict (ex Oracle).
>There could be many resons including your SQL statement.
>
>Mike
>
>-Original Message-
>From: Kurth Bemis [mailto:[EMAIL PROTECTED]]
>Sent: Friday, January 26, 2001 12:23 AM
>To: [EMAIL PROTECTED]
>Subject: [PHP] arg
>
>
>i'm having a horrible time updating 2 fields in the same db.  I don't get
>an error but the fields aren't updatedcan anyone send me a snippet for
>the to learn from?
>
>~kurth
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




[PHP] header problems

2001-01-26 Thread Kurth Bemis

when i put this
header('location: $url');

i get this

http://domain.com/$url

what the hell am i doing wrong?


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




Re: [PHP] Problem with $REMOTE_ADDR

2001-02-23 Thread Kurth Bemis

At 09:54 AM 2/23/2001, Rosen wrote:

is the machine that your browsing on the same machine that you have your 
serving software on?

~kurth


>Hi,
>I have problem with using of "$REMOTE_ADDR" variable.
>The variable always return me "127.0.0.1" ( localhost ),
>
>How can I get the IP of the remote host ?
>
>Thanks,
>Rosen Marinov
>
>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] Best browser

2001-02-27 Thread Kurth Bemis

At 10:39 AM 2/27/2001, Jason Jacobs wrote:

he's probably referring to the SSL code that the browser uses.  In that 
aspect - it doesn't matter.  i'd personally choose netscape because of 
their good track record and conformity to standards.  M$ does things their 
way or the hiway.  Both browsers use the RSA libs from rsa security, so as 
far as algo compatibility thier both the same.  i think that i'm going in 
circles.but to get to my point - as far as ssl is concerned thier both 
the same.  personally if your worried about sniffing then use netscape with 
the 128 enc pack. what about PPTP? have you looked at that for a solution.?

~kurth

>It's been my experience that Netscape doesn't support mistakes as well as IE
>(example...forgetting a close td tag or close table, stuff like that), so
>usually if I build a page, I use Netscape to check it and it almost always
>works the same in IE.  As far as php and ssl goes, isn't that all server
>stuff?  I'm kinda new at the server end, so this is a good question for me
>2.
>
>Is it going to be an intranet page with the company only using one browser?
>If not, it should really probably be made to work in both browsers equally
>well.
>
>my 2 cents.
>Jason
>
>- Original Message -
>From: Ide, Jim <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Tuesday, February 27, 2001 10:32 AM
>Subject: [PHP] Best browser
>
>
> >
> > I am developing a PHP application for a client that allows
> > users at remote locations to access and update a database.
> > I would like to standardize on one www browser so that the
> > help desk people only have to be knowledgeable about one
> > browser.  The users all have MS Win 95, 98, or NT.  The
> > quality (ie. the 'bug-free-ness") of the browser's SSL code
> > is very important.  What browser should I choose?
> >
> > Thanks -
> > Jim
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




[PHP] hrm...only hit submit once

2001-02-27 Thread Kurth Bemis

i have a form set that my users can fill out thier information.  at the end 
of the process the results are mailed to an email address. then only 
problem is that reloads the page the mail is send again.  this can be a 
problem...any ideas on how to prevent it??

~kurth


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




[PHP] function not working?

2001-02-27 Thread Kurth Bemis

i can't get his function to work.  i pass the correct data to it...but no 
results

heres the function

function display_contents($table,$session)
{
$count = 0;
$result = mysql_query( "SELECT * FROM $table WHERE 
session='$session'");
while($row = mysql_fetch_array($result)){
$result_inv = mysql_query( "SELECT * FROM 
retailseafood WHERE 
pid='$row[items]'");
$row_inventory = mysql_fetch_array($result_inv);
$contents[ "items"][$count] = $row_inventory[pid];
$contents[ "price"][$count] = $row_inventory[price];
//$contents[ "quantity"][$count] = $row[quantity];
$contents[ "total"][$count] = ($row_inventory[price] * 
$row[quantity]);
$count ++;
}
$total = $this->cart_total($table,$session);
$contents[ "final"] = $total;
return $contents;
}
// return number of items in cart

and heres what i do to call the function

View Contents Of Cart

what or where am i doing/going wrong?

~kurth


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




Re: [PHP] How to tell if client has cookies turned off?

2001-03-06 Thread Kurth Bemis

At 10:56 AM 3/6/2001, kevin1 wrote:

try to set one...just a blank/empty one.if it fails then cookies are 
off :-)

~kurth

>How can I tell reliably if someone has cookies turned off?
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




Re: [PHP] PHP & MYSQL BOOKS

2001-03-19 Thread Kurth Bemis

At 03:46 PM 3/19/2001, YoBro wrote:

i get a lot of my books at bookpool.com.  Their prices are lower than 
amazon.com  check them out. www.bookpool.com

~kurth

>I actually think this is the book I have been waiting for. A bookstore in
>New Zealand told me not until March 2001. It must be pretty good, all the
>Sams books are. The only problem is in NZ it is about $170 as opposed to
>amazons $49.95US ($100NZ). If you know somewhere cheaper than amazon, I am
>all ears.
>
>Cheers
>Chris
>
>""Luke Welling"" <[EMAIL PROTECTED]> wrote in message
>99528g$v58$[EMAIL PROTECTED]">news:99528g$v58$[EMAIL PROTECTED]...
>: ""YoBro"" <[EMAIL PROTECTED]> wrote:
>: > Does anybody know any good books & websites to recommend for PHP & MySql
>: > together. I am looking to advance my knowledge and would really
>appreciate
>: a
>: > helpful tip.
>: >
>: > Really looking for a book that explains all the advanced features of
>PHP4
>: > and MySql as a compliment.
>:
>: I can't give you an unbiased opinion on whether it is good or not, but you
>: might like to look at "PHP and MySQL Web Development"
>: by Luke Welling and Laura Thomson.
>:
>: Here is a link to it on Amazon.
>: http://www.amazon.com/exec/obidos/ASIN/0672317842
>: although you can probably get it cheaper elsewhere.
>:
>: It will be published in 10 days.
>:
>: Cheers,
>:
>: Luke Welling
>:
>:
>:
>: --
>: PHP General Mailing List (http://www.php.net/)
>: To unsubscribe, e-mail: [EMAIL PROTECTED]
>: For additional commands, e-mail: [EMAIL PROTECTED]
>: To contact the list administrators, e-mail: [EMAIL PROTECTED]
>:
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] How do i include ASP script into PHP...??!

2001-04-16 Thread Kurth Bemis

At 05:45 PM 4/16/2001, Plutarck wrote:

plus - why would you want to :-)

>Doesn't work.
>
>ASP scripts require an ASP interpreter. If you stick it in a PHP file, PHP
>will try to interpret the ASP code. PHP can't do that.
>
>
>
>--
>Plutarck
>Should be working on something...
>...but forgot what it was.
>
>
>""Joe Truong"" <[EMAIL PROTECTED]> wrote in message
>9bfd8q$gum$[EMAIL PROTECTED]">news:9bfd8q$gum$[EMAIL PROTECTED]...
> > How can i include ASP scripts into PHP files or is it posible?
> > thanxz
> > -Joe
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




[PHP] OT - cyber squatting?

2001-04-17 Thread Kurth Bemis

this is totally OT - however I don't where else to ask.

i need information on cyber squatting. as in what laws there are against 
it, etc.i believe that there was a law passed making cyber squatting 
illegal...but i can't find it at the library of congressany help?

~kurth


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




Re: [PHP] OT - cyber squatting?

2001-04-17 Thread Kurth Bemis

At 12:21 PM 4/17/2001, Plutarck wrote:

thats is exactly what i'm looking for. :-)

thanks

~kurth

>I assume you mean registering a web address of a company, just to keep them
>from registering it or to try and make them pay you for it?
>
>Check NetworkSolutions "domain name dispute" policies.
>
>InterNIC has a pretty good policy, actually. If someone registers a name
>with is copyrighted, trademarked, or is clearly only valuable because it is
>familiar to a registered trademark of copyright, they are in violation and
>the domain name can be taken away from them and awared to the rightful owner
>via arbitration.
>
>To avoid having a domain name taken away they must prove either that they
>have made a good-faith effort to build a destinctive trademark of brand
>which does not impede upon a pre-existing copyright, and that the name was
>not registered for the sole purpose of keeping someone from rightfully
>registering it.
>
>
>Is that what you meant?
>
>
>--
>Plutarck
>Should be working on something...
>...but forgot what it was.
>
>
>"Kurth Bemis" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > this is totally OT - however I don't where else to ask.
> >
> > i need information on cyber squatting. as in what laws there are against
> > it, etc.i believe that there was a law passed making cyber squatting
> > illegal...but i can't find it at the library of congressany help?
> >
> > ~kurth
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] Help with a php Registration Form

2001-04-17 Thread Kurth Bemis

At 01:35 PM 4/17/2001, Michael Leone wrote:

whats the problem taht you having?

>I am trying to write a Registration form that send an email to a specific 
>address.
>The source to the page is at http://www.probesnj.org/etownreg.txt
>Its 400 lines long and I probably just spelled something wrong or missed a 
>semi-colon, but I can't find it and I would appreciate it anyone who has 5 
>minutes to spare could take a look at it. Thanks a bunch!
>
>Michael Leone
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




Re: [PHP] Help with a php Registration Form

2001-04-17 Thread Kurth Bemis

At 01:44 PM 4/17/2001, Michael Leone wrote:

double check ALL of your for loops as well as any place that you may have 
used a curly bracket.

~kurth

>Im getting this pesky parse error at line 392 which is the last line of 
>the document.
>At 01:40 PM 4/17/2001 -0400, you wrote:
>>At 01:35 PM 4/17/2001, Michael Leone wrote:
>>
>>whats the problem taht you having?
>>
>>>I am trying to write a Registration form that send an email to a 
>>>specific address.
>>>The source to the page is at http://www.probesnj.org/etownreg.txt
>>>Its 400 lines long and I probably just spelled something wrong or missed 
>>>a semi-colon, but I can't find it and I would appreciate it anyone who 
>>>has 5 minutes to spare could take a look at it. Thanks a bunch!
>>>
>>>Michael Leone
>>>
>>>
>>>--
>>>PHP General Mailing List (http://www.php.net/)
>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




[PHP] freetype

2001-04-17 Thread Kurth Bemis

i'm attempting to comiple in freetype2 into php4.0.4pl1.  this is my 
configure line

trinity:~/php-4.0.4pl1# ./configure --with-mysql=/usr/local/mysql/ 
--with-apache=../apache_1.3.19/ --enable-freetype-4bit-antialias-hack 
--with-ttf=/usr/local/lib/ --with-gd

and this is what configure spits back at me..

checking whether to add fribidi support... no
checking whether to enable FTP support... no
checking whether to enable truetype string function in gd... no
checking for libjpeg (needed by gd-1.8+)... no
configure: warning: If configure fails try --with-jpeg-dir=
checking for libXpm (needed by gd-1.8+)... no
configure: warning: If configure fails try --with-xpm-dir=
checking whether to include GD support... yes (static)
checking for gdImageString16 in -lgd... (cached) yes
checking for gdImagePaletteCopy in -lgd... (cached) yes
checking for gdImageColorClosestHWB in -lgd... (cached) yes
checking for compress in -lz... (cached) yes
checking for png_info_init in -lpng... (cached) yes
checking for gdImageColorResolve in -lgd... (cached) yes
checking for gdImageCreateFromPng in -lgd... (cached) yes
checking for gdImageCreateFromGif in -lgd... (cached) no
checking for gdImageWBMP in -lgd... (cached) yes
checking for gdImageCreateFromJpeg in -lgd... (cached) no
checking for gdImageCreateFromXpm in -lgd... (cached) yes
checking whether to include FreeType 1.x support... yes
checking for T1lib support... no
checking whether to include GNU gettext support... no


yes gd and freetype2 are installedboth in /usr/local/lib

~kurth


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




[PHP] ttf?

2001-04-17 Thread Kurth Bemis

does anyone have any tutorials on installing gd with freetype 2 support?

~kurth


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




[PHP] TTF + GD

2001-04-17 Thread Kurth Bemis

I have compiled and installed freetype 2.0.1 and gd 1.8.1..the php 
configure script finds the libs okhowever gd still isn't compiled with 
true type font supportsomeone MUST have a solution for what i'm dealing 
with herelook :

checking whether to enable FTP support... yes
checking whether to enable truetype string function in gd... no
checking for libjpeg (needed by gd-1.8+)... yes
checking for jpeg_read_header in -ljpeg... yes
checking for libXpm (needed by gd-1.8+)... no
configure: warning: If configure fails try --with-xpm-dir=
checking whether to include GD support... yes (static)
checking for gdImageString16 in -lgd... (cached) yes
checking for gdImagePaletteCopy in -lgd... (cached) yes
checking for gdImageColorClosestHWB in -lgd... (cached) yes
checking for compress in -lz... (cached) yes
checking for png_info_init in -lpng... (cached) yes
checking for gdImageColorResolve in -lgd... (cached) yes
checking for gdImageCreateFromPng in -lgd... (cached) yes
checking for gdImageCreateFromGif in -lgd... (cached) no
checking for gdImageWBMP in -lgd... (cached) yes
checking for gdImageCreateFromJpeg in -lgd... (cached) no
checking for gdImageCreateFromXpm in -lgd... (cached) yes
checking whether to include FreeType 1.x support... no
checking for T1lib support... no


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




Re: [PHP] PHP/M3U Questions!!!

2001-04-17 Thread Kurth Bemis

At 04:43 PM 4/17/2001, Chris Cocuzzo wrote:

as far as I know the EXTINF is just data that win amp puts in play 
lists.  its just the number of frames i believe then teh song title.  this 
allows winamps play list editor to read the data for the files in the play 
list without opening them all...on a large (450) or so that can take a long 
time

hope this helps..

~kurth

>Hey,
>
>First I'll ask my OT question. I've been thinking lately of implementing a
>system on my band's website where people can log in, and maintain a playlist
>of all the mp3's I have on the site. Obviously when they want to play it, or
>a single file, they can hit play and the m3u file will automatically
>download to whatever mp3 player their using. If you used winamp, you
>probably know the idea I'm getting at. Anyways...I'm confused on one part.
>
>this is what the m3u file looks like:
>#EXTM3U
>#EXTINF:183,Greyboy Allstars - Jack Rabbit
>\\Cocuzzo2\cocuzzo dr d\nap\Greyboy Allstars - Jack Rabbit.mp3
>#EXTINF:96,Greyboy Allstars - Let the music take your mind
>\\Cocuzzo2\cocuzzo dr d\nap\Greyboy Allstars - Let the music take your
>mind.mp3
>#EXTINF:184,Greyboy Allstars - Soul Dream
>\\Cocuzzo2\cocuzzo dr d\nap\Greyboy Allstars - Soul Dream.mp3
>#EXTINF:105,Greyboy Allstars - Fried grease
>\\Cocuzzo2\cocuzzo dr d\nap\Greyboy Allstars - Fried grease.mp3
>#EXTINF:119,Greyboy Allstars Who's Gonna Be The Junkie
>\\Cocuzzo2\cocuzzo dr d\nap\Greyboy Allstars Who's Gonna Be The Junkie.mp3
>#EXTINF:117,Greyboy Allstars - Gravee
>\\Cocuzzo2\cocuzzo dr d\nap\Greyboy Allstars - Gravee.mp3
>
>I understand all of this except for those numbers after the #EXTINF. Does
>anyone know what they mean?
>
>my php question is, what functions might I use to do something like this.
>I've been checking out some code, and I've seen things like people using
>buffers and http functions to get the whole thing working. Any ideas?
>
>--Chris
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




RE: [PHP] PHP/M3U Questions!!!

2001-04-17 Thread Kurth Bemis

At 05:12 PM 4/17/2001, Chris Cocuzzo wrote:

theres a formula for figuring out how many frames based on file size and 
timehowever if your making a playlist with 20 or so entries the 
EXTINF's aren't really nessary

~kurth

>Ok that makes sense definitely. I guess I wonder. How would I code something
>so I could find out the number of frames in a particular mp3 so I could
>generate the m3u file? I've seen a lot of this stuff implemented in PERL,
>however I'm not familiar with PERL that much, so it wouldn't matter.
>PHP-wise, any ideas on how to find that number of frames?
>
>--chris
>
>
>-Original Message-
>From: Kurth Bemis [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, April 17, 2001 4:54 PM
>To: [EMAIL PROTECTED]; PHP General List (E-mail)
>Subject: Re: [PHP] PHP/M3U Questions!!!
>
>
>At 04:43 PM 4/17/2001, Chris Cocuzzo wrote:
>
>as far as I know the EXTINF is just data that win amp puts in play
>lists.  its just the number of frames i believe then teh song title.  this
>allows winamps play list editor to read the data for the files in the play
>list without opening them all...on a large (450) or so that can take a long
>time
>
>hope this helps..
>
>~kurth
>
> >Hey,
> >
> >First I'll ask my OT question. I've been thinking lately of implementing a
> >system on my band's website where people can log in, and maintain a
>playlist
> >of all the mp3's I have on the site. Obviously when they want to play it,
>or
> >a single file, they can hit play and the m3u file will automatically
> >download to whatever mp3 player their using. If you used winamp, you
> >probably know the idea I'm getting at. Anyways...I'm confused on one part.
> >
> >this is what the m3u file looks like:
> >#EXTM3U
> >#EXTINF:183,Greyboy Allstars - Jack Rabbit
> >\\Cocuzzo2\cocuzzo dr d\nap\Greyboy Allstars - Jack Rabbit.mp3
> >#EXTINF:96,Greyboy Allstars - Let the music take your mind
> >\\Cocuzzo2\cocuzzo dr d\nap\Greyboy Allstars - Let the music take your
> >mind.mp3
> >#EXTINF:184,Greyboy Allstars - Soul Dream
> >\\Cocuzzo2\cocuzzo dr d\nap\Greyboy Allstars - Soul Dream.mp3
> >#EXTINF:105,Greyboy Allstars - Fried grease
> >\\Cocuzzo2\cocuzzo dr d\nap\Greyboy Allstars - Fried grease.mp3
> >#EXTINF:119,Greyboy Allstars Who's Gonna Be The Junkie
> >\\Cocuzzo2\cocuzzo dr d\nap\Greyboy Allstars Who's Gonna Be The Junkie.mp3
> >#EXTINF:117,Greyboy Allstars - Gravee
> >\\Cocuzzo2\cocuzzo dr d\nap\Greyboy Allstars - Gravee.mp3
> >
> >I understand all of this except for those numbers after the #EXTINF. Does
> >anyone know what they mean?
> >
> >my php question is, what functions might I use to do something like this.
> >I've been checking out some code, and I've seen things like people using
> >buffers and http functions to get the whole thing working. Any ideas?
> >
> >--Chris
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] Best non-tackified grip enhancer for golfers>

2001-04-18 Thread Kurth Bemis

whoever the mail admin is should start using rblsmtpd :-)

~kurth


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




[PHP] gd php freetype problem solved

2001-04-19 Thread Kurth Bemis

This is just a post to get in the archives.  So if someone searches the 
archives for this they'll hopefully hit this one and their problems will be 
solved.  I've battled this for  two days..and have finally solved the 
problem.  I figure that the should help someone who had problems similar to 
mine.

when you configure php with gd keep in mind that you need to have libgd.a 
in /usr/lib.  libgd.so won't do it!

watch:

./configure --with-mysql=/usr/local/mysql 
--with-apache=/usr/src/apache_1.3.19 --enable-ftp 
--with-jpeg-dir=/usr/src/jpeg-6b --with-png-dir=/usr/src/libpng-1.0.9 
--with-freetype-dir=/usr/src/freetype-2.0.1/ --with-gd=/usr/src/gd-2.0.1 
--with-imap=/usr/src/imap-4.5  --enable-gd-native-ttf' --enable-calendar'

you have to remember to do a make libgd.a in /usr/src/gd-2.0.1 (or where 
ever you untarrred gd)

.a libs are for being statically linked with progs.  .so libs are stand 
alone, dynamic libs.

then everything works ok

you learn something new every day :-)

If anybody has questions i urge to ask me for a copy of the bash script 
that i used to compile php with apache.  Mail me at [EMAIL PROTECTED]

~kurth
Kurth Bemis
Owner: Ozone Computer
Owner/Senior Administrator: USAExpress.net LLC
HomePage: http://kurth.hardcrypto.com

Man kann niemanden zu seinem Glück zwingen


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




Re: [PHP] Site Structure

2001-04-23 Thread Kurth Bemis

At 01:12 PM 4/23/2001, Toby Miller wrote:

personally i deny all access to my .inc files. with this Apache config...

works really good :-)

in httpd.conf

# The following prevents .inc file from being read by web clients


 Order allow,deny
 Deny from all



~kurth

>Jordan,
>
>Not true. If you make your PHP includes look like this:
>
>include("$DOCUMENT_ROOT/includes/header.inc");
>
>Then you can make your image calls with an absolute URL like this:
>
>
>
>Also, it's not a good idea to use the .inc extension unless you've
>associated it with PHP. The reason is if I type the URL directly to
>/includes/header.inc I will get the source code for that file in text
>format. However, if you named it header.inc.php it will still follow an
>intelligent naming convention, but will still get interpreted if someone
>tries to access it directly. This will most likely result in an error or
>will just display a blank page depending on what your header file does.
>Either way it doesn't open your source code up to anonymous users. This is
>why Martin is suggesting you to store your include files outside of the root
>web directory so people can't directly access your source code. So either do
>what I've suggested or do what Martin suggested, but it is definitely worth
>the effort to do one of the two.
>
>--Toby
>
>
>- Original Message -
>From: "Jordan Elver" <[EMAIL PROTECTED]>
>To: "Ben Cairns" <[EMAIL PROTECTED]>
>Cc: "PHP General Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, April 23, 2001 11:28 AM
>Subject: Re: [PHP] Site Structure
>
>
> > Hi,
> > Thanks for the reply. I can do that but then the images will not be in the
> > correct location?
> >
> > Jordan
> >
> > On Monday 23 April 2001 15:58, you wrote:
> > > give the include() function a complete path:
> > >
> > > include '/apache/htdocs/include/yourfile.inc.php';
> > >
> > >
> > > -- Ben Cairns - Head Of Technical Operations
> > > intasept.COM
> > > Tel: 01332 365333
> > > Fax: 01332 346010
> > > E-Mail: [EMAIL PROTECTED]
> > > Web: http://www.intasept.com
> > >
> > > "MAKING sense of
> > > the INFORMATION
> > > TECHNOLOGY age
> > > @ WORK.."
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] Query Analyzer For MySQL with PHP?

2001-04-23 Thread Kurth Bemis

At 02:56 PM 4/23/2001, Brandon Orther wrote:

teh guys a phpwizzard.net wrote phpmyadmin...its a wonderful db admin 
tool...and it has a feature like what your describing.check it 
out...http://www.phpwizzards.net

~kurth
>Hello,
> I recently took an ANSI SQL class to better familiarize my self 
> with SQL in
>general.  In the class we used MSSQL SERVER 7 and to do queries we used the
>Query Analyzer.  Does anyone know of a PHP script that works like the Query
>Analyzer so I can test Queries in a Browser?  Like A Text Area where I can
>put the query and a simple form that sends it to MySQL.
>
>Thanks,
>Brandon
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




RE: [PHP] Filesystem security

2001-04-26 Thread Kurth Bemis

At 03:36 PM 4/26/2001, ..s.c.o.t.t.. [gts] wrote:

or better yet.as in #feed-the-goats on efnet :-)

christ - this is scary...people getting involved in things that they have 
no clue about.

"i have built a rocket, but once i take off i can't figure how to land it 
without breaking a few bones.  can anybody help me?"
"does anybody have any plutonium for sale so  i can build a bomb?  BTW 
what's the atomic number of Hydrogen?"

let me guess - your probably running redhat.  the distro of the owned :-) 
Please get a clue and read a few man pages...or read the LDP or 
something..just pull your head outta .. :-)

~kurth

>my advice would be to disconnect the box from
>the internet until you understand how to properly
>secure it.
>
>please read the documentation and manuals
>before your box gets raped and pillaged
>
>
> > -Original Message-
> > From: Maxim Maletsky [mailto:[EMAIL PROTECTED]]
> > Subject: RE: [PHP] Filesystem security
> >
> >
> > Read the php.ini file and the manuals on php.net.
> >
> > There are some directives which can limit the parser to operate on files
> > under a certain level.
> >
> > You can also disallow functions if you care. As well as what directives can
> > be overwritten by .htaccess files.
> >
> > No idea where have I read all that, but I am sure there is.
> >
> >
> > -Original Message-
> > From: Anton G. Popov [mailto:[EMAIL PROTECTED]]
> > Subject: [PHP] Filesystem security
> >
> > Hi
> >
> > I have to set up a site for free web hosting incl. php
> > I installed apache and php4.0.4pl1 and now the php scripts can browse the
> > entire filesystem of the machine. Does anyone know how to fix that?
> >
> > 10x a lot
> >
> > Antt
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




[PHP] Update statement?

2001-04-30 Thread Kurth Bemis

hey i'm working on a shopping cart..but have hit a snag whit this statement..

function modify_quantity($table, $session, $itemid, $quantity)
{
$sql = "UPDATE $table SET quantity='$quantity' WHERE 
session='$session' 
AND itemid='$itemid'";
mysql_query("$sql");
}

if there is a value in the db field "quantity" then after the statement is 
executed it is set to "0"

here is my calling code.

if ($action == "uq" || $action == "Update" ){
modify_quantity($table,$session,$itemid,$quanity);
}

and the requested url.

http://www.harborfresh.com/retail/cart.php?itemid=21591&quantity=5&action=Update

any ideas?

~kurth


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




Re: [PHP] Update statement?:SOLVED

2001-04-30 Thread Kurth Bemis

At 01:03 PM 4/30/2001, Steve Werby wrote:

I hate the letter "i" :-)

it was missing when i passed quantity to the function

~kurth

>"Kurth Bemis" <[EMAIL PROTECTED]> wrote:
> > function modify_quantity($table, $session, $itemid, $quantity)
> > {
> > $sql = "UPDATE $table SET quantity='$quantity' WHERE session='$session'
> > AND itemid='$itemid'";
> > mysql_query("$sql");
>
>Add 'echo $sql;' here (no quotes) and look at the output.  If the RHS of
>quantity= is zero, then $quantity passed to modify_quantity is zero and
>that's the problem.
>
> > if there is a value in the db field "quantity" then after the statement is
> > executed it is set to "0"
>
>I think that $quantity is the problem.
>
>--
>Steve Werby
>President, Befriend Internet Services LLC
>http://www.befriend.com/
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




[PHP] Protecting programs

2001-05-03 Thread Richard Kurth

Is there any way to protect a php program. Like you can other software
were you can limit the amount of time they can use it. something like a
compiled c program that the php program would have to look of a cod
otherwise it will not work. Or am I just dreaming



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




Re[2]: [PHP] Protecting programs

2001-05-03 Thread Richard Kurth

Hello MaD,
what is obfuscation/encryption

Thursday, May 03, 2001, 5:01:34 PM, you wrote:

MaD> also sprach Richard Kurth (on Thu, 03 May 2001 04:31:42PM -0700):
>> Is there any way to protect a php program. Like you can other software
>> were you can limit the amount of time they can use it. something like a
>> compiled c program that the php program would have to look of a cod
>> otherwise it will not work. Or am I just dreaming

MaD> uhm. open source. you can protect it against the dumbest, but other
MaD> than that... make some vital features of it dependend on a server that
MaD> operates only when it receives a unique serial (md5sum) in the
MaD> request, which you can check againsta a database of expiration
MaD> dates...

MaD> obfuscation/encryption may also work, but that's crackable. or you
MaD> provide a vital part as executable that you system() from the
MaD> script...

MaD> martin;  (greetings from the heart of the sun.)
MaD>   \ echo mailto: !#^."<*>"|tr "<*> mailto:"; net@madduck



-- 
Best regards,
 Richardmailto:[EMAIL PROTECTED]



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




[PHP] Getting the first part out of a string

2001-05-03 Thread Richard Kurth

 I know how to get last part of a string out of a string
 But how do I get the first part before the needle On the example
 below I just what domain

 $hostdomain= domain.com

$host = substr (strrchr ($hostdomain, "."), 1);
 echo $host;  com



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




[PHP] HELP can not see data or tables in database

2001-05-03 Thread Richard Kurth

I have a major problem could somebody take a seeress look at this

 mysql running on cobalt raq4
 I have looked through the archives and looked at the manual
 can not find anything to explain this
 nothing in the mysql log file
 I can not access the databases from the web browser I get empty
 databases

 Went in at telnet erased all the databases including mysql
 ran mysql_install_db
 logged back in with the web browser and the tables were there
 stopped mysql
 restarted mysql
 logged back in with the web browser databases were there but no tables
 I can see the tables if I telnet in and use mysql Command
 What is going on have done this about 6 times
 I really need to fix this
 Should I reinstall mysql?
 Should I shoot my server?



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




[PHP] php installed as cgi with mysql support

2001-05-04 Thread Richard Kurth

 Sense php4 comes with mysql access in it already when I install a cgi
  version of php do I still need to do it this way
  ./configure ==with mysgl
  or can you just do a ./configure  and would you still have access to
  mysql.



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




[PHP] Netscape and post

2001-05-04 Thread Richard Kurth

I am having problems with Netscape and post in a form
In I.E. post works fine but in netscape it just gives me a
Method Not Allowed
The requested method POST is not allowed for the URL /scripts/index.html.



Why is this doing this. Sometimes I just hate Netscape



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




Re: [PHP] nslookup function ?

2001-05-04 Thread Kurth Bemis

At 04:11 PM 5/4/2001, Matthew Luchak wrote:

goto zend.com then to the code exchange...then search for kurth bemis...i 
wrote a fucntion that does just that.

~kurth


>I'm working on a email address verification script and need to do a DNS
>lookup given the IP number of a remote host.
>ie:  is [EMAIL PROTECTED] a viable address?
>
>get IP gethostbyname(here.net);
>nslookup IP to get mail server address
>pfsockopen blah...blah..blah...
>
>sois there a nifty yet undocumented nslookup() function out
>there?
>
>
>Matthew Luchak
>Webmaster
>Kaydara Inc.
>[EMAIL PROTECTED]
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re[2]: [PHP] Netscape and post

2001-05-04 Thread Richard Kurth

Hello Chris,

Friday, May 04, 2001, 10:40:12 PM, you wrote:

Chris> On 4 May 2001 21:48:46 -0700, Richard Kurth <[EMAIL PROTECTED]> wrote:
>> I am having problems with Netscape and post in a form
>> In I.E. post works fine but in netscape it just gives me a
>> Method Not Allowed
>> The requested method POST is not allowed for the URL /scripts/index.html.
>> 
>>
>> 
>> Why is this doing this. Sometimes I just hate Netscape

Chris> Presumably because the action attribute needs to have a value. Since your HTML
Chris> is broken, Netscape is creatively misinterpreting it, as it is wont to do.
 I probably better explain myself better this is a small sample
 of the form. The action is set at the bottom of the form




etc a whole bunch more
then at the end
 <-- Action is set hear



Then it does a bunch of error checking in php code

This works just the way I planed it in IE but not at all in Netscape



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




Re: [PHP] Installing the GD Library

2001-05-09 Thread Kurth Bemis

At 12:47 PM 5/9/2001, Alexander Wagner wrote:

christ - search the list archives.

I wrote a email just for the purpose of being archived so that newbies 
would read it and get a clue.

btw- theres nothing ground breaking in compiling gd into php.  try looking 
in the manual under installation :-)

~kurth

>Joseph Bannon wrote:
> > What all do I need to do to install the GD Library and make it work
> > with PHP?
>
>On what kind of platform?
>
>regards
>Wagner
>
>--
>"Some guy hit my fender, and I told him, 'Be fruitful and multiply,'
>but not in those words."
>  - Woody Allen
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




[PHP] pulling data out of a string

2001-05-14 Thread Richard Kurth


 I am trying to figure out how to pull data out of a string. This is
 driving me crazy. I figure an if statement of some sort would work but
 I'm not sure how to structure it.

I know how to get what I want if it is just
$fullhostname = "www.domain.net";
$exp = explode(".", $fullhostname);

$host = $exp[0];
$domain = $exp[1];
$tld = $exp[2];


 But what if it looks like this
$fullhostname = "www.mysit.dom.net";
I need
$host= www
$domain = mysit.dom
$tld = net

or this
$fullhostname = "mysite.domain.net";
$host =
$domain = mysite.domain
$tld = net

Or even worse this
$fullhostname = "mysit.dom.net";

$host =
$domain = mysit.dom
$tld = net








Best regards,
 Richard  
mailto:[EMAIL PROTECTED]


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




Re[2]: [PHP] pulling data out of a string

2001-05-14 Thread Richard Kurth

Hello Philip,

Monday, May 14, 2001, 3:36:17 PM, you wrote:

That my problem www is not always the host when it is a sub-domain it
would be like mysit.domain.net or sometimes people put a few extra
periods in the domain name like  www.my.test.net  I thought maybe I
could look at the string and find out how many periods are in it then
if there is a www before the first period if not treat it like a
sub-domain. The last period is is any thing after it would be the tld.
How would I count the periods

Philip Hallstrom> Is the host always going to be named "www"?  If it isn't then how can
Philip Hallstrom> you distinguish between www.domain.net and mysit.domain.net where in 
the
Philip Hallstrom> latter what you call the domain is "mysit.domain".  There's no way
Philip Hallstrom> around that one.  However, if you can assume that "www" is always the
Philip Hallstrom> name of the host then you could do something like this:


Philip Hallstrom> $fullhostname = "www.mysit.domain.net";
Philip Hallstrom> $exp = explode(".", $fullhostname);

Philip Hallstrom> if( $exp[0] == "www" )  {
Philip Hallstrom> $hostname = array_shift($exp);
Philip Hallstrom> }else {
Philip Hallstrom> $hostname = "";
Philip Hallstrom> }
Philip Hallstrom> $tld = array_pop($exp);
Philip Hallstrom> $domain = join(".", $exp);


Philip Hallstrom> That should do it...


Philip Hallstrom> In article <[EMAIL PROTECTED]> you write:
>>
>> I am trying to figure out how to pull data out of a string. This is
>> driving me crazy. I figure an if statement of some sort would work but
>> I'm not sure how to structure it.
>>
>>I know how to get what I want if it is just
>>$fullhostname = "www.domain.net";
>>$exp = explode(".", $fullhostname);
>>
>>$host = $exp[0];
>>$domain = $exp[1];
>>$tld = $exp[2];
>>
>>
>> But what if it looks like this
>>$fullhostname = "www.mysit.dom.net";
>>I need
>>$host= www
>>$domain = mysit.dom
>>$tld = net
>>
>>or this
>>$fullhostname = "mysite.domain.net";
>>$host =
>>$domain = mysite.domain
>>$tld = net
>>
>>Or even worse this
>>$fullhostname = "mysit.dom.net";
>>
>>$host =
>>$domain = mysit.dom
>>$tld = net
>>
>>
>>
>>
>>
>>
>>
>>
>>Best regards,
>> Richard  
>>mailto:[EMAIL PROTECTED]
>>
>>
>>-- 
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>>





-- 
Best regards,
 Richard  
mailto:[EMAIL PROTECTED]


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




[PHP] Needing help hear

2001-05-15 Thread Richard Kurth


 I am trying to pull all the e-mail out of the database and put them
 in a format like this [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]
 this is what I have now but I don't seam to be going in the right
 direction. Could somebody give me a hint

$sql = "SELECT email FROM customers";
$result = mysql_query($sql);
$num_rows = mysql_num_rows($result); 

while ($myrow = mysql_fetch_array($result)){

 $recipient=$myrow["email"] . ",";
}
















Best regards,
 Richard  
mailto:[EMAIL PROTECTED]


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




[PHP] Need a little help with array

2001-05-15 Thread Richard Kurth


   I am trying to get the first name and Last name plus the email
   address  out of the database in a format like this
   Richard Kurth<[EMAIL PROTECTED]>;Richard Kurth<[EMAIL PROTECTED]>
   so I can put it in the BCC section of a mail all customer program
   What I have below works for getting the email out but I can't
   figure out how to get the rest out all together

$sql = "SELECT email,fname,lname FROM customers";
$result = mysql_query($sql);

 $recipient = array();
while ($myrow = mysql_fetch_array($result)) 
$recipient[] = $myrow["email"];
$recipient_list = implode(",", $recipient);











Best regards,
 Richard  
mailto:[EMAIL PROTECTED]


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




Re[2]: [PHP] Need a little help with array

2001-05-15 Thread Richard Kurth

Hello Maxim,

This works great except that it does,t print the email if I take the
'<' '>' off then it does but I need those < >

Tuesday, May 15, 2001, 7:58:28 PM, you wrote:

Maxim Maletsky> Try this instead:

Maxim Maletsky> $sql = "
Maxim Maletsky>SELECT
Maxim Maletsky>   CONCAT(fname, ' ', lname, '<', email, '>') AS str_email
Maxim Maletsky>FROM
Maxim Maletsky>   customers
Maxim Maletsky> ";

Maxim Maletsky> and then the rest of your code..

Maxim Maletsky> Sincerely, 

Maxim Maletsky>  Maxim Maletsky
Maxim Maletsky>  Founder, Chief Developer
Maxim Maletsky>  PHPBeginner.com (Where PHP Begins)
Maxim Maletsky>  [EMAIL PROTECTED]
Maxim Maletsky>  www.phpbeginner.com



Maxim Maletsky> -Original Message-
Maxim Maletsky> From: Richard Kurth [mailto:[EMAIL PROTECTED]]
Maxim Maletsky> Sent: Wednesday, May 16, 2001 10:49 AM
Maxim Maletsky> To: [EMAIL PROTECTED]
Maxim Maletsky> Subject: [PHP] Need a little help with array



Maxim Maletsky>I am trying to get the first name and Last name plus the email
Maxim Maletsky>address  out of the database in a format like this
Maxim Maletsky>Richard Kurth<[EMAIL PROTECTED]>;Richard
Maxim Maletsky> Kurth<[EMAIL PROTECTED]>
Maxim Maletsky>so I can put it in the BCC section of a mail all customer program
Maxim Maletsky>What I have below works for getting the email out but I can't
Maxim Maletsky>figure out how to get the rest out all together

Maxim Maletsky> $sql = "SELECT email,fname,lname FROM customers";
Maxim Maletsky> $result = mysql_query($sql);

Maxim Maletsky>  $recipient = array();
Maxim Maletsky> while ($myrow = mysql_fetch_array($result)) 
Maxim Maletsky> $recipient[] = $myrow["email"];
Maxim Maletsky> $recipient_list = implode(",", $recipient);











Maxim Maletsky> Best regards,
Maxim Maletsky>  Richard  
Maxim Maletsky> mailto:[EMAIL PROTECTED]





-- 
Best regards,
 Richard  
mailto:[EMAIL PROTECTED]


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




Re[4]: [PHP] Need a little help with array

2001-05-15 Thread Richard Kurth

Hello Maxim,
That is neat

Tuesday, May 15, 2001, 8:44:57 PM, you wrote:

Maxim Maletsky> because '<' is an '<', 

Maxim Maletsky> look at the source of your HTML file when you are outputting these 
emails
Maxim Maletsky> for testing. or do htmlentities();

Maxim Maletsky> Sincerely, 

Maxim Maletsky>  Maxim Maletsky
Maxim Maletsky>  Founder, Chief Developer
Maxim Maletsky>  PHPBeginner.com (Where PHP Begins)
Maxim Maletsky>  [EMAIL PROTECTED]
Maxim Maletsky>  www.phpbeginner.com



Maxim Maletsky> -Original Message-
Maxim Maletsky> From: Richard Kurth [mailto:[EMAIL PROTECTED]]
Maxim Maletsky> Sent: Wednesday, May 16, 2001 12:25 PM
Maxim Maletsky> To: [EMAIL PROTECTED]; Maxim Maletsky
Maxim Maletsky> Subject: Re[2]: [PHP] Need a little help with array


Maxim Maletsky> Hello Maxim,

Maxim Maletsky> This works great except that it does,t print the email if I take the
Maxim Maletsky> '<' '>' off then it does but I need those < >

Maxim Maletsky> Tuesday, May 15, 2001, 7:58:28 PM, you wrote:

Maxim Maletsky>> Try this instead:

Maxim Maletsky>> $sql = "
Maxim Maletsky>>SELECT
Maxim Maletsky>>   CONCAT(fname, ' ', lname, '<', email, '>') AS
Maxim Maletsky> str_email
Maxim Maletsky>>FROM
Maxim Maletsky>>   customers
Maxim Maletsky>> ";

Maxim Maletsky>> and then the rest of your code..

Maxim Maletsky>> Sincerely, 

Maxim Maletsky>>  Maxim Maletsky
Maxim Maletsky>>  Founder, Chief Developer
Maxim Maletsky>>  PHPBeginner.com (Where PHP Begins)
Maxim Maletsky>>  [EMAIL PROTECTED]
Maxim Maletsky>>  www.phpbeginner.com



Maxim Maletsky>> -Original Message-
Maxim Maletsky>> From: Richard Kurth [mailto:[EMAIL PROTECTED]]
Maxim Maletsky>> Sent: Wednesday, May 16, 2001 10:49 AM
Maxim Maletsky>> To: [EMAIL PROTECTED]
Maxim Maletsky>> Subject: [PHP] Need a little help with array



Maxim Maletsky>>I am trying to get the first name and Last name plus the
Maxim Maletsky> email
Maxim Maletsky>>address  out of the database in a format like this
Maxim Maletsky>>Richard Kurth<[EMAIL PROTECTED]>;Richard
Maxim Maletsky>> Kurth<[EMAIL PROTECTED]>
Maxim Maletsky>>so I can put it in the BCC section of a mail all customer
Maxim Maletsky> program
Maxim Maletsky>>What I have below works for getting the email out but I
Maxim Maletsky> can't
Maxim Maletsky>>figure out how to get the rest out all together

Maxim Maletsky>> $sql = "SELECT email,fname,lname FROM customers";
Maxim Maletsky>> $result = mysql_query($sql);

Maxim Maletsky>>  $recipient = array();
Maxim Maletsky>> while ($myrow = mysql_fetch_array($result)) 
Maxim Maletsky>> $recipient[] = $myrow["email"];
Maxim Maletsky>> $recipient_list = implode(",", $recipient);











Maxim Maletsky>> Best regards,
Maxim Maletsky>>  Richard  
Maxim Maletsky>> mailto:[EMAIL PROTECTED]








-- 
Best regards,
 Richard  
mailto:[EMAIL PROTECTED]


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




Re: [PHP] Generate code bars

2001-05-16 Thread Kurth Bemis

Code bars?  like Barcodes?  I do it with gd and free type with a barcode
font. Works like a charm.  Currently i'm looking at using it on an online
ticking system for conventions.

~kurth

On Wed, 16 May 2001, Sandra Ruivo Grilo wrote:

>
> I have a problem: how can I generate code bars in php ?
>
> Thanks in advance,
> Sandra.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




[PHP] Is there a better way to do this

2001-05-16 Thread Richard Kurth

Is there a better way to do thisI want it to look and see if the
userdata file is there and if true the bypass everything else run rest
of code. If is not then check to see if userdat1 is and if it is
change it's name to userdata the run rest of code. If none of the are
there then gust shut down.


if(file_exists("userdata")) {
 end;
} elseif(file_exists("userdata1")) {
 copy('userdata1','userdata') ;
system("rm userdata1"); 
end;
 } else {
 exit;
 }


   < rest of code>








Best regards,
 Richard  
mailto:[EMAIL PROTECTED]


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




Re[2]: [PHP] Is there a better way to do this

2001-05-16 Thread Richard Kurth

Hello scott,
I what it to look and see if the file exists if it does not
the look and see if the next file exists if it does change its name
and run the rest of the script.

If nether exists the quit the program all together

Wednesday, May 16, 2001, 2:27:19 PM, you wrote:

scott [gts]> what are you trying to do that for?

scott [gts]> there's probably a much cleaner way to do what you 
scott [gts]> want, but i dont really know what you want to do,
scott [gts]> so i cannot suggest anything


>> -Original Message-
>> From: Richard Kurth [mailto:[EMAIL PROTECTED]]
>> Sent: Wednesday, May 16, 2001 5:10 PM
>> To: [EMAIL PROTECTED]
>> Subject: [PHP] Is there a better way to do this
>> 
>> 
>> Is there a better way to do thisI want it to look and see if the
>> userdata file is there and if true the bypass everything else run rest
>> of code. If is not then check to see if userdat1 is and if it is
>> change it's name to userdata the run rest of code. If none of the are
>> there then gust shut down.
>> 
>> 
>> if(file_exists("userdata")) {
>>  end;
>> } elseif(file_exists("userdata1")) {
>>  copy('userdata1','userdata') ;
>> system("rm userdata1"); 
>> end;
>>  } else {
>>  exit;
>>  }
>> 
>> 
>>< rest of code>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> Best regards,
>>  Richard  
>> mailto:[EMAIL PROTECTED]
>> 
>> 
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>> 




-- 
Best regards,
 Richard  
mailto:[EMAIL PROTECTED]


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




Re: [PHP] Encrypt Password for Session

2001-05-17 Thread Kurth Bemis


look in the manual for "md5"

~kurth

On Thu, 17 May 2001, Troy Moreland wrote:

> All,
>
> I am currently using sessions to store a user's ID, password and current
> login status.  All works fine.  The only issue is that the session file on
> the server is storing the password in plain text.  How do I encrypt that
> password and how to I decrypt it for comparing?
>
> Thanks in advance!!
>
> Troy Moreland
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




[PHP] Problem with PHP_SELF

2001-05-18 Thread Richard Kurth

  I am having a problem with this script. It works perfect if I just do
  a Query like ("SELECT * FROM customers") but if I call it from
  another script with a form to set the search criteria for this Query
   ("SELECT * FROM customers WHERE $metode LIKE '%$search%'") It will
   show the first page but it gives me a error for any other page the
   problem is it does not pass the $metode $search on to the next page with
   PHP_SELF (look at bottom of script) How can I make it retain the
   variables to the next page?

// Number of entries per page
$per_page = 3; 
$sql_text = ("SELECT * FROM customers WHERE $metode LIKE '%$search%'");


// Set page #, if no page is specified, assume page 1
if (!$page) { 
   $page = 1; 
} 
$prev_page = $page - 1; 
$next_page = $page + 1; 

$query = mysql_query($sql_text);

// Set up specified page 
$page_start = ($per_page * $page) - $per_page; 
$num_rows = mysql_num_rows($query);


if ($num_rows <= $per_page) { 
   $num_pages = 1; 
} else if (($num_rows % $per_page) == 0) { 
   $num_pages = ($num_rows / $per_page); 
} else { 
   $num_pages = ($num_rows / $per_page) + 1; 
} 
$num_pages = (int) $num_pages; 

if (($page > $num_pages) || ($page < 0)) { 

} 
// 
// Now the pages are set right, we can 
// perform the actual displaying... 
$sql_text = $sql_text . " LIMIT $page_start, $per_page"; 
$query = mysql_query($sql_text); 
?>


Plan
Domain
First Name
Last Name
Company
Email
User Name
Password

";
print 
("$plan$domaname$fname
 
$lname$company$email$cusername$cpassword");
  
echo "";
   } 
echo "";
// Previous
if ($prev_page)  {
   echo "Prev"; 
}

// Page # direct links 
for ($i = 1; $i <= $num_pages; $i++) {
   if ($i != $page) {   
   echo "$i"; 
   } else { 
  echo " $i "; 
   } 
} 

// Next 
if ($page != $num_pages) { 
   echo "Next"; 
}













Best regards,
 Richard  
mailto:[EMAIL PROTECTED]


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




Re: [PHP] Problem with talnet

2001-05-18 Thread Kurth Bemis

At 09:31 AM 5/18/2001, khuram latif wrote:

http://www.openssh.org

you want SSH (Secure Shell) why anyone uses telnet anymore is beyond me.

~kurth

>Hi Dears,
>Please tell me the alternate software of Telnet, because i've problem
>with talnet.
>
>Regards,
>khuram
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




[PHP] Getting email out of a database

2001-05-19 Thread Richard Kurth


  I am trying to pull all the e-mail address out of a database to be
  able to do a mass send.
  This gets me all the e-mail address and puts a , between them which is what
  I want.

$sql = "SELECT CONCAT(email) AS str_email FROM customers";
$result = mysql_query($sql);
 $recip = array();
while ($myrow = mysql_fetch_array($result)) 
$recip[] = $myrow["str_email"];
$recipient_list = implode(", ",$recip);

  I t gives me this list which is what I wanted
[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]

 But now I would like to get the first address in the list into a
 variable and the rest in the list to a second variable Like
 this
$v1=  [EMAIL PROTECTED]
$v2=  [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]

How would I go about this



Best regards,
 Richard  
mailto:[EMAIL PROTECTED]


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




Re: [PHP] Expense

2001-05-19 Thread Kurth Bemis


Clayton - I'm working on a similar time tracking tool myself...then it
exports the data in CSV format.  I'm looking at having it complete next
week.  I'll notify you when it done if your intrested.

~kurth

On Sat, 19 May 2001, Clayton Dukes wrote:

> I did actually look there first. Nothing listed
>
> Thanks anyways :-)
>
>
> Clayton Dukes
> CCNA, CCDA, CCDP, CCNP
> Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net
>
>
> - Original Message -
> From: "Navid Yar" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, May 19, 2001 3:35 PM
> Subject: [PHP] Expense
>
>
> > Clayton, you might want to try hotscripts.com. They have a load of scripts
> > you can choose from, and it's all categorized as well. Good luck
> >
> > Navid Yar
> >   -Original Message-
> >   From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
> >   Sent: Saturday, May 19, 2001 2:22 PM
> >   To: [EMAIL PROTECTED]
> >   Subject: [PHP] Expense
> >
> >
> >   Does anyone know where I can find some type of Expense Report/Tracking
> > system written in PHP?
> >
> >   I'm tired of tracking all my stuff in Excel and sending it in so I
> thought
> > I'd take a crack at making an online tracking system for multiple
> employees
> > that could possibly export to Excel if needed.
> >
> >   Thanks for any help :-)
> >
> >
> >   Clayton Dukes
> >   CCNA, CCDA, CCDP, CCNP
> >   Download Free Essays, Term Papers and Cisco Training from
> > http://www.gdd.net
> >
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




[PHP] mail function. not working

2001-05-19 Thread Richard Kurth

  Way does this not work it sends to the recipient but it will not
  send to the bcc this is right out of the manual.
$recipient .= "[EMAIL PROTECTED]";
$subject = "Hello";
$message .= "The is the message\n";
$message .= "--\r\n"; //Signature delimiter
$message .= "http://northwesthost.com";;
$headers .= "From: Richard Kurth <[EMAIL PROTECTED]>\n";
$headers .= "X-Sender: <[EMAIL PROTECTED]>\n"; 
$headers .= "X-Mailer: NorthWestHost\n";
$headers .= "X-Priority: 1\n";
$headers .= "Return-Path: <[EMAIL PROTECTED]>\n";
$headers .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime type
$headers .= "bcc:[EMAIL PROTECTED], [EMAIL PROTECTED]\n"; // BCCs to

mail($recipient, $subject, $message, $headers);
  











Best regards,
 Richard  
mailto:[EMAIL PROTECTED]


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




[PHP] should be simple

2001-05-20 Thread Richard Kurth

I am trying to pull html code out of a database to put in page
something like this which I have stored in a database under cheader





mailto:[EMAIL PROTECTED]


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




Re: [PHP] should be simple

2001-05-20 Thread Richard Kurth

Hello Richard,

Never Mind It was a stupid mistake I am querying all the data in a
function and forgot to add the variable to the global list work just
fine DU!!

Monday, May 21, 2001, 7:08:16 AM, you wrote:

Richard Kurth> I am trying to pull html code out of a database to put in page
Richard Kurth> something like this which I have stored in a database under cheader
Richard Kurth> 
Richard Kurth> 
Richard Kurth> 
Richard Kurth>  
Richard Kurth> 
Richard Kurth> mailto:[EMAIL PROTECTED]





-- 
Best regards,
 Richard  
mailto:[EMAIL PROTECTED]


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




Re: [PHP] Tab ordereing

2001-05-22 Thread Kurth Bemis

i believe that the attrib is taborder="3"  bewarethat its not 4.0 standard 
tho.if i find a good resource then i'll send ti along to the list

> The order is the order they are written in the html code.
> 
> I'm not aware of any way to make it otherwise...
> 
> 
> Plutarck
> 
> "Tarrant Costelloe" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> What's the syntax for defining the tab order on a input box?
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail:
>> [EMAIL PROTECTED]
>>
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]


-- 
This is my test sig


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




[PHP] Running Crontab on php script

2001-05-23 Thread Richard Kurth

I have a php script that runs at root. I have php compiled as a cgi to
do this.
My question is what is the best way to run a crontab so that it does
not send a message every time it runs. This script runs every 5 min
and it can get pretty frustrating to get this email.
The script runs only if there is another file present if the file is
not there it shuts down. But I still get the email.
I have it set this way right know and I only get an email if there is
an error. Is there a better way to do it

5 * * * * /home/sites/home/auto/creatacct.php > /tmp/logdump.LOG
0 0 * * * /home/sites/home/auto/mail.php > /tmp/logdump.LOG
 











Best regards,
 Richard  
mailto:[EMAIL PROTECTED]


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




[PHP] Problem with PHP as CGI

2001-05-23 Thread Richard Kurth








 I have php config as a cgi and I put this at the top of my script
 
 #!/usr/local/bin/php -q

 when ever I run this script at root in
 telnet I get this message below. I configured php like this
 
 ./configure --with-mysql
 make
 make install
 
 I have set this up on a number of servers But I have never had this
 problem before any id why I am getting this.

Error in argument 1, char 3: option not found
Error in argument 1, char 3: option not found
Usage: php [-q] [-h] [-s [-v] [-i] [-f ] |  { [args...]}
  -q Quiet-mode.  Suppress HTTP Header output.
  -s Display colour syntax highlighted source.
  -f   Parse .  Implies `-q'
  -v Version number
  -c   Look for php.ini file in this directory
  -a Run interactively
  -d foo[=bar]   Define INI entry foo with value 'bar'
  -e Generate extended information for debugger/profiler
  -z   Load Zend extension .
  -l Syntax check only (lint)
  -m Show compiled in modules
  -i PHP information
  -h This help




Best regards,
 Richard  
mailto:[EMAIL PROTECTED]


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




Re[2]: [PHP] Problem with PHP as CGI

2001-05-23 Thread Richard Kurth

Hello Stuart,
yes there is a 



Wednesday, May 23, 2001, 9:06:08 PM, you wrote:

Stuart J. Browne> "Richard Kurth" <[EMAIL PROTECTED]> wrote in message
Stuart J. Browne> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>>
>>  I have php config as a cgi and I put this at the top of my script
>>
>>  #!/usr/local/bin/php -q
>>
>>  when ever I run this script at root in
>>  telnet I get this message below. >
>> Error in argument 1, char 3: option not found
>> Error in argument 1, char 3: option not found

Stuart J. Browne> Code snippett would help, but it sounds as if the first line (after 
the
Stuart J. Browne> hash-bang) is NOT  I've found that oddities occur without that as the first line of your
Stuart J. Browne> script..

Stuart J. Browne> bkx






-- 
Best regards,
 Richard  
mailto:[EMAIL PROTECTED]


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




Re[2]: [PHP] Problem with PHP as CGI

2001-05-23 Thread Richard Kurth

Hello ..s.c.o.t.t..,
I fixed the problem it seems there was something wrong with the file
when it was uploaded to the server. It works now
I am using shebang lines because this script has to run
at root it runs other programs on the server that need to be run at
root. php is set up to just run scripts at the Command line. I have php
as a DSO for Apache.

Thursday, May 24, 2001, 2:19:35 AM, you wrote:

..s.c.o.t.t..> im not sure that i understand the question, but the way
..s.c.o.t.t..> i've got my apache/PHP configured, i dont ever see
..s.c.o.t.t..> the actual path to the PHP binary.

..s.c.o.t.t..> what type of problem are you having ??

..s.c.o.t.t..> PS: i never use shebang lines in my PHP scripts;
..s.c.o.t.t..> i have apache configured to handle *.php files
..s.c.o.t.t..> as PHP code.



>> -Original Message-
>> From: midget2000x [mailto:[EMAIL PROTECTED]]
>> Sent: Wednesday, May 23, 2001 20:33
>> To: Stuart J. Browne; [EMAIL PROTECTED]
>> Subject: Re: [PHP] Problem with PHP as CGI
>> 
>> 
>> This is not an answer, but a further question on this subject.  Do you (or
>> anybody) know of a way to keep the path to PHP from showing up when the PHP CGI
>> script is hit via HTTP?
>> 
>> On Wed, 23 May 2001, Stuart J. Browne wrote:
>> > "Richard Kurth" <[EMAIL PROTECTED]> wrote in message
>> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> > >
>> > >  I have php config as a cgi and I put this at the top of my script
>> > >
>> > >  #!/usr/local/bin/php -q
>> > >
>> > >  when ever I run this script at root in
>> > >  telnet I get this message below. >
>> > > Error in argument 1, char 3: option not found
>> > > Error in argument 1, char 3: option not found
>> > 
>> > Code snippett would help, but it sounds as if the first line (after the
>> > hash-bang) is NOT > > 
>> > I've found that oddities occur without that as the first line of your
>> > script..
>> > 
>> > bkx
>> > 
>> > 
>> > 
>> > -- 
>> > PHP General Mailing List (http://www.php.net/)
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>> -- 
>> ---
>> providing the finest in midget technology
>> 
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>> 




-- 
Best regards,
 Richard  
mailto:[EMAIL PROTECTED]


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




Re: [PHP] PLEASE SIGN-ME OFF !

2002-01-16 Thread Kurth Bemis

At 08:17 AM 1/16/2002, treiger wrote:

maybe if you wern't totally retarded you read the footer of this email and 
EVERY other email that passed through this list.

~kurth

>PLEASE SIGN-ME OFF !
>
>I've sent already all emails requested to sign-me off this list, but I keep
>receiving emails
>
>
>Sergio Treiger
>
>- Original Message -
>From: "Stefan Rusterholz" <[EMAIL PROTECTED]>
>To: "Dani" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
>Sent: Wednesday, January 16, 2002 11:09 AM
>Subject: Re: [PHP] CONTINUE - variable problem - help!
>
>
> > whoops, typo:
> > echo (isset($row["somename_$var"]) && $row["somename_$var"] !== "") ?
> > $row["somename_$var"] : "Sorry, but \$row[\"somename_$var\"] is not set.";
> >
> > above code should be correct :) (notice: it's only 1 line - email could
> > display it on multiple lines).
> >
> > and here a smaller explanation of the ternary operator (?:):
> > echo (condition) ? "condition is true" : "condition is false";
> > if conditions evaluates to true then PHP interprets it like
> > echo "condition is true";
> > else
> > echo "condition is false";
> >
> > best regards
> > Stefan Rusterholz
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] 2d array help

2002-01-21 Thread Kurth Bemis


Yes I do...
for an online billing system...

Kurth Bemis
Senior Network Admin/Owner: USAExpress.net
Owner: Ozone Computer

http://kurth.hardcrypto.com
PGP Key Avail.
-
Uh!.Uh!.Uh!."I'm done with this."...Out the window

On Mon, 21 Jan 2002, Jim Lucas [php] wrote:

> $result = mysql_query( "SELECT pkgid FROM plans");
> while($row = mysql_fetch_assoc($result))
> {
> $package = mysql_fetch_assoc(mysql_query( "SELECT * FROM plans WHERE
> pkgid='$row[pkgid]'"));
> }
> obviously this will have
>
> $package = array("key" => "value", ...);
>
> are you wanting to have the above be referanced by the pkgid ?
>
> Jim Lucas
> bend.com
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, January 21, 2002 2:51 PM
> Subject: [PHP] 2d array help
>
>
> > arg- trying to get the data that I pull outta my db into a 2d assoc
> array...
> >
> > any help?
> >
> > ~kurth
> >
> > $result = mysql_query( "SELECT pkgid FROM plans");
> > while($row = mysql_fetch_assoc($result)){
> > $resultpkg = mysql_query( "SELECT * FROM plans WHERE
> > pkgid='$row[pkgid]'");
> > $package = mysql_fetch_assoc($resultpkg);
> > }
> >
> > print_r($plan);
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [PHP] Variables Limit

2002-01-26 Thread Kurth Bemis

Unless your getting the values through a POST or a GET...both of these
have limitesi forget what it is...maybe 1024 bytes?  you'd jave to
read the http rfc

~kurth

On Sat, 2002-01-26 at 14:51, Nick Wilson wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> 
> * and then Philip J. Newman blurted
> > I have to exchage over 304 different names, codes, and dates ...
> 
> 305? :-)
> Doesn't sound like it would be a problem.
> - -- 
> 
> Nick Wilson
> 
> Tel:  +45 3325 0688
> Fax:  +45 3325 0677
> Web:  www.explodingnet.com
> 
> 
> 
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.6 (GNU/Linux)
> 
> iD8DBQE8UwiwHpvrrTa6L5oRAkQrAJ492AZqZdf03jBAWSgw+AF+um3PFwCglfGg
> kRF7wnfQD7eICNfD+siLqLw=
> =Y3QF
> -END PGP SIGNATURE-
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 



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




[PHP] test

2001-10-19 Thread Kurth Bemis

system test


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




[PHP] problem with a while loop

2001-10-25 Thread Richard Kurth

 I am trying to get the data out of the while loop if I echo $email
 inside the } it gives me all of the data but if I echo it out side of
 the loop it only gives me one record even though I know there is
 more. How can I get this to work

$query = "SELECT * FROM members Where Company  LIKE '%$search1%'";
$result=mysql_db_query($dbName,$query);
while ($row = mysql_fetch_array($result)) {
$email= $row["lname"] . " " . "<" . $row["E_mail_1"] . ">" . ";";
}


echo $email;

-- 
Best regards,
 Richard  mailto:[EMAIL PROTECTED]


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




Re: [PHP] Good php-tool for administer users on mysql?

2001-12-07 Thread Kurth Bemis

At 09:56 AM 12/7/2001, Stefan Rusterholz wrote:

phpmyadmin  - its great!

get it at phpwizard.net

~kurth

>Does anyone know a webbrowser/php based tool which allows to administer 
>user privileges in mysql easily?
>
>Thanks in advance
>Stefan Rusterholz, [EMAIL PROTECTED]
>--
>interaktion gmbh
>Stefan Rusterholz
>Zürichbergstrasse 17
>8032 Zürich
>--
>T. +41 1 253 19 55
>F. +41 1 253 19 56
>W3 www.interaktion.ch
>--


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




[PHP] get data from file

2001-12-10 Thread Kurth Bemis

I need to get data from a web page generated by mrtg in my page

i have come up with the following code

", $string);
$string2 = explode("", $string1[1]);

$stat = eregi("",$string2[0]);

echo $stat;
//while (list ($key, $val) = each ($string3)) {
 //echo "$key => $val";
//}

?>

however - I get a "1" when look on the php site - under manual...

any ideas?

~kurth


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




Re: [PHP] The "peacock" logo... and others...

2001-12-13 Thread Kurth Bemis

At 02:30 PM 12/13/2001, Rasmus Lerdorf wrote:

my asp buddy saw this message as said "Cuckoo, huh?  Maybe thats because 
you have to be crazy to use it."

sigh - when will those pesky Microsoft junkies ever learn :-)

~kurth

>The O'Reilly animal for PHP is a cuckoo bird.
>
>On Thu, 13 Dec 2001, Philip Hallstrom wrote:
>
> > Not to throw a wrench into the plans and it's not clear that it really
> > matters, but O'Reilly uses a peacock for an XML book.
> >
> > http://www.oreilly.com/catalog/xmlnut/
> >
> > and a pelican for this book.
> >
> > http://www.oreilly.com/catalog/webclient/
> >
> >
> > I suspect that most animals are probably being used by oreilly...  whether
> > that matters I'll leave up to someone else :)
> >
> > -philip
> >
> >
> >
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] Pre-Written Script ?

2001-03-21 Thread Kurth Bemis

At 09:08 PM 3/21/2001, Jack Sasportas wrote:

ah - true laziness.this is what gave birth to wysiwyg editors like 
frontpage :-)  do your self a favor and get off your ass and write code 
like everybody else.  I bet that you use frontpage too. Christ!  if your 
going to develop then you can't be lazy.  that's it i'm finished!

~kurth

>PhpMyAdmin is to manage MySQL, I want to take an existing table lets say
>phone_book and then have a script generate the add/edit/modify scripts so I
>don't have to code it, and look at how it is coded...
>
>Any Ideas ?
>
>Thanks!
>
>Keith Vance wrote:
>
> > That's sounds like a good task for you to take on, you will learn a lot
> > about writing PHP code. I don't really know what you are talking about,
> > but you can look at phpMyAdmin or something.
> >
> > K E I T H  V A N C E
> > Software Engineer
> > n-Link Corporation
> >
> > On Wed, 21 Mar 2001, Jack Sasportas wrote:
> >
> > > Has anyone found a good prewritten (gpl) script that helps you to create
> > > the php code to add/edit/modify based on selecting a table that you want
> > > to put data into ?
> > >
> > > I want to use this both to get some data in the computer as well as to
> > > learn other coding techniques.
> > >
> > > Thanks !
> > >
> > > ___
> > > Jack Sasportas
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>--
>___
>Jack Sasportas
>Innovative Internet Solutions
>Phone 305.665.2500
>Fax 305.665.2551
>www.innovativeinternet.com
>www.web56.net
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




  1   2   3   4   >