Re: [PHP] Novice PHP Variable/Link Question

2004-09-16 Thread Greg Donald
On Thu, 16 Sep 2004 14:54:34 -0700, revDAVE <[EMAIL PROTECTED]> wrote: > How can I use a PHP variable as the destination for a link? > > > go here > > With var...? How do I write this? > > go here -- Greg Donald http://gdconsultants.com/ http://destiney

Re: [PHP] How can I have a PHP-CLI script which uses stdin open another PHP-CLI that uses stdin.....

2004-09-16 Thread Greg Donald
ch of PHP-CLI scripts which open other helper PHP-CLI > scripts which may be called together or apart (so includes don't work) > cat first.php second.php third.php #!/usr/bin/php #!/usr/bin/php #!/usr/bin/php > ./first.php I am first.php I am second.php I am third.php --

Re: [PHP] checking multiple URL parameters

2004-09-16 Thread Greg Donald
ay ( [x] => 1 ) Array ( [x] => 1 ) -- Greg Donald http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] MySQL query for average records per day

2004-09-16 Thread Greg Donald
+ | 2004-01-01 | 3 | 2. | | 2004-01-02 | 4 | 2.5000 | | 2004-01-03 | 4 | 3.5000 | +----+---+-+ 3 rows in set (0.01 sec) -- Greg Donald http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP4 readdir is_dir working incorrectly?

2004-09-16 Thread Greg Donald
> >http://www.morningstarcom.net/hosting.php Need sunglasses to view the t50.com graphics. Heh. -- Greg Donald http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] MySQL query for average records per day

2004-09-16 Thread Greg Donald
nt(number) | avg(number) | +---+-+ |18 | 2.3889 | +---+-+ 1 row in set (0.00 sec) -- Greg Donald http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mysql_connect does not connect

2004-09-15 Thread Greg Donald
ossibilities in the manner you say. You obviously know what's best Sam.. Good luck. -- Greg Donald http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] MySQL to OO

2004-09-15 Thread Greg Donald
> a class would make it alot easier. > > Does anybody know such a project or something similar? > I just want to avoid writing to much SQL http://pear.php.net/package/DB_QueryTool -- Greg Donald http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://w

Re: [PHP] jpgraph newbie

2004-09-15 Thread Greg Donald
syntax > errors, they will be displayed but this just doesn't seem to do > anything. Are you supplying it with fonts? The last time I installed JPGraph it required Arial and Arial Bold at least. Does your PHP install support the GD library? -- Greg Donald http://gdconsultant

Re: [PHP] Checking file_exists()

2004-09-15 Thread Greg Donald
$upload_file) { > $db = mysql_connect("localhost","usr","pwd"); > mysql_select_db("imsafm",$db); > $date = date("m-d-Y, D, H:i"); > $trauma = 'imsafm/$PHP_login/$img1_name'; Variables inside single quotes don't get evaluat

Re: [PHP] security issus

2004-09-15 Thread Greg Donald
works all right. > Has anyone experienced this before? Did I just misconfigure something? This may be of some help: http://httpd.apache.org/docs/mod/mod_dir.html -- Greg Donald http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubs

Re: [PHP] IIS 4 vulnerabilities

2004-09-15 Thread Greg Donald
rewall for a couple of games that aren't available otherwise. Other than that I find the Windows OS a very risky venture, especially when it comes to server applications. Microsoft has proven time and time again they are fairly incapable of being secure. That may change in the future

Re: [PHP] OK ... WHY does this work ?????

2004-09-14 Thread Greg Donald
orks) is that PHP > makes the key the same as the value if the key isn't specified. But is this > actually correct Or is there something "going on" that I don't know > about ??? Yes, that is what's happening, a simple test shows this: #!/usr/bin/php outpu

Re: [PHP] mysql_connect does not connect

2004-09-14 Thread Greg Donald
works. If it doesn't then post some error messages and code for what's being tried and failing. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] replace accents

2004-09-14 Thread Greg Donald
On Tue, 14 Sep 2004 17:51:00 +0200, Diana Castillo <[EMAIL PROTECTED]> wrote: > Anyone know of any function to replace letters with accents with just the > regular letter, for instance replace á with a, > ç with c, ñ with n ? str_replace(), eregi_replace() -- Greg Donald http

