[PHP] Re: PHP - Header ERROR

2010-06-13 Thread Shawn McKenzie
On 06/13/2010 08:43 AM, Don Wieland wrote: Hello, I have a contact form with three fields, name, email, and comment, and a CAPTCHA I am doing some basic validation for empty fields but am getting a PHP error when trying to redirect back to the original page with an ERROR, It seems when

[PHP] Re: preg_replace insert newline

2010-06-02 Thread Shawn McKenzie
On 06/02/2010 04:28 PM, Sam Smith wrote: $string = 'text with no newline'; $pattern = '/(.*)/'; $replacement = '${1}XX\nNext line'; $string = preg_replace($pattern, $replacement, $string); echo $string; Outputs: text with no newlineXX\nNext line Instead of: text with no newlineXX Next

[PHP] Re: get classname without namespace

2010-06-01 Thread Shawn McKenzie
On 05/29/2010 03:20 PM, Tanel Tammik wrote: Hi, is there a way to get the called classname without the namespace? ?php //PHP 5.3.x namespace some\where; abstract class ParentClass { public static function name() { return strtolower(get_called_class()); } public static

[PHP] Re: php photo galery

2010-05-19 Thread Shawn McKenzie
On 05/18/2010 08:11 PM, David Mehler wrote: Hello, I've googled for this and tried some downloads but not finding what i'm looking for. A site requirement is to have a photo gallery. These user's are not very technical so i thought about getting a galery with the ability to upload photos via

Re: [PHP] regexp questions

2010-05-11 Thread Shawn McKenzie
On 05/11/2010 09:56 AM, Spud. Ivan. wrote: But it doesn't explain why my regexps work fine within php 5.1 but 5.3 Ivan. Post a regex and what you think it should match but doesn't. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Array group and sum values.

