[PHP] Re: [PEAR] PHP 4.4.0 references problems when using PEAR::SOAP

2005-10-07 Thread Justin Patrin
; This notice was added because PHP has memory corruption issues when doing this particular thing (it always has). -- Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Sorting an array by value length.

2003-10-22 Thread Justin Patrin
You want to use usort, which lets you specify a comparison function. function cmpByLength($a, $b) { return strlen($a) strlen($b); } usort($arrayToSort, 'cmpByLength'); And change the '' to '' if the ordering is wrong. Rolf Brusletto wrote: Hey all - I've been scouring the php.net site for a

[PHP] Re: Check mysq_field_type, display appropriate FORM element

2003-10-22 Thread Justin Patrin
I'm working on a general purpose database data editor in PHP which can allow users to edit what you want and also knows about linked record with no extra coding. I was planning on putting this kind of field typing and type checking in my code, but haven't gotten around to it yet. If you're

[PHP] Re: get user attributes php/ldap/win2k active directory

2003-10-23 Thread Justin Patrin
. It's very nice for finding OU's and such. Justin Patrin Redmond Militante wrote: hi all my first email to the list re: php/ldap/win2k AD garnered no responses. i've got most of the problem solved, however i can't get attributes from the ldap server. i have a login script that authenticates

Re: [PHP] usort

2003-10-27 Thread Justin Patrin
No need to write your own function, it's already in PHP. :-) What you're looking for it natsort(). It uses natural order string comparison (which takes into account numbers instead of just using characters like a regular search does). There are also lots of other 'nat' functions, such as

[PHP] Re: Post variables and mysql queries

2003-10-27 Thread Justin Patrin
$query='Select * from users where userid='.$_POST['userid'].''; I tend to use single quotes whenever I can and to use concatenation instead of using in-string variables. I do this for three reasons. The first is efficiency. Strings surrounded by single chars are not parsed for any values, such

[PHP] Re: eregi function?