Re: [PHP] usage stats

2004-09-13 Thread Greg Donald
x27;s like 3 or 4 of us at least. :) Check out netcraft.com, they seem to be the defacto standard for stuff like this. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php.net code samples grey boxes

2004-09-13 Thread Greg Donald
ful php source code again. Thanks to all you guys for checking. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: MSSQL, PHP and Linux

2004-09-13 Thread Greg Donald
/ "the Fedora Project is for developers and high-tech enthusiasts using Linux in non-critical computing environments." Sorry, I don't mean to offend.. but I see no reason to help report and fix RedHat bugs for free when they no longer offer us a free public distro that isn't bleedi

Re: [PHP] Re: whois with php

2004-09-13 Thread Greg Donald
f you have other suggestions, please tell us! I'd suggest searching freshmeat.net for "php whois". Chances are others have already invented a good wheel we can use. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] php.net code samples grey boxes

2004-09-13 Thread Greg Donald
wnloaded a couple months back looks fine but the live site seems broken. TIA.. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problem creating a date before 1970 on Fedora

2004-09-13 Thread Greg Donald
. A couple years ago when upgrading some web servers we found RedHat 7 had this issue, strtotime() basically didn't work and always returned -1 on 'negative' unix timestamps. I have never used Fedora but it's probably the same issue all over again. I know this isn'

Re: [PHP] if syntax using multiple conditions

2004-09-13 Thread Greg Donald
)) Then > messages = "Bad filename" > filename = "" > WhichAction = 0 > End If I'd use a regular expression so as to match all those symbols with one command. Check out eregi() or maybe strstr(). -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] dynamical class variable definition

2004-09-13 Thread Greg Donald
} } class Obj { var $x = 1; function Obj(){} } $o = new Obj(); $a = array(1, 2, 3); bindArray($a, $o); print_r($o); ?> Produces: obj Object ( [x] => 1 [0] => 1 [1] => 2 [2] => 3 ) You may want to prefix your key names with some text however. :) -- Gre

Re: [PHP] URL encode/decode problem

2004-09-13 Thread Greg Donald
uot;. Can you change it back before you decode it? Maybe with str_replace() ? -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] dynamical class variable definition

2004-09-13 Thread Greg Donald
die("bindArray() failed: array expected"); foreach($array as $k => $v){ $obj->$k = $array[$k]; } } -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] multi dimension array

2004-09-13 Thread Greg Donald
On Mon, 13 Sep 2004 08:04:41 -0700 (PDT), Dan McCullough <[EMAIL PROTECTED]> wrote: > $sql = "SELECT dealer.dealerid as ddealerid, dealer.company as company, dealer.name > as name, > dealer.surname as surname, dealer.email as email, dealer.contactday as contactday, > orders.orderid > as oorderid

Re: [PHP] URL encode/decode problem

2004-09-13 Thread Greg Donald
es unicode, so you may wanna check out the multi-byte string functions: http://www.php.net/manual/en/ref.mbstring.php -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] multi dimension array

2004-09-13 Thread Greg Donald
y want to do a LEFT JOIN with the relevant field. SELECT * FROM dealer LEFT JOIN orders ON dealer.dealerid = order.dealerid WHERE order.status = '10' GROUP BY dealer.dealerid or something like that. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/

Re: [PHP] URL encode/decode problem

2004-09-13 Thread Greg Donald
characters "+", quotes, etc. > The form post data with "GET" method. And then I can't get correctly posted > data in my PHP script. How to "unescape" data with PHP? > > Can someone help me ? stripslashes() perhaps? -- Greg Donald http://destiney.com

Re: [PHP] Re: [Newbie Guide] For the benefit of new members

2004-09-11 Thread Greg Donald
a > semi-colon ";" and will see the problem immediately. So save yourself a lot of time and get a colorful editor like vim or editplus or something.. :) -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP5 OOP

2004-09-10 Thread Greg Donald
. Overall it's long-winded and the humor is dry. Tons of useless chatter in between the information you really want. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] multi dimension array

2004-09-10 Thread Greg Donald
while(). What database are you using? What do your tables look like? Where's the code you've written already if any? -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] OO Docs for SQLite extension