2010-05-11 Thread Shawn McKenzie
On 05/11/2010 02:17 PM, Paul Halliday wrote: On Tue, May 11, 2010 at 4:03 PM, Jim Lucas li...@cmsws.com wrote: Paul Halliday wrote: On Tue, May 11, 2010 at 2:25 PM, Jim Lucas li...@cmsws.com wrote: Paul Halliday wrote: I have this: while ($row = mysql_fetch_array($theData[0])) {

Re: [PHP] Array group and sum values.

2010-05-11 Thread Shawn McKenzie
On 05/11/2010 04:09 PM, Shawn McKenzie wrote: On 05/11/2010 02:17 PM, Paul Halliday wrote: On Tue, May 11, 2010 at 4:03 PM, Jim Lucas li...@cmsws.com wrote: Paul Halliday wrote: On Tue, May 11, 2010 at 2:25 PM, Jim Lucas li...@cmsws.com wrote: Paul Halliday wrote: I have this: while ($row

Re: [PHP] Getting root privs

2010-05-01 Thread Shawn McKenzie
On 04/30/2010 09:53 AM, Nilesh Govindarajan wrote: That was what my basic idea about implementing it, but just put up a discussion here to see if there is really any other method except sudo- and there is that cron one as suggested by Jim Lucas. Use the sudoers file to allow your apache user

[PHP] Re: changing NULL behavior in PHP arithmetic

2010-04-16 Thread Shawn McKenzie
On 04/15/2010 02:46 AM, cr.vege...@gmail.com wrote: Hi All, Is there an option in PHP to change the behavior of NULL in PHP functions ? Now PHP uses NULL as a 0 (zero) for arithmetic, for example: NULL + 6 = 6 NULL * 6 = 0 NULL / 6 = 0 6 / NULL = Division by zero What I need is the

[PHP] No notices for undefined index

2010-04-08 Thread Shawn McKenzie
So the first two print statements generate NO notices, while the second obviously generates: Notice: Undefined offset: 1 in /home/shawn/www/test.php on line 11 Notice: Undefined index: test in /home/shawn/www/test.php on line 12 This sucks. A bug??? error_reporting(E_ALL);

Re: [PHP] No notices for undefined index

2010-04-08 Thread Shawn McKenzie
Andre Polykanine wrote: Hello Shawn, Hm... isn't it expected behavior? Since you haven't defined a $a['test'] item, PHP throws a notice... or I'm wrong? Yes it is expected. I'm saying the opposite that it doesn't in the first case. -- Thanks! -Shawn http://www.spidean.com -- PHP General

Re: [PHP] No notices for undefined index

2010-04-08 Thread Shawn McKenzie
Bob McConnell wrote: In the first case, $a=5 creates a multi-typed variable. The interpreter makes its best guess how the next two expressions should be interpreted. In both cases, they look a lot like an index into a character array (string), and 'test' evaluates numerically to zero. Both are

Re: [PHP] No notices for undefined index

2010-04-08 Thread Shawn McKenzie
Shawn McKenzie wrote: Bob McConnell wrote: In the first case, $a=5 creates a multi-typed variable. The interpreter makes its best guess how the next two expressions should be interpreted. In both cases, they look a lot like an index into a character array (string), and 'test' evaluates

[PHP] Re: Newbie Question about Conditionals

2010-03-31 Thread Shawn McKenzie
Matty Sarro wrote: Hey all! This is probably my second post on the list, so please be gentle. Right now I am running through the Heads First PHP and MySQL book from O'Reilly. It's been quite enjoyable so far, but I have some questions about some of the code they're using in one of the

Re: [PHP] Still searching for a bugtracking system

2010-03-30 Thread Shawn McKenzie
Andre Polykanine wrote: Hello Jan, And what do you use then?) If you're able to, you enable the sqllite extension in your php.ini and then you create your database as a flat file. The installer for the bug tracker would probably do that for you. -- Thanks! -Shawn http://www.spidean.com

[PHP] Re: MySQL: Return Number of Matched Rows

2010-03-26 Thread Shawn McKenzie
James Colannino wrote: Hey everyone, I have a question. If I do a mysql query that updates a column in a row to the same value, I get 0 rows affected. However, I also get 1 or more matched rows. Is there a way that I can return the number of matched rows, rather than the number of rows

[PHP] Re: Code samples in OOo Presenter

2010-03-22 Thread Shawn McKenzie
Larry Garfield wrote: Hi all. I have a busy conference season coming up, and will be giving a number of presentations that involve code, specifically PHP. I am going to want to put code onto slides in OpenOffice (3.1 specifically, using Kubuntu 9.10), but to date I've never figured

Re: [PHP] Global Var Disappearing After Function

2010-03-22 Thread Shawn McKenzie
APseudoUtopia wrote: On Mon, Mar 22, 2010 at 5:13 PM, Peter van der Does pvanderd...@gmail.com wrote: On Mon, 22 Mar 2010 16:58:33 -0400 APseudoUtopia apseudouto...@gmail.com wrote: Hey list, I have a very odd problem which has been driving me crazy for two days. I've been trying to debug

[PHP] Re: where to make observations about current PHP manual?

2010-03-19 Thread Shawn McKenzie
Robert P. J. Day wrote: i don't see a separate mailing list for documentation so is this where i would point at oddities in the manual? as in, here: http://www.php.net/manual/en/language.variables.external.php we read: // Unavailable since PHP 6. that just looks weird, no? rday

[PHP] Re: different php.ini for virtual host on apache2 with mod_php5

2010-03-17 Thread Shawn McKenzie
Stanislaw V. Smetanin wrote: Hi there. the problem: I want to disable mail() function in the one of virtual hosts' that use PHP(I use mod_php for apache2), and regarding to the http://www.php.net/manual/en/ini.core.php#ini.disable-functions I can't use directives like php_value, etc,

[PHP] Re: Array Search Not Working?

2010-03-10 Thread Shawn McKenzie
Alice Wei wrote: Hi, I have two arrays here that I have combined into a new array, as shown here: $from = explode(-, $from); $change = explode(-,$change); $new_array = array_combine($from,$change); I then tried reading it from a file and do string matches, trying to find out the

[PHP] Re: Best os shopping cart

2010-03-03 Thread Shawn McKenzie
Haig Davis wrote: Hi, I apologise if this is not strictly php related. What Open Source Shopping cart system do you recommend between osCommerce and Zen-Cart for ease of use and a php guy with dangerously little javascript knowledge? This is not for a massive shopping site, simply a cart

Re: [PHP] Best Practices Book, Document, Web Site?

2010-03-02 Thread Shawn McKenzie
Paul M Foster wrote: On Mon, Mar 01, 2010 at 01:48:14PM -0700, Hansen, Mike wrote: Is there a PHP Best Practices Book, Document, or web site that has information similar to Perl Best Practices but for PHP? FWIW, we tried to create a thread to gather these best practices ideas, and mostly

[PHP] Re: Best Practices Book, Document, Web Site?

2010-03-01 Thread Shawn McKenzie
Hansen, Mike wrote: Is there a PHP Best Practices Book, Document, or web site that has information similar to Perl Best Practices but for PHP? I'm not familiar with the Perl one, so I don't know specifically what you mean, but there are many coding standards. Probably the Zend one would be

[PHP] Re: Is there a way to get PHP to release this file?

2010-03-01 Thread Shawn McKenzie
Andrew Ballard wrote: I am editing a data file via ODBC, and would like to be able to download the updated file in the same transaction when finished. It seems, however, that even after calling odbc_close(), PHP still retains a lock on the file for the duration of the request. Is there a way

[PHP] Post and Redirect

2010-02-26 Thread Shawn McKenzie
I remembered seeing this question on the list several times in the past, so I thought I would post something I just hacked up for someone. As we know, we can user header() to redirect the browser, but of course we can't redirect the browser and have it post data to the new page. If you need to

[PHP] Re: PHP GET Error?

2010-02-25 Thread Shawn McKenzie
Alice Wei wrote: Hi, I have done something wrong here, because when I have my variables declared in my PHP: $people_from = $_GET['people_from']; $state_colors= $_GET['state_colors']; I get this url: http://localhost/generic.php?people_from=Adair, OK-Alfalfa, OK-Atoka,

[PHP] Re: PHP GET Error?

2010-02-25 Thread Shawn McKenzie
Alice Wei wrote: Hi, I forgot to mention that the url is formed from Actionscript, I am just using PHP to do the I/O because Actionscript does not have this option. So, I guess I cannot do the serialize here like you suggested. I have changed # to 0x for now, and that does not

[PHP] Re: PHP GET Error?

2010-02-25 Thread Shawn McKenzie
Shawn McKenzie wrote: Alice Wei wrote: Hi, I have done something wrong here, because when I have my variables declared in my PHP: $people_from = $_GET['people_from']; $state_colors= $_GET['state_colors']; I get this url: http://localhost/generic.php?people_from=Adair, OK

[PHP] Re: PHP GET Error?

2010-02-25 Thread Shawn McKenzie
Alice Wei wrote: Date: Thu, 25 Feb 2010 13:50:16 -0600 From: nos...@mckenzies.net To: aj...@alumni.iu.edu CC: php-general@lists.php.net Subject: Re: PHP GET Error? Alice Wei wrote: Hi, I forgot to mention that the url is formed from Actionscript, I am just using PHP to do the I/O

Re: [PHP] RE: PHP GET Error?

2010-02-25 Thread Shawn McKenzie
Alice Wei wrote: Subject: Re: [PHP] RE: PHP GET Error? From: a...@ashleysheridan.co.uk To: aj...@alumni.iu.edu CC: nos...@mckenzies.net; php-general@lists.php.net Date: Thu, 25 Feb 2010 20:03:28 + On Thu, 2010-02-25 at 15:01 -0500, Alice Wei wrote: Date: Thu,

Re: [PHP] RE: PHP GET Error?

2010-02-25 Thread Shawn McKenzie
Alice Wei wrote: I can't see anything obviously wrong with the URL really. Is there no way instead to send the data as post data from Flash? I know Flash can make post requests, but I'm not sure how much more difficult it is. I had it using POST before, but from the PHP point of view, it

Re: [PHP] Linux ERD software

2010-02-24 Thread Shawn McKenzie
Ashley Sheridan wrote: On Wed, 2010-02-24 at 11:28 -0600, haliphax wrote: Dia is also a superb diagramming software, though I don't think it generates any SQL for you when it's said and done. There are versions for several operating systems (including Linux AND Windows). // Todd Cool

[PHP] Re: Magnetic Stripe Reader or Barcode to PHP

2010-02-19 Thread Shawn McKenzie
Daevid Vincent wrote: I'll confess that I've done almost zero research on this topic as of right now aside from pricing readers and blank cards. So we're opening a new super-club here in Seattle. One of the ideas we'd like to pursue is that people are assigned a card. This can be a magstripe

[PHP] Re: storing a mysql query in mysql

2010-02-17 Thread Shawn McKenzie
Matt Giddings wrote: Whats the best way to store a mysql query in mysql. I'm trying to store a mysql query in a debug log table if there is a problem with the query. I've tried using addslashes and a few other commands. I don't have a problem putting the data into the database but when I

Re: [PHP] Re: UK Project Opportunity

2010-02-16 Thread Shawn McKenzie
Paul M Foster wrote: On Tue, Feb 16, 2010 at 10:02:09PM +, Nathan Rixham wrote: Manuel Lemos wrote: Hello, on 02/15/2010 11:37 AM Nathan Rixham said the following: I need to find a skilled PHP dev, UK based, with long term availability, in the short term to join me on a project and

Re: [PHP] Re: UK Project Opportunity

2010-02-16 Thread Shawn McKenzie
Manuel Lemos wrote: Hello, on 02/17/2010 02:13 AM Shawn McKenzie said the following: PHP framework to speak of. Manuel has authored most of them and many I suppose you meant that I authored many of the classes. I only submitted about 30 out of more than 2600 classes available submitted

Re: [PHP] optional object arguments to a function

2010-02-14 Thread Shawn McKenzie
Michael A. Peters wrote: Rene Veerman wrote: On Sat, Feb 13, 2010 at 9:05 AM, Michael A. Peters mpet...@mac.com wrote: How do I specify a default null object, or otherwise make the argument argument optional? To my knowledge: can't be done. But you can check any args through the

Re: [PHP] optional object arguments to a function

2010-02-14 Thread Shawn McKenzie
Nathan Rixham wrote: Shawn McKenzie wrote: Michael A. Peters wrote: Rene Veerman wrote: On Sat, Feb 13, 2010 at 9:05 AM, Michael A. Peters mpet...@mac.com wrote: How do I specify a default null object, or otherwise make the argument argument optional? To my knowledge: can't be done

Re: [PHP] PHP Manual problems

2010-02-10 Thread Shawn McKenzie
Lester Caine wrote: Since a large section of our USER base is still tied to W2k and does not have access to install other software, the call for IE6 to die is STILL somewhat premature! What is needed is someone to kick M$ to sort the mess out by at least allowing IE8 to install on W2k

[PHP] Re: SOAP connect error

2010-02-09 Thread Shawn McKenzie
Eric Lommatsch wrote: Hello, I am working with the SOAP package of PHP and I am trying make a connection from a hosted website to a server in our office. I can get to the server perfectly fine from within our office, but I cannot connect from the eternal site. I have checked and I

[PHP] Re: Warning?

2010-02-07 Thread Shawn McKenzie
tedd wrote: Hi: Has anyone encountered this warning? Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is

Re: [PHP] simplexml - can it do what I need?

2010-02-06 Thread Shawn McKenzie
TerryA wrote: My first post and I'm just a few days into learning PHP so that I can extract data from an XML feed for updating a MySQL driven website. Simplexml grabs most of my data without a problem but I can't get at the data in elements such as: element idtype=11 lang=fr

Re: [PHP] Re: how do I use php://memory?

2010-01-30 Thread Shawn McKenzie
Daniel P. Brown wrote: (Typing from the DROID, so forgive the top-posting.) Shawn, would you take a few moments to submit this as a bug at http://bugs.php.net/? I know you well enough that, if you say the docs suck, they probably do. On Jan 29, 2010 10:47 PM, Shawn McKenzie nos

[PHP] Re: how do I use php://memory?

2010-01-29 Thread Shawn McKenzie
Mari Masuda wrote: Has anyone ever successfully used php://memory before? If so, what can I do to use it in my code? Thank you. No, but I was intrigued to try it, so I tested this: $text = 'Some text.'; file_put_contents('php://memory', $text); echo file_get_contents('php://memory'); And

Re: [PHP] Re: how do I use php://memory?

2010-01-29 Thread Shawn McKenzie
Eric Lee wrote: On Sat, Jan 30, 2010 at 9:00 AM, Shawn McKenzie nos...@mckenzies.netwrote: Mari Masuda wrote: Has anyone ever successfully used php://memory before? If so, what can I do to use it in my code? Thank you. No, but I was intrigued to try it, so I tested this: $text = 'Some

[PHP] Re: Good source for sample data?

2010-01-28 Thread Shawn McKenzie
Brian Dunning wrote: Hey all - I need a few million sample contact records - name, company, address, email, web, phone, fax. ZIP codes and area codes and street addresses should be correct and properly formatted, but preferably not real people or companies or email addresses. But they'd

Re: [PHP] MySQL ID -- what happens when you run out of range?

2010-01-25 Thread Shawn McKenzie
Joseph Thayne wrote: That is incorrect. What will happen is as follows: 1. The value will be incremented by 1 causing the value to be greater than the maximum integer allowed. 2. MySQL will see this as a problem and truncate it to the closest value. 3. MySQL will then try and insert

Re: [PHP] Creating an Entire .html page with PHP

2010-01-25 Thread Shawn McKenzie
deal...@gmail.com wrote: On Jan 25, 2010, at 4:59 PM, Ashley Sheridan wrote: $fh = fopen(page.html,w); fwrite($fh, $htmlcode); Thanks so much Ashley and ALL, this looks like it will work fine. BTW: Sorry if I didn't make myself clear - I just wanted to grab some data like a

Re: [PHP] 大客户营销策略与区域市场开发

2010-01-23 Thread Shawn McKenzie
Marc Hall wrote: Anyone speak Chinese? Google does, sort of: Great customer marketing strategies, regional market development and sales team management and control gold Tactical Training Workshop Date: January 2010 22-24 (Shanghai) Date: January 2010 29-31

Re: [PHP] Close MySQL Result

2010-01-21 Thread Shawn McKenzie
Daevid Vincent wrote: -Original Message- From: Nathan Rixham [mailto:nrix...@gmail.com] you'll also find a performance upgrade if you load all sql results in to an array and close up the query / free the results before working on them. query for() { $results[] = $row; }

[PHP] Re: Casting objects.

2010-01-18 Thread Shawn McKenzie
Richard Quadling wrote: Hello. I've got an object via odbc_fetch_object (which is of stdClass). I have an class structuresRemovalReason. I want to cast the response of odbc_fetch_object to structuresRemovalReason. The only way I can see of doing this is to not use odbc_fetch_object,

[PHP] Re: Casting objects.

2010-01-18 Thread Shawn McKenzie
Shawn McKenzie wrote: Richard Quadling wrote: Hello. I've got an object via odbc_fetch_object (which is of stdClass). I have an class structuresRemovalReason. I want to cast the response of odbc_fetch_object to structuresRemovalReason. The only way I can see of doing this is to not use

[PHP] Re: Casting objects.

2010-01-18 Thread Shawn McKenzie
Shawn McKenzie wrote: Never mind, that was stupid. I saw that somewhere before, but obviously it doesn't work. I found some code, maybe I redeem myself? static public function cast($object, $class=__CLASS__){ if(class_exists($class)) { $object = unserialize

Re: [PHP] mysql_real_escape_string(0xffffffff) yields -1

2010-01-16 Thread Shawn McKenzie
LinuxManMikeC wrote: On Fri, Jan 15, 2010 at 3:22 PM, Richard Lynch c...@l-i-e.com wrote: The subject line says it all: mysql_real_escape_string(0x) yields -1 What's up with that? Is there some way to convince mysql_real_escape_string to use BIGINT? I guess I'll just PCRE for

Re: [PHP] Read directory; store filenames found in mySQL table?

2010-01-13 Thread Shawn McKenzie
Kenneth Sande wrote: I use the glob function in my little homemade web cam page, which can really swell up in memory when used against a large amount of files (in my case around 30k files). +1 for glob() -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List

Re: [PHP] header(Location:...) fails

2010-01-13 Thread Shawn McKenzie
Robert Cummings wrote: Just make your life easy and create a redirect() function that generates the header instruction, makes a relative URL into an absolute URL and does the exit call. Then you just need to do: redirect( 'target.php' ); So much simpler :) Cheers, Rob.