2003-11-25 Thread Justin Patrin
Jas wrote: Not sure how to do this but I have a call to a database which pulls the contents of a table into an array and I need a eregi string which will sift through the contents and put a line break (i.e. \n or br) after each ;, } or {. here is what I have so far... while($b =

Re: [PHP] trim...

2003-11-26 Thread Justin Patrin
trim also gets rid of leading spaces... Mike Ford wrote: On 26 November 2003 16:59, [EMAIL PROTECTED] contributed these pearls of wisdom: Why doesn't this work...? $body = pblurb blah phappy days pend of text; $body = trim($body); $body now should output: pblurb blah\nphappy days\npend of

[PHP] Re: PHP Java extension--hopeless?

2003-11-26 Thread Justin Patrin
If you *must* get it to run in Java (starting and using a JVM for every page seems very costly to me) then I would suggest writing a simple Java app which writes the decoded values to stdout and using system() in PHP to run the JVM manually. Kelly Hallman wrote: I am trying to find help or

[PHP] Re: talking to a web page

2003-12-03 Thread Justin Patrin
You can use PEAR's HTTP_Client package (http://pear.php.net/package/HTTP_Client) to connect to a website, do authentication, post forms, handle redirects, etc. It also keeps track of cookies. Here's a sample (note that the URLs in this will probably not work): require_once('HTTP/Client.php');

[PHP] Re: validating email address

2003-12-03 Thread Justin Patrin
Or you could always use the PEAR package: http://pear.php.net/package/Validate Manuel Lemos wrote: Hello, On 12/03/2003 04:31 PM, Blake Schroeder wrote: Whats the best way to validate email address (check for white space, check for .com, .net.edu etc) Try this class:

[PHP] Re: validating email address

2003-12-03 Thread Justin Patrin
Actually it does do DNS checking. It doens't yet check to make sure that the mail will work, but it could easily be added. Manuel Lemos wrote: Hello, On 12/03/2003 07:53 PM, Justin Patrin wrote: Or you could always use the PEAR package: http://pear.php.net/package/Validate That package only

Re: [PHP] Re: talking to a web page

2003-12-03 Thread Justin Patrin
-- ...and then Justin Patrin said... % % You can use PEAR's HTTP_Client package % (http://pear.php.net/package/HTTP_Client) to connect to a website, do % authentication, post forms, handle redirects, etc. It also keeps track % of cookies. Oh, goodie; that sounds great. % % Here's a sample (note

Re: [PHP] PHP - Oracle - BLOBs - Display BLOB data in a table

2003-12-03 Thread Justin Patrin
Actually, I would suggest using two scripts. The first takes the id of the row as a GET parameter (say $id) and grabs the image data, sends the header, and echoes the data. The second script outputs a web page with an img tag. As such: image.php ?php $image = get_image_data($_REQUEST['id']);

Re: [PHP] Re: talking to a web page

2003-12-03 Thread Justin Patrin
of the dependencies for those packages. Easiest way to go is to use the PEAR installer if you're just getting started. David T-G wrote: Justin, et al -- ...and then Justin Patrin said... % % One last thing. If all you need to do is go to a page and not navigate % it, you could just use HTTP_Request

[PHP] Re: Text field comparison

2003-12-03 Thread Justin Patrin
Yes, but the user would have to submit the form and you would have to re-fill it out for them and give them a message saying that they must be equal. You could use the PEAR HTML_Form and Quickform packages for much of this. Jeff wrote: I have created a few forms using post. There are certain

Re: [PHP] validating email address

2003-12-03 Thread Justin Patrin
Quick note: The PEAR Validate package does this for you. It also checks for an alternate A record. Terence wrote: You could use MX records if you wanted to. I found this some time ago... function checkEmail($Email) { //Do the basic Reg Exp Matching for simple validation if (eregi([EMAIL

Re: [PHP] CHMOD...

2003-12-04 Thread Justin Patrin
In all fairness, that's not a very good solution. Using system commands makes your script not cross platform, meaning it can't work on Windows. For a better solution try writing a recursive chmod script that sets the permission, the loops through the files and calls itself on them if the input

Re: [PHP] how to determine if shopping cart has been abandoned?

2003-12-04 Thread Justin Patrin
Of course, this makes problems when you're adding promotional product to the cart, which should have a seperate price. Add to this that the customer may have special pricing (think Business to Business). So you have to have an update mechanism for promotions and the extra price lists. Do-able,

Re: [PHP] how to determine if shopping cart has been abandoned?

2003-12-04 Thread Justin Patrin
Of course, now you have to deal with putting inventory back on the shelf when the session expiresand you have no way of knowing when that would happen unless you're storing *something*. Chris W. Parker wrote: Justin French mailto:[EMAIL PROTECTED] on Thursday, December 04, 2003 2:48 PM

[PHP] Re: Handling Database errors in php

2003-12-05 Thread Justin Patrin
If you want to get database errors back in a meaningful format, I'd suggest using PEAR::DB or another of the DB abstraction classes. They can return an error which you can then check and handle appropriately. In addition, it can let you use the same code for multiple database types (should you

Re: [PHP] MySQL Dump using PHP

2003-12-06 Thread Justin Patrin
Cesar Aracena wrote: The thing is that I don't have phisical access to the server and it doesn't have telnet access either. What I want to achieve is to make a password protected page inside my site were a button is kept to start a full backup of my MySQL DB and after clicking on it, be able to

Re: [PHP] PHP Variables

2003-12-06 Thread Justin Patrin
John W. Holmes wrote: echo 'input type=text name=question1_text value=' . htmlentities($question) . 'br /'; Or even *MORE* correct echo 'input type=text name=question1_text value='.htmlentities($question).'/br/'; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: getimagesize() MySQL Image Storage (Running functions on contents of variables)

2003-12-07 Thread Justin Patrin
Galen wrote: I'm using a MySQL database to store images as BLOBs. I know how to handle all the MySQL stuff, it's easy, and really makes keeping track of files nice an clean. No permissions, no risk of getting things out of sync, finding stuff is as easy as SQL. My question is about handling

[PHP] Re: preg_match and regular expression

2003-12-08 Thread Justin Patrin
a minimum of content between the div tags. 3) the /i matches case insensitive, meaning that DIV will be matched as well Note that this won't work quite right on nested div tags. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

[PHP] Re: PHP My SQL vs ASP.NET SQL 2000 Server

2003-12-08 Thread Justin Patrin
, you can always use Oracle or another database system that you have to pay for. The long answer is: get ready for a holy war. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Reading email from sendmail

2003-12-08 Thread Justin Patrin
be used to send email but reading from sendmail???... Any information is greatly appreciated and profoundly useful. Robin 'Sparky' Kopetzky Black Mesa Computers/Internet Service Grants, NM 87020 You could use the imap functions to read from an IMAP account quite easily. -- paperCrane Justin Patrin

[PHP] Re: query to display the results without...

2003-12-08 Thread Justin Patrin
Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: query to display the results without...

2003-12-08 Thread Justin Patrin
! Justin Patrin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Eric Holmstrom wrote: Hi there I have a database called Eric and table name called Rocket'. Table consists of three values. PARTNO | DESCRIPTION | COMMENT So far if i want to show copper headgaskets from the 5r field i

Re: [PHP] post an array into another site

2003-12-08 Thread Justin Patrin
script. PEAR's HTTP_Request can do that. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: post an array into another site

2003-12-08 Thread Justin Patrin
HTTP requests like a normal browser: http://www.phpclasses.org/httpclient Or even better, use PEAR's HTTP_Client. http://pear.php.net/package/HTTP_Client -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: post an array into another site

2003-12-08 Thread Justin Patrin
Manuel Lemos wrote: Hello, On 12/08/2003 10:39 PM, Justin Patrin wrote: $arr[0][0] = Something; $arr[0][1] = Hello; $arr[0][2] = Hi; It is possible to post this array to another site in a form? Or how can i do this? You may want to try this class that lets you make HTTP requests like

Re: [PHP] Re: post an array into another site

2003-12-08 Thread Justin Patrin
, of course). -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: restrict access to multiple pages

2003-12-08 Thread Justin Patrin
a function as you described (with automatic redirection to the login page) is how I would do it. You may also want to look into a the PEAR Auth package. http://pear.php.net/package/Auth -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] post an array into another site

2003-12-08 Thread Justin Patrin
Chris W. Parker wrote: Justin Patrin mailto:[EMAIL PROTECTED] on Monday, December 08, 2003 4:39 PM said: If all you want to do is give an array to another script, sure you can delimit (although that's much more error prone than serializing). Serialize, delimit. It's pretty much the same

Re: [PHP] Re: post an array into another site

2003-12-08 Thread Justin Patrin
Chris Shiflett wrote: --- Justin Patrin [EMAIL PROTECTED] wrote: Actually PEAR isn't a PHP project per se. I disagree. You have to become a member of the PHP development team, as far as I know, to participate in PEAR development (CVS account, php.net email address, etc.). The project is also

[PHP] Re: post an array into another site

2003-12-08 Thread Justin Patrin
Manuel Lemos wrote: Hello, On 12/08/2003 11:06 PM, Justin Patrin wrote: You may want to try this class that lets you make HTTP requests like a normal browser: http://www.phpclasses.org/httpclient Or even better, use PEAR's HTTP_Client. http://pear.php.net/package/ HTTP_Client Why better

[PHP] Re: post an array into another site

2003-12-08 Thread Justin Patrin
Justin Patrin wrote: Manuel Lemos wrote: Hello, On 12/08/2003 10:30 AM, Fred wrote: I have an array in php like this: $arr[0][0] = Something; $arr[0][1] = Hello; $arr[0][2] = Hi; It is possible to post this array to another site in a form? Or how can i do this? You may want to try

Re: [PHP] Re: post an array into another site

2003-12-08 Thread Justin Patrin
Ralph Guzman wrote: = THE END = I apologize, everyone. I should have realized a while ago that this would become a holy war. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: goto label

2003-12-08 Thread Justin Patrin
how to do it better, just ask here. :-) -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: goto label

2003-12-08 Thread Justin Patrin
Robert Cummings wrote: On Tue, 2003-12-09 at 00:32, Justin Patrin wrote: Nitin wrote: Hi all, I was wondering, if there's any way to achieve 'goto label:' using PHP Thanx for ur time Nitin goto is a very old and broken way of coding. If you ever find yourself in need of a goto, you should

Re: [PHP] Re: goto label

2003-12-09 Thread Justin Patrin
than a more structured statement, such as break. /opinion -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Display Query Result As Editable Form

2003-12-10 Thread Justin Patrin
://pear.php.net/package/DB_DataObject http://pear.php.net/package/HTML_QuickForm http://pear.php.net/package/DB_DataObject_FormBuilder -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: removing ? tag from include files

2003-12-10 Thread Justin Patrin
, but make sure that there is no extra whitespace after it. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] ARRAY

2003-12-10 Thread Justin Patrin
Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Images in MySQL vs directory/file?

2003-12-10 Thread Justin Patrin
://www.php.net/unsub.php I agree, storing images in the database can be a big help. For caching, you may want to try PEAR's Cache package. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Images in MySQL vs directory/file?

2003-12-10 Thread Justin Patrin
the same URI over and over, so it will be cached. If the browser isn't cacheing as you want, you can always send a header telling the browser to cache it. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: fopen custom 404 issue

2003-12-10 Thread Justin Patrin
. // www.awn.com [ e ] [EMAIL PROTECTED] [ p ] 323.606.4237 You can use PEAR's HTTP_Request, which will do redirects for you (and lots of other stuff ;-). http://pear.php.net/package/HTTP_Request -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

[PHP] Re: Help with associative array in a PHP class. Not working as I'd expect it to?!

2003-12-10 Thread Justin Patrin
not a good idea. Why not just do function printMyVars() { echo myPacket:\n; print_r($this-myPacket); } This will give you your expected output. Please remember ot use globals sparingly as they make very kludgy code. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net

[PHP] Re: Help with associative array in a PHP class. Not working as I'd

2003-12-10 Thread Justin Patrin
Justin Patrin wrote: class kismetap { function kismetap() { $this-$myPacket = array('blah' = 'asdfasdfasdf'); } } That should be $this-myPacket = ... -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Write on image in faint color

2003-12-11 Thread Justin Patrin
); ? -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Write on image in faint color

