RE: [PHP] bulletin board or forum

2001-05-10 Thread ..s.c.o.t.t.. [gts]
blaze board is what i use: http://www.bbhacks.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]

RE: [PHP] if $index=1 how can I create a variable named $column_1

2001-05-10 Thread ..s.c.o.t.t.. [gts]
And even though it's much less elegant than the solution by Sean below, you could also use 'eval' $toast = array(wheat, rye, pumpernickel); $numbreads = count($toast); for ($index = 0; $index $numbreads; $index++) { eval(\$column$index = '$toast[$index]'; echo

RE: [PHP] Forms and PHP_SELF

2001-05-10 Thread ..s.c.o.t.t.. [gts]
or if you're hellbent on using one form, you could set a cookie db_insert_formname=1; so that if the page refreshes, you can check the value of the cookie to make sure you dont re-insert the data -Original Message- From: Sandeep Hundal [mailto:[EMAIL PROTECTED]] Sent: Thursday,

RE: [PHP] ereg issues

2001-05-10 Thread ..s.c.o.t.t.. [gts]
print preg_replace('/(.*?)(\w{2})(.*)/', '\\2', $blah); works for: $blah = *9 scott 777zxsdf; and $blah = scott; -Original Message- From: Jerry Lake [mailto:[EMAIL PROTECTED]] Subject: [PHP] ereg issues I'm feeling a bit stupid today how do I truncate a string to the first two

RE: [PHP] regex pattern match and extract

2001-05-10 Thread ..s.c.o.t.t.. [gts]
use match_all to get an array of matches. $s = [VET]We r NOT [PA]-Crew [TC]; preg_match_all('/\[.*?\]/', $s, $matches); while (list($k,$v) = each($matches[0])) { print $k = $vBR\n; } prints: 0 = [VET] 1 = [PA] 2 = [TC] -Original Message- From: Michael Roark

RE: [PHP] Check this out - http://www.hotscripts.com/webpoll/results.php

2001-05-10 Thread ..s.c.o.t.t.. [gts]
that's an extremely biased poll... considering that it's a *scripting* website. it's only logical that a majority of people going there would choose a scripting language (and since PHP is so newbie friendly, it also makes sense that it has such broad appeal to the newbie web-programmers at the

RE: [PHP] conversion script

2001-05-08 Thread ..s.c.o.t.t.. [gts]
if you're renaming to .PHP, i assume that you'll be using PHP. use PHP to solve your problem: This was taken directly from the PHP.net site: if ($dir = @opendir(/tmp)) { while($file = readdir($dir)) { echo $file\n; } closedir($dir); } as others have said before, read the

RE: [PHP] php, snmp, and mibs

2001-05-08 Thread ..s.c.o.t.t.. [gts]
as someone else suggested... a regexp is probably the thing you want. since i have no idea what the format of a MIB is, i cannot give you any example. but to find dotted num's, use something akin to this: preg_match_all('/(\d+)(?=\.?)/', $MIB, $matches); -Original Message- From:

[PHP] Multiple select box and form submitting

2001-05-07 Thread ..s.c.o.t.t.. [gts]
i apologize in advance if the answer to my question is glaringly obvious. i've got a multiple select on a form and want to find out *all* selected values. the form looks like so: SELECT NAME=form[category] MULTIPLE OPTION VALUE=0First OPTION VALUE=1Second OPTION VALUE=2Third /SELECT when the

RE: [PHP] Variable question (eval is cool)

2001-05-07 Thread ..s.c.o.t.t.. [gts]
$bob = Roy; $s = 'Hey there $bob'; $s = 'print '. $s .';'; eval ($s); prints: Hey there Roy; perhaps that's what you're looking for? -Original Message- From: John Vanderbeck [mailto:[EMAIL PROTECTED]] Sent: Monday, May 07, 2001 4:21 PM To: King, Justin; [EMAIL PROTECTED] Subject:

RE: [PHP] Variable question