[PHP] Re: splitting a string

2010-01-05 Thread Shawn McKenzie
Ingleby, Les wrote: Hi all, first time I have posted here so please be nice. I am using PEAR HTTP_Upload to handle multiple file uploads. What I need to do is to take the file name which is output using the getProp() function and then remove the file extension from the end of the file for

Re: [PHP] Re: splitting a string

2010-01-05 Thread Shawn McKenzie
Ashley Sheridan wrote: On Tue, 2010-01-05 at 08:45 -0600, Shawn McKenzie wrote: Ingleby, Les wrote: Hi all, first time I have posted here so please be nice. I am using PEAR HTTP_Upload to handle multiple file uploads. What I need to do is to take the file name which is output using

Re: [PHP] Re: splitting a string

2010-01-05 Thread Shawn McKenzie
Andrew Ballard wrote: On Tue, Jan 5, 2010 at 10:20 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-01-05 at 16:18 +0100, Daniel Egeberg wrote: On Tue, Jan 5, 2010 at 16:09, Shawn McKenzie nos...@mckenzies.net wrote: Of course this doesn't work for something like

[PHP] Re: Noob stuff - Zend/Opcode/Cache/Optimizer

2009-12-27 Thread Shawn McKenzie
Daniel Kolbo wrote: Hello, I'm missing some unifying piece of the zend/php puzzle... I understand the basics of zend engine opcode, caching the opcode, optimizing the opcode, and caching the optimized opcode, etc... The part I'm struggling with is somewhere in the zend world. Under a