2004-09-10 Thread Greg Donald
.php.net/sqlite -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Advanced Query Wizard

2004-09-10 Thread Greg Donald
less and less all the time. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP modules

2004-09-10 Thread Greg Donald
up for that. If > anyone can provide information on building custom functions and calls > into PHP it would be helpful. Did you try Google'ng for 'extending PHP'. I found lots of stuff just now. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http

Re: [PHP] Array inside Class

2004-09-10 Thread Greg Donald
> > > Output: > Parse error: parse error, unexpected '(', expecting ',' or ';' in > /srv/www/htdocs/stundenplan/stpoo.php on line 4 Did you try var $input2 = array_pad($this->input, 10, 1); -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] stdin buffering

2004-09-09 Thread Greg Donald
On Thu, 2004-09-09 at 15:25, Jim Grill wrote: > exec("stty -icanon min 0 time 0"); Nice. I suspect 'phpSnake' will appear on freshmeat in a couple days. :) -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] stdin buffering

2004-09-09 Thread Greg Donald
ring in PHP. You may find ncurses_getch() of use however. http://www.php.net/ncurses_getch -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Users of RDBMS

2004-09-08 Thread Greg Donald
riendly for all. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Users of RDBMS

2004-09-08 Thread Greg Donald
On Wed, 2004-09-08 at 14:01, Pahlevanzadeh Mohsen wrote: > Dears, > I need to create user for MySQL. > Please guide me.. http://dev.mysql.com/doc/mysql/en/Adding_users.html -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://ww

Re: [PHP] What's faster? MySQL Queries or PHP Loops?

2004-09-08 Thread Greg Donald
can create JOINs between MyISAM tables? Maybe I need to do some more > research into table types? Yes, more research. Maybe you're confusing relational with transactional. -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] data grids...

2004-09-08 Thread Greg Donald
On Wed, 2004-09-08 at 13:15, blackwater dev wrote: > Does anyone have a nice clean way to provide data grids with php short > of simply creating a bunch of input boxes or using flash? What is a 'data grid' ? -- Greg Donald -- PHP General Mailing List (http://www.php.net/

Re: [PHP] mail() from addess problems

2004-09-07 Thread Greg Donald
und it's not possible to do a header rewrite with > postfix either. Add a "From:" header in the optional last field of your mail() call. -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Intermittent Seg Fault with PHP4.3.8 + FTP

2004-09-07 Thread Greg Donald
ther servers. I had to work on a client machine running some kind of windows ftp server a few months ago, and I had very similar issues. Random unexplainable breakages when downloading lots of files. I know this doesn't help your current issue, but I thought I would share my experience.

Re: [PHP] Instant private messenger

2004-09-06 Thread Greg Donald
PHP, I mean if that's what you want to code it in and stuff. I haven't ever seen any private messenger tutorials though, probably a little too specific, I dunno.. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sessions and Logins

2004-09-03 Thread Greg Donald
ion_destroy(). > D/ How is it possible, using PHP4+ sessions, to cancel a session a page is opened > with, and starting a new session? session_destroy(); -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP Linux "locate" to html script?

2004-09-03 Thread Greg Donald
On Fri, 2004-09-03 at 12:46, BOOT wrote: > Does anyone have a script that can be used to call linux's locate command > and display the results in a browser? -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: register global off

2004-09-01 Thread Greg Donald
x27;s that? Learn to use print_r(), it will recursively print all the variables in your arrays and such. For example to debug this situation you can do something like: echo ''; print_r($POST); echo ''; and you'll see $POST is empty cause you typo'd it, it's $_POST not

[PHP] Re: register global off

2004-09-01 Thread Greg Donald
if that's what you want and all. Also, you might want to check with your web host that ".htaccess" is an allowed override filename and that they allow overrides, it looks like it is from you described. Long story short, you appear to be all set. -- Greg Donald -- PHP General Mai

Re: [PHP] $_SERVER['HTTP_HOST'] without the 'www.'

2004-08-31 Thread Greg Donald
ed at using substr but if the user leaves out the 'www.' then > substr($_SERVER['HTTP_HOST'], 4) would return 'main.com', is there a better > function to use in this instance? str_replace() You can replace the www. with an empty string. -- Greg Donald -

RE: [PHP] PHP- Dependant dropdown based on Mysql queries

2004-08-30 Thread Greg Donald
of these a couple years back it was in the spec that the page would not reload. In addition, a single select costs less than multiple selects with where clauses. Good luck.. however you decide to code it. -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP- Dependant dropdown based on Mysql queries

2004-08-30 Thread Greg Donald
ect options with one query, then create new javascript Option objects for each. Then populate the select fields based on the previous select field's selection. -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Browser back button

2004-08-27 Thread Greg Donald
ack they will go to your intermittent page just after the form, not the form page itself. 3) Use a header() call to send the user to a totally new page after the POST. -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] US / Canada Zip Codes List