2001-05-07 Thread ..s.c.o.t.t.. [gts]
this also works, since you mentioned that you're trying to get away from evalling an echo statement. $bob = Roy; $s = 'Hey there $bob'; $s = '$somevar = '. $s .';'; eval ($s); print $somevar; prints: Hey there Roy; personally, i think that using regexps to implement an entire symbol parsing

RE: [PHP] Filesystem security

2001-04-26 Thread ..s.c.o.t.t.. [gts]
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]

RE: [PHP] Can I install Lihnux on My Windows 95 machine ?

2001-04-26 Thread ..s.c.o.t.t.. [gts]
the learning curve is smaller than most people think... if you are willing to learn, and refuse to be intimidated by the reputation that has been built up around linux, i doubt you'll have any problems installing and running/using it in a lot of ways, i think linux is probably a more natural OS

RE: [PHP] Passing arrays from page to page

2001-04-25 Thread ..s.c.o.t.t.. [gts]
well, one idea is to serialize the array and put into a HIDDEN text field to be submitted with the FORM. or, with no form, try this: doc.php?myarray=. htmlentities(serialize($array)); -Original Message- From: Clif [mailto:[EMAIL PROTECTED]] Subject: [PHP] Passing arrays from page to

RE: [PHP] translating a function from Perl to PHP

2001-04-25 Thread ..s.c.o.t.t.. [gts]
i tried to do it myself and nearly fell off my chair becuase PHP makes you jump through hoops to do such a simple thing print preg_replace('/%([a-zA-Z]*)%/e', \$mioArray['$1'], $testo); i never could understand why other languages made regular expressions so convoluted. why not just

RE: [PHP] PERL vs. PHP

2001-04-20 Thread ..s.c.o.t.t.. [gts]
PHP was started as a suite of perl programs... it is heavily influenced by perl. if you understand PHP and are comfortable with it, you should not have any problems learning Perl. there are some very important differences between the two languages that you need to keep your eyes open for,

RE: [PHP] PERL vs. PHP

2001-04-20 Thread ..s.c.o.t.t.. [gts]
i program in both PHP/Perl, and the concepts are extremely similar... granted, there are some similarities to C++, but by far, the largest contributor to PHP's language design has been Perl. -Original Message- From: Steve Lawson [mailto:[EMAIL PROTECTED]] Subject: Re: [PHP] PERL

RE: [PHP] PERL vs. PHP

2001-04-20 Thread ..s.c.o.t.t.. [gts]
ahhh... sorry. i thought the history of PHP was a bunch of perl scripts that were used to keep track of website statistics or somethign guess i was wrong. but since you replied, can i ask what influenced you most when developing PHP? personally, i see perl influence everywhere in PHP, but

RE: [PHP] Another easy question!

2001-04-20 Thread ..s.c.o.t.t.. [gts]
it depends. is it a char restriction that MySQL is placing on you? e.g. a TINYTEXT field type can only contain 255 chars, whereas a TEXT type can contain 16MB (or something like that) if it's a PHP restriction, you'll have to wade thru PHP scripts to find the function that checks the length,

RE: [PHP] Password Generator?