[PHP] Re: Noob stuff - Zend/Opcode/Cache/Optimizer

2009-12-27 Thread Shawn McKenzie
Hello Mr. McKenzie, Thanks for the response. I do not see zend optimizer+ on: http://www.zend.com/en/downloads/ There is a zend optimizer download link, but this is different than zend optimizer+. My understanding is the former facilitates with the use of zend gaurd while the latter

[PHP] Merry Christmas!

2009-12-25 Thread Shawn McKenzie
Merry Christmas from Texas, USA! -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Parsing JSON; back-slash problem

2009-12-15 Thread Shawn McKenzie
Ashley Sheridan wrote: On Tue, 2009-12-15 at 06:52 -0500, Andrew Burgess wrote: This seems like a pretty basic question, but it has me stumped. Here's my scenario: I'm using Douglas Crockford's JSON2.js to parse an object in JavaScript, which I then pass to a PHP script to store in a file.

Re: [PHP] Class not functioning

2009-12-15 Thread Shawn McKenzie
Allen McCabe wrote: Hey all (and Nirmalya, thanks for the help!), I have a question that I just can't seem to find via Google. I want to be able to add messages to a qeue whenever my classes complete (or fail to complete) specific functions. I think have a call within my html to my

Re: [PHP] Class not functioning