2004-08-26 Thread Greg Donald
RL right off hand but the US post office releases a new zip code database every year. It's a little flat file you can stick in a database to query against. -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP: Undefined Variables Error Message

2004-08-26 Thread Greg Donald
> work. I have even tried copying a known-good php.ini from another server > and the same behavior exists. I am running IIS in Windows 2000. Any ideas? Is your error_reporting turned up too high for the quality of the code? http://www.php.net/error_reporting -- Greg Donald -- PHP Gener

Re: [PHP] Re:[PHP] imap_search and results

2004-08-26 Thread Greg Donald
t($mails); for($i=0; $i<$count; $i++){ } -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Caching Database Information

2004-08-25 Thread Greg Donald
;s a list serve, and especially since I'm not the poster of the original question. -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] crypt()

2004-08-25 Thread Greg Donald
_globals", FALSE); > but it still doesn't work. > On php.net manual I can find WHAT I have to do and reasons but not HOW. Make an .htaccess file: php_flag register_globals off -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mail functions help

2004-08-25 Thread Greg Donald
If someone could > clarify that'd be great. > > -Andrew If you just want to see if mail() works try it. If it doesn't work then your mail setup is not working. Setting up an SMTP server has nothing to do with PHP. Google will probably help you if that's your issue

Re: [PHP] Caching Database Information

2004-08-25 Thread Greg Donald
ve query caching, and so do most file systems. There are also PHP caching tools like TurkeMM Cache and Zend that cache byte code only. I'd bench it both ways and then decide based on the queries, the development environment, and the cache timeout limitations/requirements. -- Greg Donal

Re: [PHP] Image Width Error

2004-08-24 Thread Greg Donald
config? What should I be looking for. Oh! Looks like you currently have no gd support for the PHP image related functions. Try loading the gd extension in your php.ini. -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] readfile()

2004-08-23 Thread Greg Donald
t also ask them if they have any specific PHP functions disabled. -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] readfile()

2004-08-23 Thread Greg Donald
r the downloads dir and > also the file...rwxr-xr-x for both. > > Anyone have any idea why this isnt working? Is the download directory outside a chroot'd web setup perhaps? Or maybe your provider has some security you don't know about? There are some file related fun

Re: [PHP] Getting the size of a mysql table using php

2004-08-14 Thread Greg Donald
ble status like 'table_name'; size = Data_length + Index_length -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] good book on PEAR

2004-08-03 Thread Greg Donald
On Tue, 3 Aug 2004 10:39:42 -0500 (EST), Amanda Hemmerich <[EMAIL PROTECTED]> wrote: > I need a solid foundation on using PEAR. ANy books or websites you > would recommend? You might try http://pear.php.net/ -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http:/

Re: [PHP] Google question

2004-07-14 Thread Greg Donald
he kit, simply unzip it and open the file "README.txt" to get started." on: http://www.google.com/apis/download.html Plus you can search the web for free sample PHP scripts people made for use with the Google API. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (

Re: [PHP] Google question

2004-07-14 Thread Greg Donald
this sort of query. http://www.google.com/apis/index.html -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Online Users

2004-07-02 Thread Greg Donald
ably already setting some kind of userID or userName, so make that a session variable if it is not already. Then it's just a matter of listing the userNames or userIDs out of the userSessions table. You might want to force session garbage collection at the top of each script by calling sessionGarbageCollection(). That will make the username listings more realtime. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Handling Code Continuation