2001-04-19 Thread ..s.c.o.t.t.. [gts]
you could try swapping out some letters with look-alike alphanum characters to make the password a bit more secure a=@ s=$ d= thus, "password" = "p@$$wor" -Original Message- From: Jon Snell [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 11:47 AM To: [EMAIL

RE: [PHP] Which is better coding style...

2001-04-19 Thread ..s.c.o.t.t.. [gts]
i say the first style. unneeded variables and other thingies just obscure things and make it harder to maintain. -Original Message- From: Boget, Chris [mailto:[EMAIL PROTECTED]] Subject: [PHP] Which is better coding style... Which is better? function blah() { switch( $bob )

RE: [PHP] Which is better coding style...

2001-04-19 Thread ..s.c.o.t.t.. [gts]
$retval = "this"; break; case 2: $retval = "that"; break; default: $retval = "other"; break; } return $retval; } -----Original Message-

[PHP] PHP and CVS

2001-04-05 Thread ..s.c.o.t.t.. [gts]
do any of you know of any nice web-interfaces to CVS done in PHP? since i write code at home and at work, i wanted to maintain a single repository for files/code that i frequently use... thanks for any suggestions. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail:

RE: [PHP] BSD/GD/PHP/APACHE/SOS

2001-03-30 Thread ..s.c.o.t.t.. [gts]
i did it for linux. basically, what i did was to get GD and the other libraries, 'configure' and 'make' them all then, go into the PHP directory and tell PHP's configure script where GD and such reside: ex: ./configure --with-gd-dir=../gd-1.8.4/ --with-jpeg-dir=../jpeg-6b/ somthing similar

RE: [PHP] BSD/GD/PHP/APACHE/SOS

2001-03-30 Thread ..s.c.o.t.t.. [gts]
did you compile apache yourself? try compiling apache yourself and then compiling PHP as a stanalone-CGI (as opposed to server module) and see if that helps any of your prob's. -Original Message- From: Louis Grenzebach [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 11:53

RE: [PHP] sanity check please

2001-03-30 Thread ..s.c.o.t.t.. [gts]
well, besides the fact that your code is interpreted and the only data that makes it to the browser is what you decide to output (or error message, but they can be turned off/silenced) i dont see how a surfer could get your PHP source code via the webserver. -Original Message- From:

[PHP] compiling PHP4

2001-03-30 Thread ..s.c.o.t.t.. [gts]
has anyone had trouble compiling PHP and GD on a linux/redhat machine?? (what baffles me the most is that it compiled flawlessly on another, almost identical, machine) could anyone offer suggestions or hints, or perhaps suggest a good website/discussion/archive that might address GD-PHP

[PHP] Sessions: suggestions and comments

2001-03-23 Thread ..s.c.o.t.t.. [gts]
what i did was implement my own session class so that i can have a single session variable ($s) and have it handle all my session needs via an OO interface ($s-CleanUp(), $s-Update(), ...) consequently, all of my session data is in a simple assoc. array that's a variable of the session class

RE: [PHP] How send a file usig PHP code ?

2001-03-23 Thread ..s.c.o.t.t.. [gts]
send the proper HTTP headers and then output the contents of the file here's what i used when i had to prompt the user for a download box for arbitrary binary files (.gif, .zip, .png, .pdf) you might be able to not tell the browser the size of the data, but it's best to offer that

RE: [PHP] I need an authentication method that is good... any Ideas? - please help

2001-03-22 Thread ..s.c.o.t.t.. [gts]
the way i do it for sites that need minimal to medium is to generate a session id whenever a user comes to the site. this session id is stored in mysql table and as a cookie on the user's computer. when the user logs in correctly, the username is stored in the database with the session ID (not

RE: [PHP] Encryption Problem

2001-03-22 Thread ..s.c.o.t.t.. [gts]
quite possibly you did not compile PHP with mcrypt library support. for linux distrib's, mcrypt is not default, you have to specify ./configure --with-mcrypt to get mcrypt functionality (i dont know whether it's included by default with the win binary, but i doubt it) do the phpinfo() thing and

RE: [PHP] Printing MySQL into HTML Tables