2003-12-11 Thread Justin Patrin
Justin Patrin wrote: imagepng($ih, $dir.basename($file, $fileinfo['extension']).'png'); Oops, the above line should probably be: imagepng($ih, $dir.'-watermark'.basename($file, $fileinfo['extension']).'png'); so as not to trample your previous files (if any are pngs). -- paperCrane

Re: [PHP] Error that I can't find causing header() to fail

2003-12-11 Thread Justin Patrin
call. Put ob_start() before the beginning of it all, then get to the header() point. If you don't need to use the header, use ob_end_flush() to flush the captured output. OR you can do ob_end_flush() at the very end of the script. -- paperCrane Justin Patrin -- PHP General Mailing List (http

Re: [PHP] php .htaccess autologin

2003-12-11 Thread Justin Patrin
). -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP IDE?

2003-12-13 Thread Justin Patrin
I use Emacs with syntax PHP highlighting. It does tabbing very well as well and has a lot of features that I couldn't easily gert out of vim (and there's no annoying mode change ;-). (Note: I used to use vim and loved it, but emacs seduced me away.) -paperCrane Justin Patrin -- PHP General

[PHP] Re: Whats wrong with this statement.

2003-12-13 Thread Justin Patrin
be doing this in the SQL: SELECT hUrl,hContactEmail FROM hyperlinks_data WHERE hUrl = $websiteUrl and hContactEmail = $websiteEmail; -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sorting arrays