2004-06-25 Thread Greg Donald
: > function input($type,$size,$name,$value) > { > return ">> > name=\"$name\">"; > } function input($type,$size,$name,$value) { return << EOF; } -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] printing out messages while processing a file

2004-06-22 Thread Greg Donald
/stdout', 'w'); fwrite($stdout, "status message goes here\r\n"); Why would you want to print tags in a console? The console isn't HTML aware. You probably just want \r\n as line delimiters. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] OT? Getting peer reviews for an entire application

2004-06-22 Thread Greg Donald
to just make suggestions for general code improvement. > > So, where else might I find people that are willing to give general > reviews of code? Release it on Freshmeat.net. The reviews (and bug reports) will arrive shortly. You can also do all sorts of developer networking on Sourcef

Re: [PHP] How to add carriage returns??

2004-06-22 Thread Greg Donald
On Wed, 23 Jun 2004 00:47:23 -0500, Brent Clements <[EMAIL PROTECTED]> wrote: > > How do I add linefeeds every few words? php.net/wordwrap -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sorting a large text string alphabetically

2004-06-21 Thread Greg Donald
y or object > in /var/www/html/list.php on line 236 > > Warning: Variable passed to each() is not an array or object in > /var/www/html/list.php on line 237 > > What am I doing wrong? foreach($names as $key => $names){ You are reusing the same variable, $names is being overwritten. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] include_path problem in executing program from root folder

2004-06-21 Thread Greg Donald
and > the program executes. The include_path has "." folder in it. > > What could possibly be the problem with executing the program from the /www > folder? Make the include call to db_mysql.inc a full path. Cron isn't aware of much at all as far as system paths. ../ won

Re: [PHP] include question

2004-06-21 Thread Greg Donald
> } else { >echo "action asked for is not specified"; > } > } else { > echo "action is not specified"; > } > ?> Looks like it would work to me. You might try function_exists() to help track down the problem. Probably a typo or mispelled function name. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Mysql fetch_row()

2004-06-20 Thread Greg Donald
y but I find I rarely need it as I usually already know the field names and the primary keys of all my tables. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: is there any application ,

2004-06-20 Thread Greg Donald
ache server was distributed with that. People seem to be doing all sorts of things with PHP lately. I've made a couple little php-gtk apps, it's pretty simple and the run really fast too. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Search Sanitization

2004-06-16 Thread Greg Donald
to do that. It handles regular form variables as well as arrays. So if your form had an array of checkboxes coming in via $_POST for example, it will handle it. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Just Testing

2004-06-16 Thread Greg Donald
ng a test message can get you practically beheaded on some lists, lkml for example. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Search Sanitization

2004-06-16 Thread Greg Donald
sset($_POST) ? array_map("slashes", $_POST) : array(); $_COOKIE = isset($_COOKIE) ? array_map("slashes", $_COOKIE) : array(); } function slashes($var){ if(is_array($var)) return array_map("slashes", $var); else return addslashes($var); } -- Gre

Re: [PHP] index.php not loading up

2004-06-16 Thread Greg Donald
27;re using. Mine are in /var/log/apache for example. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Just Testing

2004-06-15 Thread Greg Donald
On Tue, 15 Jun 2004 19:21:39 -0400, Michael Lauzon <[EMAIL PROTECTED]> wrote: > I am just testing, so that I can create a filter. Or a label rather? -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Self Testing PHP Code... Is it possible or practical??

2004-05-27 Thread Greg Donald
testing php > out there. Thanks for any pointers, ideas, advice or help you may have. You can use assert() for simple debugging. http://php.net/assert There's also PHPUnit2 for bigger stuff. http://pear.php.net/package/PHPUnit2 -- Greg Donald http://destiney.com/ -- PHP Genera

Re: [PHP] Re: CONSTANTS and good coding practice

2004-05-21 Thread Greg Donald
ows about all your CONSTANTS, but eval() doesn't. I made this little function so I could use defined CONSTANTS in HTML templates that get eval()'d. function makeConstants() { foreach(get_defined_constants() as $k=>$v) $GLOBALS[$k] = $v; } -- Greg Donald [EMAIL PROTECTED] -- PH

[PHP] eval() with CONSTANTS