2009-12-15 Thread Shawn McKenzie
Sorry, and then I didn't keep it on list :-( Shawn McKenzie wrote: Please reply to the list. Just google for php registry pattern. Here is a very basic example. There are better OOP people here than I. class Registry { protected $_objects = array(); function set($name, $object

Re: [PHP] Force-Saving an Audio File

2009-12-09 Thread Shawn McKenzie
c...@hosting4days.com wrote: On Dec 9, 2009, at 12:27 AM, Gaurav Kumar wrote: You can do two things- 1. Read the file by providing a base directory path of the server where the file exist. Something like- //htdocs/httpfolder/files/audio/yourfile.mp3 You can take this in a variable

[PHP] Re: SimpleXML or DOMDocument help

2009-12-09 Thread Shawn McKenzie
Michael Alaimo wrote: Hello All, I have an XML document that has elements as such: Query:Expression Query:ResourceID Query:EqualTest/Query:Equal /Query:ResourceID /Query:Expression I cannot figure out how to access these with simple

[PHP] Re: SimpleXML or DOMDocument help

2009-12-09 Thread Shawn McKenzie
Please keep this on list. The URI for the namespace is important. Something like (not tested): | ||// use URI for Query namespace| | foreach ($xml-children('http://www.example.com/something') as $Query) { echo $Query-Where; } || | Michael Alaimo wrote: What's the entire XML document?