2003-12-14 Thread Justin Patrin
. sort() ALWAYS sorts the same way when you call it the same way, period. Perhaps you're not sorting on the correct data? Could you please show us exactly what your arrays look like, which sort function you are using, and how you're calling it? -- paperCrane Justin Patrin -- PHP General Mailing List

Re: [PHP] Sorting arrays

2003-12-14 Thread Justin Patrin
correctly. One more thing: how are you passing these values between pages? -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP and MySQL date

2003-12-15 Thread Justin Patrin
type in MySql, depending on your use of it. Using MySql's types allows you to use MySql's date comparison and functions for queries. You can get a UNIX timestamp using the UNIX_TIMESTAMP() function in mysql or by using strtotime() in PHP on the value. -- paperCrane Justin Patrin -- PHP General

[PHP] Re: mail question (mime)

2003-12-16 Thread Justin Patrin
You may want to try using PEAR's Mail_Mime class. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: mail question (mime)

2003-12-16 Thread Justin Patrin
the result from POP3 class and convert it into an array of all the specific parts of an mail? Well, you could look for yourself. ;-) Yes, there is. Mail_Mime does both encoding and decoding. http://pear.php.net/package/Mail_Mime -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net

Re: [PHP] Authentication

2003-12-16 Thread Justin Patrin
to a .htaccess file (That's a potential security risk). Then answer to your question is $_SERVER['PHP_AUTH_USER']. That variable will give you the currently logged in user. $_SERVER['PHP_AUTH_PW'] is the password. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe

[PHP] Re: saving resource objects

2003-12-16 Thread Justin Patrin
if you need to with minimal change to your code. Or if you don't want ot use DB, you can just use the Pager: http://pear.php.net/package/Pager -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: saving resource objects

2003-12-16 Thread Justin Patrin
If you're doing a large JOIN (which slows things down) you might try writing it all as multiple queries in PHP and having PHP join it together. It *may* be faster, especially for many joins. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Trying to make my session code smarter

2003-12-16 Thread Justin Patrin
it is just nowjust search the PHP docs. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Help with php output to file

2003-12-18 Thread Justin Patrin
. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Retrieve key from $_POST

2004-01-05 Thread Justin Patrin
' statement. Well, you can use array_keys() to get the keys of the array. You can also use foreach($_POST as $key = $value) { //do stuff here } to loop through the entire array. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] [Fwd: failure notice] Why??

2004-01-05 Thread Justin Patrin
chance? (I do and post via their SMTP server). I get these as well using my own SMTP server. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Is there a way to protect PHP's $_POST, $_GET when user tamper with post string in URL toolbox???

2004-01-07 Thread Justin Patrin
configuration or what? Thanks, FletchSOD -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Not working?

2004-01-08 Thread Justin Patrin
Roger Spears wrote: Try this: system(rename('/path/to/new.sh', '/path/to/old.$today')); Actually, it should be this: rename('/path/to/new.sh', '/path/to/old.$today'); -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: post vars not by form

2004-01-08 Thread Justin Patrin
://pear.php.net/package/HTTP_Request http://pear.php.net/package/HTTP_Client -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: not sure why regex is doing this

2004-01-09 Thread Justin Patrin
while (eregi(',\s*,',$query)): $query = preg_replace('/,\s*,/',',NULL,', $query, -1); endwhile; Please don't mix the regex engines like that...it could lead to much suffering. instead of eregi, use preg_match. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net

[PHP] Re: Headers and sessions in php .cgi

2004-01-10 Thread Justin Patrin
is that two newlines ends headers (includeing cookies and such) which breaks sessions. If you simply use header() all of this is dealt with for you as it should be. Just make sure that you don't print or echo anything before using it (or starting a session). -- paperCrane Justin Patrin -- PHP General

[PHP] Re: Array Key Test

2004-01-12 Thread Justin Patrin
it is a straight variable, an array index, or an object member. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: to array or not to array..

2004-01-12 Thread Justin Patrin
I would use an array or arrays using [] syntax in the HTML variable names. input type=checkbox name=userCanAdd[1]/ -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] to array or not to array..

2004-01-12 Thread Justin Patrin
The way I deal with this is one of two ways. An easy way is to populate hidden fields in the page with the indexes of the users, thwn loop through those, checking the indexes of the arrays sent back. input type=hidden name=userIds[] value=5/ User 5 input type=checkbox name=userCanDelete[5]/

Re: [PHP] class design question

2004-01-12 Thread Justin Patrin
Jason Sheets wrote: Take a look at the PEAR DB Abstraction layer, I usually store connection info in an XML or INI file and use parse_ini or PEAR Config to parse the configuration file. http://pear.php.net hi there. i am working out the finishing touches on a authentication class that uses

[PHP] Re: iteration of $GLOBAL

2004-01-12 Thread Justin Patrin
Chris Sherwood wrote: hello everyone I feel a little stupid asking this but I have tried multiple searches on google and on php.net and cant seem to find the snippet of code that will iterate through all the global variables for the session thanks in advance This will work for any associative

Re: [PHP] Storing PHP code in a database

2004-01-13 Thread Justin Patrin
be in for some trouble. :) Rather than addslashes, I would suggest using a database specific quoting function. For mysql, use mysql_escape_string() or mysql_real_escape_string(). Or if you're using PEAR::DB, use $db-quote(). -- paperCrane Justin Patrin -- Question Everything, Reject Nothing -- PHP General

[PHP] Re: class functions where the function name == class name

2004-01-13 Thread Justin Patrin
, you may want to look at PEAR's DB and related packages. http://pear.php.net/package/DB -- paperCrane Justin Patrin -- Question Everything, Reject Nothing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] URL rewriting...anybody done this?

2004-01-14 Thread Justin Patrin
RewriteEngine On RewriteRule ^show/(.*)/(.*) /show.php?sid=$1id=$2 Try: RewriteRule ^show/([^/]*)/([^/]*) /show.php?sid=$1id=$2 -- paperCrane Justin Patrin -- Question Everything, Reject Nothing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: dynamic list/menu in php

2004-01-15 Thread Justin Patrin
I didn't really understand most of what you said (your English is really confusing), but you might want to check out DB_DataObject_FormBuilder. It will create forms for editing of DB records with select boxes for foreign keys. There are also lots of new options in the newest CVS version which

[PHP] Re: addslashes

2004-01-15 Thread Justin Patrin
in my script. This could easily be a difference between magic_quotes settings on the machines. Check your php.ini file son btoh machines and see if magic_quotes_gpc or magic_quotes_runtime is on. If the settings differ between machines, this is probably your problem. -- paperCrane Justin Patrin

Re: [PHP] 2 x DB connections at once

2004-01-22 Thread Justin Patrin
hope I explained that well enough; it's real difficult to put into words. Does anyone have any idea what might be happening? -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] pass by reference

2004-01-23 Thread Justin Patrin
in the DB in the first place. Storing them as files will nearly always be faster than any other method (unless you've cached them in RAM somehow ;-). -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] what PHP really needs

2004-01-23 Thread Justin Patrin
Holmes... Then you could use a serialized file in the filesystem that any app can read. For added speed, make a RAM-disk and store the file there. Slight overhead deserializing, but it's likely faster than recreating whatever it is (if it's large). -- paperCrane Justin Patrin -- PHP General Mailing

Re: [PHP] Using unset with $_SESSION

2004-01-29 Thread Justin Patrin
variable called $_SESSION that has nothing to do with the actual session data. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: I need to unset BOTH $GLOBALS and $_SESSION vars?

2004-01-29 Thread Justin Patrin
= on. Try changing the setting in your php.ini. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: don't want to belabor a point about session_start, but...

2004-01-29 Thread Justin Patrin
. Is the contractor's code outputting before that include? -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: parsing variables inside a variable?

2004-01-29 Thread Justin Patrin
expression if you *really* wanted to, but what's above is easier. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: parsing variables inside a variable?

2004-01-30 Thread Justin Patrin
-- www.jholt.co.uk : affordable business website solutions www.htpshareware.com : software for the disorganized You don't needs eyes to see, you need vision - Maxi Jazz Justin Patrin [EMAIL PROTECTED] wrote

[PHP] Re: OOP methodology

2004-01-30 Thread Justin Patrin
Wow, that's a lot of stuff in one class. Personally, I've started using the MVC (Model, View, Controller) architecture. Basically what it does is seperates Data logic from Display logic and Control logic. Here's how I've been using it. Model: Holds and deals with all data for the program, such

Re: [PHP] OOP methodology{O|T} kinda'

2004-01-30 Thread Justin Patrin
). -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: How do you guys do this?

2004-01-30 Thread Justin Patrin
first and last name... You can always use an md5() of the username. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] OOP methodology{O|T} kinda'

2004-01-30 Thread Justin Patrin
those languages are either direction? Here's my progression: BASIC - Turbo Pascal - C - C++ - PHP. Yes, I came to PHP from C++, having learned OO in C++. But honestly, I've learned a lot more good OO practices in PHP than I ever did in C++. -- paperCrane Justin Patrin -- PHP General Mailing List

Re: [PHP] Regular expression help?

2004-02-02 Thread Justin Patrin
, that worked like a charm. Jas You may want to check out The Regex Coach. It's very helpful. :-) http://www.weitz.de/regex-coach/ -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: looking for a way to manually free memory in the middle of a script

2004-02-02 Thread Justin Patrin
number) to the processor, which processes them. Use system() to call the processor. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: auto forms from mysql database

2004-02-02 Thread Justin Patrin
fields as well as *many* others. I'm also working on DB_DataObject_FormBuilder_Frontend which will give you a whole frontend to choose tables and view / edit fields from any table. http://pear.php.net/package/DB_DataObject http://pear.php.net/package/DB_DataObject_FormBuilder -- paperCrane Justin

Re: [PHP] auto forms from mysql database

2004-02-02 Thread Justin Patrin
does. :-) -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: auto forms from mysql database

2004-02-02 Thread Justin Patrin
Justin French wrote: On Tuesday, February 3, 2004, at 12:19 PM, Justin Patrin wrote: Sounds like you want to look into some of the PEAR projects. DB_DataObject knows about field types and can do required fields and such. DB_DataObject_FormBuilder can give you a form to edit fields which can

  1   2   3   4   5   6   >