2004-05-20 Thread Greg Donald
at looks like: instead of the desired Any ideas? I've google'd, and read lots of docs today trying to figure it out but I don't know what else to try. TIA. -- Greg Donald [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Making an app unviewable during system maintainance

2004-04-20 Thread Greg Donald
be down near that > time. Without causing too many if statements what is the best way to do > this ? Get another server, setup replication, and do backups off the slave, virtually no downtime then. Otherwise make a site-down page and cron it's swap out schedule with your backups schedule.

Re: [PHP] PHP Web Hosting

2004-04-20 Thread Greg Donald
stserve was for PHP discussion, not bogging up everyone's mailbox with uninteresting bits. -- Greg Donald [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP Web Hosting

2004-04-19 Thread Greg Donald
be > mistaken and there may still be someone out there using 900baud. ;) You missed the point. But that's ok, I fixed the issue on my end. :0 * ^From:.*kegworks.com.* /dev/null -- Greg Donald [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Why are Session Variables carried over into a brand new browser window?

2004-04-17 Thread Greg Donald
rowser. A buddy of mine created a secure sessions tutorial that protects against this exact issue. He has a fantasy stocks site and needed to protect against session hijacking. http://tutorials.dotgeek.org/tutorial.php?action=view&id=58 -- Greg Donald [EMAIL PROTECTED] -- PHP Gener

Re: [PHP] PHP editor

2004-04-15 Thread Greg Donald
Richard Davey wrote: Passing a potentially huge string through a replacement function for every single page doesn't really = efficient in my shop. YMMV. We use Turke MMCache so it's not every single page. Besides that CPUs are way cheaper than bandwidth. -- Greg Donald [EMAIL PROTECT

Re: [PHP] PHP editor

2004-04-15 Thread Greg Donald
On Thursday 15 April 2004 01:38 pm, John W. Holmes wrote: > Certainly don't need to fire up the regex engine. > > return str_replace(array("\r","\n","\t"),'',$html); Sweet, didn't know you pass it an array. Thx! -- Greg Donald [EMAIL P

Re: [PHP] PHP editor

2004-04-15 Thread Greg Donald
bout it :) There is no > "right or wrong", it's down to personal preferences. Well at my shop more efficient = right and less efficient = wrong. -- Greg Donald [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP editor

2004-04-15 Thread Greg Donald
long time without any issues. View my efficient single line of html source code: http://destiney.com/. All the styles and javascript work fine. HTML parsers don't give a rats ass about newlines, tabs, and carriage returns so why have them.. Makes the output easier to compress as well. -- G

Re: [Re: [PHP] PHP editor]

2004-04-15 Thread Greg Donald
On Thursday 15 April 2004 12:21 pm, Jorge Oliveira wrote: > I use spaces for php code and tabs for html. And the point of doing that is? -- Greg Donald [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP editor

2004-04-15 Thread Greg Donald
t;, "", $return); > > } > > Not to be too pedantic, but you could probably reduce the above > to a single line function: > > function cleanFinalOutput($html){ > return eregi_replace("\n", "", eregi_replace("\r", "", > ere

Re: [PHP] PHP editor

2004-04-15 Thread Greg Donald
s would mean additional processing and > replacements seems to be resources consuming sometimes... Works for me. Feel free to not use it. -- Greg Donald [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP editor

2004-04-15 Thread Greg Donald
and carriage returns. It does not remove space characters. Your example seems to be the dangerous one. -- Greg Donald [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP editor

2004-04-15 Thread Greg Donald
> or > > echo str_repeat( "\t", 5 ); Remove all whitespace from the final HTML, then all this doesn't matter. function cleanFinalOutput($html){ $return = eregi_replace("\n", "", $html); $return = eregi_replace("\r", "", $r

Re: [PHP] mysql connect function in my class

2004-04-14 Thread Greg Donald
that would add more functionality to it if possible... Why reinvent the wheel? http://pear.php.net/packages.php?catpid=7&catname=Database -- Greg Donald [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] dreaded sessions

2004-01-19 Thread Greg Donald
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brian V Bonini wrote: | Kind of funny... Back before PHP had sessions this was how everyone did | it and everyone wished for session support in PHP, now that it's had it | for a while :) I hear ya. I recall a job interview in like 1999 or something

<    4   5   6   7   8   9   10   11   >