[PHP] Re: SimpleXML or DOMDocument help

2009-12-09 Thread Shawn McKenzie
Shawn McKenzie wrote: Please keep this on list. The URI for the namespace is important. Something like (not tested): | ||// use URI for Query namespace| | foreach ($xml-children('http://www.example.com/something') as $Query) { echo $Query-Where; } || | Michael Alaimo wrote

[PHP] Re: SimpleXML or DOMDocument help

2009-12-09 Thread Shawn McKenzie
Shawn McKenzie wrote: Shawn McKenzie wrote: Please keep this on list. The URI for the namespace is important. Something like (not tested): | ||// use URI for Query namespace| | foreach ($xml-children('http://www.example.com/something') as $Query) { echo $Query-Where

Re: [PHP] Powerpoint from PHP?

2009-12-02 Thread Shawn McKenzie
Skip Evans wrote: I wonder what other alternatives to PP might exist for a possible solution to this. I don't know squat about Flash, but the client is not married to PP, just needs some kind of presentation the side can assemble, again basically put images and text into something that can be

Re: [PHP] Compatiabilty issues

2009-12-02 Thread Shawn McKenzie
Ashley Sheridan wrote: On Wed, 2009-12-02 at 12:17 +0100, Julian Muscat Doublesin wrote: Sorry about the reply to all. the htaccess files worked correctly on a wamp setup I had. All this happened once I did the big move to apache. On Wed, Dec 2, 2009 at 12:10 PM, Ashley Sheridan

Re: [PHP] string concatenation with fgets

2009-11-30 Thread Shawn McKenzie
aurfal...@gmail.com wrote: So here is my final test code, notice the check for ' ' in the if. Since I'm on Linux, this has to do with whats between the last LF and EOF which is nothing but this nothing will get printed out. $file = fopen(somefile.txt, r); while (! feof($file)) {

[PHP] Re: processing html forms and keeping the values

2009-11-24 Thread Shawn McKenzie
Merlin Morgenstern wrote: Hi there, I am trying to redirect a user back to a html form if a validation failes. The form shoult then hold all entered values. So far I did this over $_GET, but there is a 100 Character limitation. How could I do this while keeping all characters? Thank you

[PHP] Re: need a find/replace command to fix my require_once

2009-11-20 Thread Shawn McKenzie
Nathan Rixham wrote: Daevid Vincent wrote: I was reading this: http://pear.php.net/manual/en/standards.including.php and it states: Note: include_once and require_once are statements, not functions. Parentheses should not surround the subject filename. I never knew that. I've always

[PHP] Re: Thread Safe?

2009-11-20 Thread Shawn McKenzie
David Stoltz wrote: Forgot to ask: On the Windows download page, there are options like: VC9 Thread Safe VC9 Non-Thread Safe VC6 Thread Safe ...etc What is the VC, and what is thread safe? Thanks! VC = Microsoft Visual C. 9 and 6 are the versions.

Re: [PHP] Noob question: Making search results clickable.

2009-11-18 Thread Shawn McKenzie
Gary Smith wrote: Paul Jinks wrote: Hi all I'm building a fairly basic php/mySql site but I'm running into problems due to my total lack of experience. I have a database of videos - each has a title, transcript, description and one or more topics. So far I can search the database by topic

Re: [PHP] Noob question: Making search results clickable.

2009-11-18 Thread Shawn McKenzie
. Will check all this out and let you know how I get on. Paul On Wed, Nov 18, 2009 at 3:33 PM, Shawn McKenzie nos...@mckenzies.net wrote: Gary Smith wrote: Paul Jinks wrote: Hi all I'm building a fairly basic php/mySql site but I'm running into problems due to my total lack

[PHP] Re: dynamic meta tag and title app?

2009-11-18 Thread Shawn McKenzie
Jack S wrote: Hello All, Does anyone have a reference to a program that may be out there to help with using a single header.php for a site, but then dynamically loads different keywords , titles etc based on what page is including the header file? Sample: If home page include it knows

[PHP] Re: Suppress Right-Click and Hide hover URL

2009-11-09 Thread Shawn McKenzie
Don Wieland wrote: Hi gang, Is there a javascript to Suppress Right-Click and Hide hover URL? I as trying to get this to work with no luck: a href=\aInlet_Proc_Area.php?id={$row1['id']}proc=delete\ onMouseOver=\javascript:window.status=''; return true;\ onClick=\javascript:return

[PHP] Re: Suppress Right-Click and Hide hover URL

2009-11-09 Thread Shawn McKenzie
I see... I guess I fail at being a smart ass! Don Wieland wrote: Nope this was just a snippet of my code - they are between the PHP tags. On Nov 9, 2009, at 11:38 AM, Shawn McKenzie wrote: You are missing PHP tags ?php ? Don Wieland D W D a t a C o n c e p t s

Re: [PHP] Creating a Dynamic PHP/CSS Page (newbie design question)

2009-11-05 Thread Shawn McKenzie
c...@hosting4days.com wrote: SORRY FOR THE EXTRA 2 BAD pre SENDS (accident...) Thank for all the help! Getting there... as a baby step - I'm trying this: (part of this is from - http://sperling.com/examples/pcss/) 1 - I created this style sheet page called css.php with these

Re: [PHP] Custom function for inserting values into MySQL