2001-03-22 Thread ..s.c.o.t.t.. [gts]
modulus also works for finding even nums: if ($i % 2) { // not even } -Original Message- From: darion mapp [mailto:[EMAIL PROTECTED]] Subject: Re: [PHP] Printing MySQL into HTML Tables now it seems like you know what is to be done and you are not willing to do the work.

RE: [PHP] PHP/CGI Help

2001-03-22 Thread ..s.c.o.t.t.. [gts]
do .php files work anywhere else? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Maroufski Sent: Thursday, March 22, 2001 5:41 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP/CGI Help Hi all, This is a tough one, wasn't able to find a

RE: [PHP] Crypt problem

2001-03-22 Thread ..s.c.o.t.t.. [gts]
you dont... as far as i know, crypt only works on = 8 chars it will truncate anything over 8. perhaps try using md5 or mcrypt... -Original Message- From: Randy Johnson [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 4:33 PM To: [EMAIL PROTECTED] Subject: [PHP] Crypt

RE: [PHP] php 4.04pl 1-3 for red hat 7

2001-03-22 Thread ..s.c.o.t.t.. [gts]
check php.net and read the 'README' and 'INSTALL' files that come in the .tar.gz file for more detailed information. very basically, you want to get the sources, untar/zip them, run configure, then build the thing and test it (you can do all of this as an unprivileged user). then install as

RE: [PHP] Error working

2001-03-15 Thread ..s.c.o.t.t.. [gts]
this is a PHP list. your problem is with java, not PHP -Original Message- From: Celestino Roberto Alejandro [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 15, 2001 3:34 PM To: Lista PHPGral Subject: [PHP] Error working Hello..i'm veri tired, and i am going to require your

RE: [PHP] Help! Can't redeclare already declared function in

2001-03-15 Thread ..s.c.o.t.t.. [gts]
try using include_once() and require_once() in place of include() and require() also, make sure you havent defined any functions that match PHP internal funcs. -Original Message- From: Johnson, Kirk [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 15, 2001 3:29 PM To: php Subject:

RE: [PHP] Interactive Shells

2001-03-15 Thread ..s.c.o.t.t.. [gts]
of course. if it supports sockets then i dont see why it wouldnt work with a back-n-forth exchange of information over those sockets. php.net/sockets look how much smaller that URL is than all the text you typed out in the message :) always check the online manual first. -Original

RE: [PHP] Has anyone got MSSQL2000 to connect and work properlly?

2001-03-15 Thread ..s.c.o.t.t.. [gts]
of course it's possible... :) -Original Message- From: Brandon Orther [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 15, 2001 5:33 PM To: PHP User Group Subject: [PHP] Has anyone got MSSQL2000 to connect and work properlly? Hello, I am trying to get PHP4 to connect to

RE: [PHP] do..while(0) not staying true

2001-03-07 Thread ..s.c.o.t.t.. [gts]
or do .. while (0==0); -Original Message- From: Jim Winstead [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 07, 2001 2:23 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] do..while(0) not staying true trick question, right? 0 is false. you want do { ... } while(1); jim --

Re: [PHP] MySQL execution order?

2001-02-22 Thread ..s.c.o.t.t.. [gts]
mysql executes the queries in the order it recieves them, (so if your program's logic executes a select before an update, you'll never see results from the update in your select... at least not normally :) Are you able to access the MySQL monitor program? if so, verify that the data really does

Re: [PHP] Where do i look up return status codes?

2001-02-20 Thread ..s.c.o.t.t.. [gts]
for system("perl test.pl", $retval); and exec("perl test.pl", $ary, $retval); the value of $retval is the value that the perl script "test.pl" returns, (not a perl status code). as someone else suggested, go and look for exit(126) statements (or just exit(), if exit returns the value of a

Re: [PHP] PHP Book Recommendations

2001-02-16 Thread ..s.c.o.t.t.. [gts]
I agree... The red book "Professional PHP Programming" (WROX "Programmer to Programmer" series) is an exellent PHP book but, if you're looking for novice level stuff, WROX also published a companion called "Beginning PHP4". i was fluent in perl when i picked up the professional one, and had no

Re: [PHP] Finding the? in $REQUEST_URI?page=blah

2001-02-16 Thread ..s.c.o.t.t.. [gts]
i'd use split, to split the value up into an array: if this is your url $url = "/pages/error.php?/pages/login.php?user=scott"; and use this code: $thing = split('\?', $url); print $thing[0] ." BR\n "; print $thing[1] ." BR\n "; print $thing[2] ." BR\n "; output will be: