Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-20 Thread Shawn McKenzie
Dotan Cohen wrote: 2009/10/20 Andrea Giammarchi an_...@hotmail.com: even better $error_reporting = error_reporting(0); if(mysql_real_escape_string($variable) === false) { error_reporting($error_reporting); // create a default DB connection } else

[PHP] Re: Newb question about getting keys/values from a single array element

2009-10-09 Thread Shawn McKenzie
Daevid Vincent wrote: I feel like a total newb asking this, but I'm just having a brain fart or something... I'm writing a page where I can either get back a list of items: Array { [1233] = apple, [6342] = apricot, [2345] = banana, ... }

Re: [PHP] Fatal error on functions valid for PHP 4, 5

2009-10-09 Thread Shawn McKenzie
kro...@aolohr.com wrote: Thanks Chris. Seems like the function is a dud. I have '-enable-calendar' working on both local and production. Sigh . . I have been using another modified 'easter' function, 'pFeast', (can't for the life of me find it on the net now). It works well, but I

Re: [PHP] Output buffering

2009-10-07 Thread Shawn McKenzie
Arno Kuhl wrote: Thanks David. After taking another look at the description for ob_start() I began to suspect there was a difference, but the manual doesn't mention anything about it. And the fact they use the same terminolgy for both the settings and the functions is confusing. I can see

Re: [PHP] stdout as input

2009-09-24 Thread Shawn McKenzie
bdunlap wrote: echo bob | myScript.php In myScript.php, I'm doing: $handle = popen( 'php://stdin', 'r' ); echo var_export( $handle, TRUE ) . \n\n; What output are you getting from those lines, and what were you expecting? $handle is just a resource, same as if you opened a regular

Re: [PHP] Stricter Error Checking?

2009-09-23 Thread Shawn McKenzie
I think the problem is that he didn't check that the key he used actually existed before using the value it pointed to. So he got an empty string for $row['Number']; because the key should have been 'Part_Number'. I don't know that even E_STRICT would catch that one. Bob McConnell What?

Re: [PHP] Stricter Error Checking?

2009-09-23 Thread Shawn McKenzie
Bob McConnell wrote: From: Tommy Pham From: Tim Legg I just spent way, way to much time trying to debug code due to a misnamed element. Here is a simplified example of the problem I dealt with. $test = SELECT * FROM `Materials` WHERE `Part_Number` = '125664'; $result =

[PHP] Re: Stricter Error Checking?

2009-09-23 Thread Shawn McKenzie
Tim Legg wrote: Hello, I just spent way, way to much time trying to debug code due to a misnamed element. Here is a simplified example of the problem I dealt with. $test = SELECT * FROM `Materials` WHERE `Part_Number` = '125664'; $result = mysql_query($test,$handle);

[PHP] Re: htaccess question

2009-09-11 Thread Shawn McKenzie
tedd wrote: Hi gang: Is there a way I can use a htaccess directive to require a php script to be included within each file contained within that directory? For example, let's say I have a directory with 100 scripts in it, but I want each script within that directory to pass through an

[PHP] Re: Class variable value lost

2009-09-09 Thread Shawn McKenzie
Sumit Sharma wrote: Hi, I have developed a listing site which is totally class based. Now when it authenticates a user login and set appropriate class variables to true and set user info in user class variables, value of all the set variables are lost when I forward the user to members

[PHP] Re: preg_match()

2009-09-09 Thread Shawn McKenzie
Jan Reiter wrote: Good Afternoon. This shouldn't be too complicated, but I can't come up with a solution for the problem right now. It's about RegEx in PHP (5.2) Is there a way to capture ALL sub elements of an expression like preg_match('@a(?[0-9])*b@' ,a2345678b , $matches);

Re: Fwd: [PHP] Re: Class variable value lost

2009-09-09 Thread Shawn McKenzie
Sumit Sharma wrote: What I have done is declared one User class in a separate file and created its object there only. After this included this file in all other file which are using its object. So the object is creating only once and included in every other file only once. Now when I over

[PHP] Re: accessing variable from inside a class

2009-09-04 Thread Shawn McKenzie
Lars Nielsen wrote: Hi, How do i access a variable from inside a class? ex. I want to use $template_dir inside Template. $template_dir = 'templates/'; class templateParser { var $output; function templateParser($templateFile='default_template.htm') {

[PHP] Re: LoginShare | How to authenticate once, and login to different websites

2009-09-01 Thread Shawn McKenzie
Behzad wrote: Dear list, i'm trying to integrate two php-driven web applications, which both require the user to authenticate using a username and a password. Consider a situation where the user has logged-in to the 1st application. She clicks over a hyper-link, which directs her to the

[PHP] Re: Date +30 comparison

2009-09-01 Thread Shawn McKenzie
David Stoltz wrote: I'm really struggling with dates in PHP. (Yes, I tried reading the manual)... Can someone provide code that does this: Takes current date, assigns it to a variable (let's say $today) Then adds 30 days to $today variable Takes a string ($nexteval) like '8/26/2009' and

Re: [PHP] Re: Install PHPMyAdmin with urpmi

2009-09-01 Thread Shawn McKenzie
Ricky Tompu Breaky wrote: Hi, hack. The result is: Failed. I don't know why my PHP module does not talk to my MySQL. Please keep telling me. On Tue, 1 Sep 2009 12:08:08 +0800 hack988 hack988 hack...@dev.htwap.com wrote: Use follow codes for test your php,php_mysql is work well.

[PHP] Re: PHP--on MyMarket can not get username variable value from session.

2009-09-01 Thread Shawn McKenzie
Ricky Tompu Breaky wrote: Dear my friends, I am learning a PHP implementation with MyMarket now. I got it from http://sourceforge.net/projects/mymarket/files/mymarket/mymarket-1.72/mymarket-1.72.tar.gz/download . I have installed and configured its

[PHP] Re: Install PHPMyAdmin with urpmi

2009-08-31 Thread Shawn McKenzie
Ricky Tompu Breaky wrote: Dear my friends, I've downloaded and installed PHPMyAdmin. I use Apache2 and Mandriva 2009.1. I have defined in the file of '/var/www/phpmyadmin/libraries/config.default.php' this things: $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] =

[PHP] Re: Best way to test for form submission?

2009-08-28 Thread Shawn McKenzie
Adam Jimerson wrote: This question might give away the fact that I am a php noob, but I am looking for the best way to test for form submission in PHP. I know in Perl this can be done with if (param) but I don't know if that will work with PHP. I have read the Learning PHP 5 book and

Re: [PHP] phpmailer send() always return true even the emailaddress is invalid

2009-08-27 Thread Shawn McKenzie
Paul M Foster wrote: On Thu, Aug 27, 2009 at 09:00:24AM -0400, Bob McConnell wrote: The return code only tells you the local server accepted the mail. It is unlikely that server knows the address is invalid since it can only validate the domain portion of the address. Only the destination

[PHP] Re: user permissions

2009-08-27 Thread Shawn McKenzie
John wrote: Hi, What is the best way to assign permissions to users? a) Each user has a list of permissions associated with that user or b) Each task/permission has a list of users that qualify or c) Have a table with a row for each user/permission combination

[PHP] Re: page works on public web site, but not on my computer

2009-08-27 Thread Shawn McKenzie
mike bode wrote: I have posted the question in another thread a bit down, but only buried within the thread, so please excuse me when I ask again. I want to use some PHP code from a web site (http://www.dynamicdrive.com/dynamicindex4/php-photoalbum.htm), and I am following their instruction

[PHP] Re: PHP5+APACHE 2.2 + Windows 2003 production server

2009-08-26 Thread Shawn McKenzie
Andrioli Darvin wrote: Hi all PHP manual state We do not recommend using a threaded MPM in production with Apache 2. Use the prefork MPM instead, or use Apache 1. For information on why, read the related FAQ entry on using Apache2 with a threaded MPM (

Re: [PHP] Sockets (reading)

2009-08-26 Thread Shawn McKenzie
Bob McConnell wrote: From: Philip Thompson During a socket read, why would all the requested number of bytes not get sent? For example, I request 1000 bytes: ?php $data = @socket_read ($socket, 2048, PHP_BINARY_READ); ? This is actually in a loop, so I can get all the data if split up.

[PHP] Re: How to output a NULL field?

2009-08-25 Thread Shawn McKenzie
David Stoltz wrote: $rs-Fields(22) equals a NULL in the database My Code: if(empty($rs-Fields(22))){ $q4 = ; }else{ $q4 = $rs-Fields(22); } Produces this error: Fatal error: Can't use method return value in write context in D:\Inetpub\wwwroot\evaluations\lookup2.php on

[PHP] Re: How to output a NULL field?

2009-08-25 Thread Shawn McKenzie
Shawn McKenzie wrote: First off, if the value is NULL in the database then in PHP it will be the string NULL and not a null value as far as I remember. Second, you cant use a function/method in empty(). Thirdly, the string NULL is not empty. I'm not sure what DB class you're using here

[PHP] Re: php 5.2.x - Fatal error: Cannot re-assign $this in ...

2009-08-25 Thread Shawn McKenzie
John Stoffel wrote: Hi, I'm looking for some help with PHP5.2.x hacking on a web site to cleanup how the user submitted search form is handled. Basically I want to make it simple for the end user to a) refine their query, b) not have to answer popups if they hit the reload button, and c)

[PHP] Re: php 5.2.x - Fatal error: Cannot re-assign $this in ...

2009-08-25 Thread Shawn McKenzie
Shawn McKenzie wrote: John Stoffel wrote: Hi, I'm looking for some help with PHP5.2.x hacking on a web site to cleanup how the user submitted search form is handled. Basically I want to make it simple for the end user to a) refine their query, b) not have to answer popups if they hit

[PHP] Re: unset() something that doesn't exist

2009-08-24 Thread Shawn McKenzie
Ralph Deffke wrote: causes an error Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `'$'' in C:\wamp\www\TinyCreator\testCrapp6.php on line 42 Tom Worster f...@thefsb.org wrote in message news:c6b87877.11463%...@thefsb.org... is it the case that unset() does not trigger

Re: [PHP] preg_replace anything that isn't WORD

2009-08-24 Thread Shawn McKenzie
hack988 hack988 wrote: Use preg_replace_callback instead! preg_replace_callback is better performance than preg_replace with /e. - code $str=cats i saw a cat and a dog;

[PHP] Re: How to download and configure php mvc website locally

2009-08-22 Thread Shawn McKenzie
Sumit Sharma wrote: Hi all, The site I have download was developed using cake php. Now when trying to access the website it is showing a blank page. As Sudheer suggested I went to error log and noted down the errors there, which are as follows: [Thu Aug 20 14:10:16 2009] [error] [client

[PHP] Re: preg_replace anything that isn't WORD

2009-08-22 Thread Shawn McKenzie
דניאל דנון wrote: Lets assume I have the string cats i saw a cat and a dog i want to strip everything except cat and dog so the result will be catcatdog, using preg_replace. I've tried something like /[^(dog|cat)]+/ but no success What should I do? Capture everything but only

[PHP] Re: preg_replace anything that isn't WORD

2009-08-22 Thread Shawn McKenzie
Didn't seem to make it the first time. Shawn McKenzie wrote: דניאל דנון wrote: Lets assume I have the string cats i saw a cat and a dog i want to strip everything except cat and dog so the result will be catcatdog, using preg_replace. I've tried something like /[^(dog|cat

[PHP] Re: getting the search words from a google query

2009-08-19 Thread Shawn McKenzie
MURTUZA KUTUB wrote: hey, i am a beginner at php and i need your help. i have a list of urls visited on a particular day in mysql database. using php i find out all the websites that have a google search. now i need to strip apart the google query from the entire url. i think parse

[PHP] Re: Undefined Offset Error with Pagination and Sessions

2009-08-18 Thread Shawn McKenzie
Miller, Terion wrote: Hi Folks, after days of trying lots of different things, I'm must grovel to the list and post my problem...which is I am unable to get my pagination to work, it seems to not carry the session to the next page and I get the undefined offset error The page code is posted

[PHP] Re: PHP and CGI

2009-08-18 Thread Shawn McKenzie
sono...@fannullone.us wrote: I've searched high and low for an answer to this. Hopefully someone here might know. Can PHP be used under a CGI? I tried to put the following code on one of my perl shopping cart pages but it doesn't work: ?php echo select name=\Year\; for ($year =

Re: [PHP] Re: PHP and CGI

2009-08-18 Thread Shawn McKenzie
Andrew Mason wrote: If you already have it written in Perl, I would recommend writing the rest of functionality in Perl. Please reply all. I agree, but I assumed that the problem was that he knew PHP and he had downloaded a Perl cart and didn't know Perl. -Shawn -- PHP General Mailing

Re: [PHP] is there a better way to know from which php file the requestcomes from ??

2009-08-17 Thread Shawn McKenzie
nashrul wrote: This is a newbie question... Let's say there are 3 php files, page1.php, page2.php and page3.php. Form submission from page1.php or page2.php will take user to page3.php. I know that we can use parameter that is appended in the action attribute of the form (e.g FORM METHOD=POST

Re: [PHP] is there a better way to know from which php file the requestcomes from ??

2009-08-17 Thread Shawn McKenzie
Eddie Drapkin wrote: On Mon, Aug 17, 2009 at 5:31 PM, Shawn McKenzienos...@mckenzies.net wrote: nashrul wrote: This is a newbie question... Let's say there are 3 php files, page1.php, page2.php and page3.php. Form submission from page1.php or page2.php will take user to page3.php. I know

Re: AW: [PHP] Re: Re: Re: Design Patterns

2009-08-13 Thread Shawn McKenzie
Ralph Deffke wrote: for those of u not being a physician semiconductors are of pretty big atoms, but this is not the main problem, the problem is that u have to cut out structures off these semiconductors in order to build faster computers this matters. many physicians believe that we

Re: [PHP] Calendar Problem

2009-08-12 Thread Shawn McKenzie
tedd wrote: Your solution had 61 iterations (for loop) while mind had only 21, so mine's a bit faster. Here's the comparison: http://php1.net/b/fridays/ But I'll use your solution -- it's more elegant. Thanks for the code, tedd Actually, if you refresh your page you have

[PHP] Re: Upgrading to PHP5.2.x

2009-08-11 Thread Shawn McKenzie
Alberto García Gómez wrote: Dear Fellows: I want ot upgrade my PHP from 5.1.x to 5.2.x. I want to do using rpm, but any time that I going to upgrade the rpm request me more dependencies. How can I configure my rpm (or other command) to automaticly satisfy my dependencies. Saludos

Re: [PHP] ereg_replace to preg_replace translation

2009-08-11 Thread Shawn McKenzie
m a r k u s wrote: Hi all, I see that from PHP 5.3.0 ereg_replace() function is deprecated and throws a warning. I would like to use the preg_replace() function as an alternative of ereg_replace() function but... can't undestand the \n#[^\n]*\n expression. $sql =

[PHP] Re: Calendar Problem

2009-08-11 Thread Shawn McKenzie
tedd wrote: Hi gang: I want to show the dates for all Fridays +-30 days from a specific date. For example, given today's date (8/11/2009) the Fridays that fall +-30 days are July 17, July 24, July 31, Aug 7, Aug 14, Aug 21, Aug 28, and Sept 4. I'm curious, how would you guys solve

[PHP] Re: Calendar Problem

2009-08-11 Thread Shawn McKenzie
Shawn McKenzie wrote: tedd wrote: Hi gang: I want to show the dates for all Fridays +-30 days from a specific date. For example, given today's date (8/11/2009) the Fridays that fall +-30 days are July 17, July 24, July 31, Aug 7, Aug 14, Aug 21, Aug 28, and Sept 4. I'm curious, how would

Re: [PHP] reason for a Notice:.. on one site but not another? (Same code.)

2009-08-10 Thread Shawn McKenzie
John Butler wrote: if(isset($_POST['UserWishesDateRange']) $_POST['UserWishesDateRange'] == 'T') { Thought I tried that. Apparently not exactly; it works now! Thanks. I know it is clunky but I wanted to see how compact it could be done. If you switch it around you'll get a notice

Re: [PHP] reason for a Notice:.. on one site but not another? (Same code.)

2009-08-09 Thread Shawn McKenzie
John Butler wrote: http://us3.php.net/manual/en/errorfunc.configuration.php#ini.error-reporting Thank you guys for the isset() heads up. And Ben, for this good explanation of error reporting! As others have pointed out, it's a good idea to call isset() on a POST-variable before trying

[PHP] Time keeping in DB

2009-08-05 Thread Shawn McKenzie
So, obviously not PHP related, but I'm looking for thoughts on the best way to record time sheets in a DB. A time sheet for hours worked per day, not like a time clock where you start and stop. The two possibilities that I have thought of are (these are simplistic, of course I'll be storing

[PHP] Re: Time keeping in DB

2009-08-05 Thread Shawn McKenzie
Ben Dunlap wrote: sorry man, but a good data design keeps only data in a table u can not calculate. in ur case that would be only date start and end time. refernces to user and project/tasks in other tables. ur time sheet is definately a job for a report. that type of design limits u to

[PHP] Re: Time keeping in DB

2009-08-05 Thread Shawn McKenzie
juggling to format the date. Ralph ralph_def...@yahoo.de Shawn McKenzie nos...@mckenzies.net wrote in message news:e9.66.14714.5b80a...@pb1.pair.com... Ben Dunlap wrote: sorry man, but a good data design keeps only data in a table u can not calculate. in ur case that would be only date

[PHP] Re: Time keeping in DB

2009-08-05 Thread Shawn McKenzie
Ben Dunlap wrote: OK, I think I understand most points except the start and stop time. Every time sheet I have used, SAP and several other smaller ones, I enter a weeks worth of time data like: Project Sun Mon TuesWed ThurFri Sat

Re: [PHP] Need quick got written up yesterday!! OUCH (RESOLVED)

2009-08-04 Thread Shawn McKenzie
Miller, Terion wrote: THANKFULLY THE BOSS DECIDED TO YELL AT ME AND TOLD ME WHAT THE PROBLEM WASI HAVE NEVER BEEN SO STRESSED IN MY LIFE SHOULD WORK BE THIS AWFUL? IT’S HARD ENOUGH WORKING IN A MALE DOMINATED FIELD, BUT WHEN THEY START USING THEIR LARGE FRAMES AND BOOMING VOICES OMG

Re: [PHP] Need quick got written up yesterday!! OUCH (RESOLVED)

2009-08-04 Thread Shawn McKenzie
Miller, Terion wrote: On 8/4/09 10:04 AM, Bastien Koert phps...@gmail.com wrote: On Tue, Aug 4, 2009 at 10:58 AM, Miller, Teriontmil...@springfi.gannett.com wrote: ---snip ---snip- http://pastebin.ca/1517966 I don't get why the $_SERVER['browse.php'] stopped working

Re: [PHP] Need quick got written up yesterday!! OUCH (RESOLVED)

2009-08-04 Thread Shawn McKenzie
Miller, Terion wrote: Shawn you know repeatedly have been nothing but an asshole to me on this list, I have said before I'm not a php programmer, I was a front end designer, need graphics , need a css layout...see meneed backend programming..I'm trying... Stop being such a egomaniacal

Re: [PHP] Need quick got written up yesterday!! OUCH (RESOLVED)

2009-08-04 Thread Shawn McKenzie
Eric Butera wrote: On Tue, Aug 4, 2009 at 7:19 PM, Govindagovinda.webdnat...@gmail.com wrote: Terion, I've done a lot of backend programming, but I'm even more newbie than you in PHP... so take this from an equal, FWIW: I think we in this work can all get dry/impersonal and grouchy at

Re: [PHP] ForEach Range Problems

2009-07-31 Thread Shawn McKenzie
Miller, Terion wrote: On 7/31/09 12:43 PM, Bastien Koert phps...@gmail.com wrote: On Fri, Jul 31, 2009 at 1:40 PM, Miller, Teriontmil...@springfi.gannett.com wrote: On 7/31/09 12:27 PM, Bastien Koert phps...@gmail.com wrote: $letter = isset($_GET['letter']) ? $_GET['letter'] :;

[PHP] Re: Regex Problem

2009-07-31 Thread Shawn McKenzie
Igor Escobar wrote: The solution don't need to be with regex, if anyone can solve this with other way will be very helpfull . Regards, Igor Escobar Systems Analyst Interface Designer + http://blog.igorescobar.com + http://www.igorescobar.com + @igorescobar (twitter) On

Re: [PHP] Re: Regex Problem

2009-07-31 Thread Shawn McKenzie
Igor Escobar wrote: No no, i need to make an regex to match the bold areas in my string. Anything between single quotes or double quotes (including quotes and double quotes). Understand? Regards, Igor Escobar Systems Analyst Interface Designer + http://blog.igorescobar.com +

Re: [PHP] Re: Regex Problem

2009-07-31 Thread Shawn McKenzie
Shawn McKenzie wrote: Igor Escobar wrote: No no, i need to make an regex to match the bold areas in my string. Anything between single quotes or double quotes (including quotes and double quotes). Understand? Regards, Igor Escobar Systems Analyst Interface Designer + http

Re: [PHP] stdClass - A newbie question

2009-07-30 Thread Shawn McKenzie
MEM wrote: By the way, there are many reasons for creating objects inside of other objects. This should not be considered an exception. I don't know where this code belongs to, so I can't clear out if it is good or bad OOP style. I do not intend to public judge the author, but the original

Re: [PHP] Re: Broken IF behavior? (Changing the branch changes the evaluation)

2009-07-29 Thread Shawn McKenzie
Ford, Mike wrote: -Original Message- From: Matt Neimeyer [mailto:m...@neimeyer.org] Sent: 29 July 2009 16:47 $Ret = mysql_fetch_array($result); if(!$Ret) { } else { return $Ret; } I'm assuming that you are calling my_fetch_array() in a loop of some sort and so at some point there

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Shawn McKenzie
Bastien Koert wrote: On Tue, Jul 28, 2009 at 10:43 AM, Miller, Teriontmil...@springfi.gannett.com wrote: On 7/28/09 9:40 AM, Bastien Koert phps...@gmail.com wrote: On Tue, Jul 28, 2009 at 10:34 AM, Bob McConnellr...@cbord.com wrote: From: Miller, Terion On 7/28/09 8:35 AM, Ashley Sheridan

[PHP] Re: Broken IF behavior? (Changing the branch changes the evaluation)

2009-07-28 Thread Shawn McKenzie
Matt Neimeyer wrote: Background: I'm converting a webapp from Visual FoxPro as a backend to MySQL... However one part of our app (a system status checker) is common code between the versions. I've got the following function... In English (in case it's not apparent), if the version of the

Re: [PHP] Imposing a range on what is stored in a session variable

2009-07-27 Thread Shawn McKenzie
Miller, Terion wrote: On 7/27/09 9:40 AM, Jim Lucas li...@cmsws.com wrote: Miller, Terion wrote: I want to store only 1000 records at a time in the session variable thought I could use a range(1,1000 How would you do this, store the first 1000 , then the second on refresh etc My

[PHP] Re: PHP as Language

2009-07-24 Thread Shawn McKenzie
Martin Scotta wrote: Hi all Is there a formal definition for the php language? Where I can found it? I've STW with no results. What is a definition? Do you mean specification like ECMA or ANSI? -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List

Re: [PHP] Re: unsetting a referenced parameter in a function

2009-07-23 Thread Shawn McKenzie
Tom Worster wrote: On 7/22/09 6:09 PM, Shawn McKenzie nos...@mckenzies.net wrote: Tom Worster wrote: though the manual is perfectly clear that this should be expected, i was a bit surprised that the result of the following is 42 ?php function foo($a) { $a = 42; unset

Re: [PHP] Doubt regarding session_destroy() in PHP 5

2009-07-22 Thread Shawn McKenzie
Andrew Ballard wrote: On Wed, Jul 22, 2009 at 9:59 AM, Robert Cummingsrob...@interjinn.com wrote: A custom session handler that writes to files could easily encrypt session data so that only the user with the correct session ID can decrypt it. I think you're confusing the issue by claiming

[PHP] Re: unsetting a referenced parameter in a function

2009-07-22 Thread Shawn McKenzie
Tom Worster wrote: though the manual is perfectly clear that this should be expected, i was a bit surprised that the result of the following is 42 ?php function foo($a) { $a = 42; unset($a); $a = 'meaning'; } foo($a); print($a\n); ? normally i would expect unset() to free

[PHP] Re: newbie question - php parsing

2009-07-22 Thread Shawn McKenzie
João Cândido de Souza Neto wrote: You made a mistake in your code: ?php the_title(); ? must be: ?php echo the_title(); ? I haven't used worpress in a long time, but the the_title() function might echo the title unless you pass the FALSE parameter, in which case it just returns it. --

[PHP] Re: RFC/Survey for Our Newer Folks (Including Lurkers)

2009-07-21 Thread Shawn McKenzie
Daniel P. Brown wrote: Ladies and Gentlemen: Daniel P. Brown: I originally found it here: http://www.php.net/mailing-lists.php when I was looking for responsive help, and have always accessed it via a newsgroup on news.php.net instead of as a mailing list. The news server times out quite

Re: [PHP] A prepared statements question

2009-07-21 Thread Shawn McKenzie
Jim Lucas wrote: Jason Carson wrote: Hello everyone, I am having a problem getting my prepared statements working. Here is my setup... index.php - authenticate.php - admin.php 1)index.php has a login form on it so when someone enters their username the form redirects to another page

[PHP] Re: How to set find pathes for PHP CLI?

2009-07-21 Thread Shawn McKenzie
Tir wrote: I have many scripts that I need execute with PHP CLI. They are located in a few directories. I don't want to write full path to script every time when I start it. Therefore I've added this paths to the PATH environment variable. But PHP don't find my scripts. How could i set

Re: [PHP] mysterious f character appearing. Why??

2009-07-09 Thread Shawn McKenzie
Phpster wrote: On Jul 9, 2009, at 5:50 PM, Govinda govinda.webdnat...@gmail.com wrote: The atmosphere is weird now so you all may think I am out there. . but this is a sincere question- (and not due to dumb oversight of my HTML code) I have a mysterious f character (Yes, just the

[PHP] Re: SESSION variables: How much is too much?

2009-07-08 Thread Shawn McKenzie
D.M.Jackson wrote: Hi, I'm trying to learn php mostly by reading the docs and pulling through other peoples projects for reference examples. One particular application I'm looking at has a ton of variables being handled through the SESSION global variable, probably about 25 or so

[PHP] Re: SESSION variables: How much is too much?

2009-07-08 Thread Shawn McKenzie
D.M.Jackson wrote: Thanks guys. I was just wondering if it was common practice to pass all those variables in the SESSION object or if I was following a bad example because it was the first time that I had seen so many variables passed this way. If this is the typical way of handling this

[PHP] Re: What is this called?

2009-07-06 Thread Shawn McKenzie
Miller, Terion wrote: Ok, say you have a database with 16000 records in it, but you only want to call out say 2000 records at a time as the search/query is performed, then store the first 2000 in a session and then retrieve the next 2000 etc etc as a way to minimize server strain? (I'm

[PHP] Re: Editing PEAR packages

2009-07-05 Thread Shawn McKenzie
Waynn Lue wrote: I wanted to makes some local edits to a PEAR package that I downloaded in order to build some custom functionality into it. What's the best way to manage this process to ensure that I don't accidentally blow away any changes if I update the package? Should I just copy the

[PHP] Re: best way to properly build an include path *regardless* from where I am calling the include?

2009-07-05 Thread Shawn McKenzie
Govinda wrote: I am confusing myself reading the docs just now. i.e.: include_path basename() and dirname() I had thought from many months ago that ?php include '/somedir/somefile.php'; ? would include somefile.php living in somedir regardless from where in the site structure I am

[PHP] Re: Editing PEAR packages

2009-07-05 Thread Shawn McKenzie
Waynn Lue wrote: Yeah, that's why I was hoping to maintain a separate install, since it would be easier to diff the patches. Shawn: Thanks for the suggestion to extend, I only wanted to make small changes to an existing function though, so it's harder to do it that way. My other thought was

Re: [PHP] Re: best way to properly build an include path *regardless* from where I am calling the include?

2009-07-05 Thread Shawn McKenzie
Govinda wrote: On Jul 5, 2009, at 6:15 PM, Shawn McKenzie wrote: AFAIK, include '/somedir/somefile.php'; looks for that specific file in that specific path because you gave an absolute path. Well, that is what I wanted. So I tried this: include '/MY_inc_php/GovBC_php_functions.inc

Re: [PHP] cannot figure out permissions for fopen/fwrite

2009-07-03 Thread Shawn McKenzie
Masuda mbmas...@stanford.edu wrote: On Jul 1, 2009, at 12:54, Shawn McKenzie wrote: Mari Masuda wrote: On Jul 1, 2009, at 12:20, Shawn McKenzie wrote: Shawn McKenzie wrote: Mari Masuda wrote: Hello, This is probably a dumb newbie question. I am running PHP 5.2.5 and Apache 2.2.8 on my

[PHP] Re: Writing to a file

2009-07-03 Thread Shawn McKenzie
Jason Carson wrote: Hello everybody, How would I go about writing stuff to a file but in between the ?php ? tags? Example, say I have config.php as follows... ?php $hostname = localhost; $database = database; $username = username; $password = password; ? How would I go about

Re: [PHP] Implode a 2D Array

2009-07-02 Thread Shawn McKenzie
salmarayan wrote: Can any one tell me how can i implode a two D Array. i can implode normal arrays, but when i try to implode multidimensional Arrays, the result is empty. can some one tell me how to implode an array Like This $x=array ( [0] = array ( [side] = sell [stock_code] = AFMC.CA

[PHP] Re: my first order job on manages jobs

2009-07-01 Thread Shawn McKenzie
Suresh Gupta VG wrote: Hi List, This is the first job chain I am creating using manages job chains. I am trying to create 2 order jobs, 1 order and one jobchain. First I created an orderjob and named it and tried to edit it. A new window displayed with the properties of that order job.

Re: [PHP] exasperated again - shot in the foot

2009-07-01 Thread Shawn McKenzie
Lester Caine wrote: Stuart wrote: 3) Google/Bing it (yeah, Bing's never gonna catch on like that!) Of cause it would be nice to see the Bing clockwork toys that run it ... I couldn't help giggle when they announced they were naming it after a toy manuafacturer :) OT, but the first time I

[PHP] Re: cannot figure out permissions for fopen/fwrite

2009-07-01 Thread Shawn McKenzie
Shawn McKenzie wrote: Mari Masuda wrote: Hello, This is probably a dumb newbie question. I am running PHP 5.2.5 and Apache 2.2.8 on my Mac Book Pro OS X 10.4.11. I compiled PHP and Apache from source a while ago (as opposed to using the built-in web server that is included w/ Mac OS X

Re: [PHP] Re: cannot figure out permissions for fopen/fwrite

2009-07-01 Thread Shawn McKenzie
Mari Masuda wrote: On Jul 1, 2009, at 12:20, Shawn McKenzie wrote: Shawn McKenzie wrote: Mari Masuda wrote: Hello, This is probably a dumb newbie question. I am running PHP 5.2.5 and Apache 2.2.8 on my Mac Book Pro OS X 10.4.11. I compiled PHP and Apache from source a while ago

Re: [PHP] Re: Scope woe

2009-06-30 Thread Shawn McKenzie
Eddie Drapkin wrote: On Tue, Jun 30, 2009 at 10:44 AM, Lukel...@blog-thing.com wrote: What I meant, and I probably sounded a bit rougher than I absolutely had to, was that it's pretty universally lazy and/or bad design to use global variables inside a class, because classes have member

[PHP] Re: check a variable after EACH function

2009-06-30 Thread Shawn McKenzie
Flint Million wrote: This might seem silly but here's what I'm trying to do Suppose I have some kind of check variable - say for example $abort_now. Or it could be a function. Something to be evaluated to a value. I want to execute a block of statements, but after EACH statement

Re: [PHP] mail and mysql confirmation of that [double-opt in]

2009-06-29 Thread Shawn McKenzie
Grega Leskovsek wrote: how is the best way to check if email address is valid: is this preg_match() OK? preg_match('/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/', $email); filter_var($email, FILTER_VALIDATE_EMAIL) How can I make double opt-in mail system? My

Re: [PHP] OT mysql pivot table problem

2009-06-26 Thread Shawn McKenzie
Matt Giddings wrote: Ummm yeah, its going to take me a while to wrap my head around that one. thanks though! Matt -- Matt Giddings Web Programmer Information Technology Services Saginaw Valley State University Phone: 989.964.7247 http://www.svsu.edu I was born in Saginaw, Michigan. I grew

Re: [PHP] CSV file

2009-06-25 Thread Shawn McKenzie
Jonathan Tapicer wrote: Hi, I don't say that reading the whole file into memory is the best option, I just say that your approach goes to the disk twice, if you have a 100MB file, you are reading 200MB from disk (unless there are some pages cached in physical memory, but you never can know,

[PHP] Re: point me to functions to parse the URL? (best one for *this* job?)

2009-06-25 Thread Shawn McKenzie
Govinda wrote: Hi all, (PHP newbie here. Newbie-level task to match.) I am RTFM and working on this.. but I am also under deadline, so, I ask you in case you can point me quick where to read... what functions I need to use for this. Incoming URL will look like these, for example:

[PHP] Re: point me to functions to parse the URL? (best one for *this*job?)

2009-06-25 Thread Shawn McKenzie
Shawn McKenzie wrote: Govinda wrote: Hi all, (PHP newbie here. Newbie-level task to match.) I am RTFM and working on this.. but I am also under deadline, so, I ask you in case you can point me quick where to read... what functions I need to use for this. Incoming URL will look like

[PHP] Re: point me to functions to parse the URL? (best one for *this*job?)

2009-06-25 Thread Shawn McKenzie
Shawn McKenzie wrote: Shawn McKenzie wrote: Govinda wrote: Hi all, (PHP newbie here. Newbie-level task to match.) I am RTFM and working on this.. but I am also under deadline, so, I ask you in case you can point me quick where to read... what functions I need to use

Re: [PHP] anyone using session_mysql successfully

2009-06-24 Thread Shawn McKenzie
Michael A. Peters wrote: Randy Paries wrote: Hello, i am trying to get session_mysql http://websupport.sk/~stanojr/projects/session_mysql/ It configured, compiled and installed ok (no errors anyways) but i am getting an error session_start() [a

Re: [PHP] chmod - Opertaion not permitted in ....

2009-06-24 Thread Shawn McKenzie
Michael A. Peters wrote: Morris wrote: Hi all Got a problem don't know how to get in really.. simple code: ?php chmod(/aaa/bbb.php, 0777); ? and I get a warning says Operations not permitted in . Anyone met this before? I've done quite a lot reading on Google but couldn't get

Re: [PHP] chmod - Opertaion not permitted in ....

2009-06-24 Thread Shawn McKenzie
Ashley Sheridan wrote: On Wed, 2009-06-24 at 09:23 -0500, Shawn McKenzie wrote: Michael A. Peters wrote: Morris wrote: Hi all Got a problem don't know how to get in really.. simple code: ?php chmod(/aaa/bbb.php, 0777); ? and I get a warning says Operations not permitted

[PHP] Re: idiot proofing

2009-06-24 Thread Shawn McKenzie
PJ wrote: I have a bit of a situation. I have set up addBooks, editBooks and deleteBooks pages. Before complicating my life mixing them up in one file, I am running tests. I'd like to make them idiot proof, up to a point. When the page is submitted and the code is parsed, the form inputs

Re: [PHP] Re: idiot proofing

2009-06-24 Thread Shawn McKenzie
Bastien Koert wrote: On Wed, Jun 24, 2009 at 5:30 PM, Shawn McKenzienos...@mckenzies.net wrote: PJ wrote: I have a bit of a situation. I have set up addBooks, editBooks and deleteBooks pages. Before complicating my life mixing them up in one file, I am running tests. I'd like to make them

<    1   2   3   4   5   6   7   8   9   10   >