2009-11-04 Thread Shawn McKenzie
In your example, I would name my form inputs similar to name =data[user_id]. Then you just pass the $_POST['data'] array to your function. -Shawn Allen McCabe wrote: You raise some good points. I always name my input fields after the entity names ( eg. input type=hidden name =user_id value=

Re: [PHP] Custom function for inserting values into MySQL

2009-11-03 Thread Shawn McKenzie
Allen McCabe wrote: Okay friends, I have been wondering about writing a simple function that will help me with my MySQL inserting. Not because I need to save time and space, but because I wanted to. I wrote a function for inserting 10 values (I have not been able to come up with an idea how

[PHP] Re: Using remote include config file and class in a local file

2009-11-03 Thread Shawn McKenzie
Anton Heuschen wrote: Question is wrt to including a config file on an external server in a local include Lets say that on 127.0.0.1 I have test.php with include http://200.200.1.1/Folder/Config.php $obj = new RemoteClass() do stuff and on server 200.200.1.1 I have my Config.php

[PHP] Re: UrlRewrite htaccess confusion

2009-10-29 Thread Shawn McKenzie
Rob Gould wrote: I feel like I'm really close to a solution for the clean-url method in htaccess. I've successfully got it now so that: http://benchwarmersports.com/packages/basketball/2010/nba-all-star-game maps to:

[PHP] Re: UrlRewrite htaccess confusion

2009-10-29 Thread Shawn McKenzie
Rob Gould wrote: You are indeed correct! Absolute URLs for everything, images, css, javascript, and links fixed the issue. Took me forever to change every link in the whole site, but it's happy now. Seems like there ought to be an easier way. There is an easier way. The logic depends

[PHP] Re: What PHP version are you using?

2009-10-29 Thread Shawn McKenzie
Israel Ekpo wrote: Hi Guys, I just want to conduct a quick survey to find out what version of PHP people are using in their production environments. I have a PHP extension for Solr that I have set the minimum required version as 5.2.11. http://pecl.php.net/package/solr/ However,

[PHP] Re: UrlRewrite htaccess confusion

2009-10-29 Thread Shawn McKenzie
Shawn McKenzie wrote: Rob Gould wrote: You are indeed correct! Absolute URLs for everything, images, css, javascript, and links fixed the issue. Took me forever to change every link in the whole site, but it's happy now. Seems like there ought to be an easier way. There is an easier

[PHP] Re: What PHP version are you using?

2009-10-29 Thread Shawn McKenzie
Shawn McKenzie wrote: Home/Dev: 5.2.15 Web: 5.1.6 (probably should update) O.K. so 5.2.15 doesn't exist :-( That is the Zend debugger version I have. I actually have Home/Dev: 5.2.4. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net

[PHP] Re: Converting tables into forms

2009-10-28 Thread Shawn McKenzie
ben...@gmail.com wrote: I am trying to take MySQL tables and use the table structure to create HTML/PHP forms in as few steps as possible for further development. I have a project that has hundreds of tables and requires hundreds of forms to be created and don't want to do so field by field by

Re: [PHP] Re: Create a screenshot of a website

2009-10-28 Thread Shawn McKenzie
Manuel Lemos wrote: http://www.phpclasses.org/gtkmozembed-shot It hurts my eyes to go on the phpclasses website. It's like someone vomited tabs and links :| I have no clue why you felt the need to be so aggressive. Anyway, if you are that sensitive to design issues, why don't you

[PHP] Re: PHP+Apache suddenly not working

2009-10-27 Thread Shawn McKenzie
Jason Lixfeld wrote: I have no doubt that this is due to an update that was done on my system at some point, but unfortunately I can't pinpoint where. The upshot is that PHP is completely unresponsive for me when run from Apache and I'm not sure where to look. I recognize that this isn't an

Re: [PHP] Array

2009-10-24 Thread Shawn McKenzie
Ron Piggott wrote: The code I have so far for orders is below. When a product hasn't been added it does what I want it to --- in giving the message Your shopping cart is empty. When a product is added, but then the user changes their mind I use the following lines of code to remove the

Re: [PHP] php mail() function

2009-10-22 Thread Shawn McKenzie
Paul M Foster wrote: On Thu, Oct 22, 2009 at 06:24:14PM -0700, James Prentice wrote: One other note. People look at me like I'm crazy when I mention this, but I've seen it quite a bit at various internet mail servers. Sometimes, in order to accept email from you, the internet mail server

[PHP] Re: Text File Busy

2009-10-21 Thread Shawn McKenzie
Floyd Resler wrote: For some reason I'm getting a Text file busy error when I try to execute PHP scripts from the command line now. It used to work, but now it doesn't. I do have #!/usr/bin/php at the top of my script. If I feed the file to php (i.e. /usr/bin/php -f filename.php) it works.

[PHP] Re: how call a variable in a text

2009-10-21 Thread Shawn McKenzie
Bulend Kolay wrote: I 'll send a mail in html form using php5. cat send.php ?php $variable=date1 ; .. .. $message=' b There is a text $variable trial. /b '; mail($to, $subject, $message, $headers) ; ? when I run send.php, I get the mail. But I can't call variable called

Re: [PHP] how call a variable in a text

2009-10-21 Thread Shawn McKenzie
Ashley Sheridan wrote: On Wed, 2009-10-21 at 22:54 +0200, Kim Madsen wrote: Ashley Sheridan wrote on 2009-10-21 22:43: The {} only become really useful when you're trying to reference arrays within a string: $var = array('great', 'boring'); $text = this is {$var[0]}.; Without the

Re: [PHP] Get rid of warning massage

2009-10-20 Thread Shawn McKenzie
Ashley Sheridan wrote: On Tue, 2009-10-20 at 19:01 +0300, Thodoris wrote: How do you mean an invalid URL? A URL that is not valid as in $url = poo or a valid formed URL that doesn't exist? Thanks, Ash http://www.ashleysheridan.co.uk Does it really matter? In both cases the

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