[PHP] Regular expression to find from start of string to first space

2006-08-08 Thread Dave M G
work. Where did I go wrong? -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Regular expression to find from start of string to first space

2006-08-08 Thread Dave Goodchild
On 08/08/06, Dave M G [EMAIL PROTECTED] wrote: PHP, Shouldn't this regular expression select everything from the start of the string to the first space character: $firstWord = preg_match('#^*(.*) #iU', $word); It doesn't, so clearly I'm wrong, but here's why I thought it would: . stands

Re: [PHP] break up variable and put each element in an array

2006-08-08 Thread Dave Goodchild
On 08/08/06, Reinhart Viane [EMAIL PROTECTED] wrote: A. I have a page on which people can supply dates in a text area. Dates are entered like this: 3/01/2005 29/12/2005 2/01/2006 20/02/2006 28/12/2006 1/01/2007 15/02/2007 B. Now I need this Post element to be broken into pieces (per date) and

Re: [PHP] Using preg_match to find Japanese text

2006-08-08 Thread Dave M G
Richard, Madoka, Thank you for your insights into searching for Japanese characters. I've decided to stick with searching for words as determined by the placement of spaces within the source text. Thank you for your time and advice. -- Dave M G -- PHP General Mailing List (http

Re: [PHP] Regular expression to find from start of string to first space [SOLVED]

2006-08-08 Thread Dave M G
Richard, Adam, Barry, Dave, David, Thank you all for your helpful advice regarding expressions. I was able to combine all your advice, and made some additional discoveries along the way. The winning expression is: #^(.*)\s#iU First, I discovered that sometimes the source text had

[PHP] Declaring variables from the url

2006-08-07 Thread Dave M G
is contained in there, so it is being assigned and contained somehow. What could I possibly be missing in what should be a super simple process? -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] The difference between ereg and preg? [SOLVED]

2006-08-06 Thread Dave M G
well now. Thanks to the PHP list, especially Jochem, Ligaya, Dave, Robert, Mike, Robert, Adam, and John, for all your helpful information and advice. -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] The difference between ereg and preg?

2006-08-05 Thread Dave M G
greediness is determined by some other modifier? -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Using preg_match to find Japanese text

2006-08-05 Thread Dave M G
me started, it would be much appreciated. Thank you for your time and help. -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] The difference between ereg and preg?

2006-08-04 Thread Dave Goodchild
On 04/08/06, Chris [EMAIL PROTECTED] wrote: Dave M G wrote: PHP List, Recently I wrote a piece of code to scrape data from an HTML page. Part of that code deleted all the unwanted text from the very top of the page, where it says !DOCTYPE, all the way down to the first instance of a ul

Re: [PHP] The difference between ereg and preg?

2006-08-04 Thread Dave M G
Chris, Ligaya, Dave, Thank you for responding. I understand the difference in principle between ereg and preg much better now. Chris wrote: ! in perl regular expressions means not so you need to escape it: \! Still, when including that escape character, the following preg expression does

Re: [PHP] The difference between ereg and preg?

2006-08-04 Thread Dave M G
$htmlPage and delete everything *except* text that is between a li tag and a br tag? Or is that something that requires much more than a single use of preg_replace? -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] The difference between ereg and preg?

2006-08-04 Thread Dave M G
checked and rechecked my syntax, and I can't see why it would fail. Have I messed up the regular expression, or the use of preg_match_all? -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] The difference between ereg and preg?

2006-08-04 Thread Dave M G
, then it only looks at li and br tags within each line, thus returning small, discreet matches. I personally don't think this is very rational behaviour, so either I'm doing something wrong still, or perhaps it's me who isn't very rational. Either is likely. -- Dave M G -- PHP General Mailing List

Re: [PHP] Is this a PHP issue, or a CGI issue? [SOLVED]

2006-08-03 Thread Dave M G
Jochem, Thank you for responding. no doubt it will become a php issue in the near future ;-) I'm sure it will. However, you have kick started me in the right direction, and I have the beginnings of a working page. Thank you for your helpful advice. -- Dave M G -- PHP General Mailing

[PHP] The difference between ereg and preg?

2006-08-03 Thread Dave M G
for the command above, but preg not? Thank you for any advice. -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Is this a PHP issue, or a CGI issue?

2006-08-02 Thread Dave M G
about? Is it something do to with how the form action is structured? Please advise on how to diagnose and address this problem. If necessary, please tell me where this issue would be best addressed if it is not a PHP issue. Thank you for your time and help. -- Dave M G -- PHP General Mailing

Re: [PHP] is it possible to manipulate vars here..

2006-08-02 Thread Dave Goodchild
On 02/08/06, Jochen Kaechelin [EMAIL PROTECTED] wrote: .. to build a url like http://devil.server.com/vitims_page.php?? Not sure what you're trying to do, but switch register_globals OFF. Also, if you are trying to concatenate strings inside the function, use ., not +. --

[PHP] Postcode proximity classes

2006-07-28 Thread Dave Goodchild
Hi all. I am about to start writing an events listing application (nationwide) and want users to be able for example to specify events within a 5, 10 and 15 mile radius of their postcode. Does anyone know of a set of classes/library that can provide this, would rather not fork out on a bespoke

[PHP] Htmlentities vs htmlspecialchars

2006-07-26 Thread Dave Goodchild
Hi all. I know htmlspecialchars converts the smallest set of entities possible to generate valid HTML, and that htmlentities goes much further, so what is the difference? Is it not better to use htmlentities in every case, making htmlspecialchars somewhat redundant, or is there a performance

[PHP] PHP Debugger Recommendations

2006-07-22 Thread Dave M G
cross platform, Java based or whatever else, would be best. Are there any recommendations? -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP Debugger Recommendations

2006-07-22 Thread Dave M G
or PHPEclipse? I am going to try them out. Thank you for suggesting them. -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Zend Studio, phpMyAdmin, and mysql.sock

2006-07-15 Thread Dave M G
, and for making this list a great source of support. -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Zend Studio, phpMyAdmin, and mysql.sock

2006-07-15 Thread Dave M G
advice would be much appreciated. Thank you. -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] regular expression to extract from the middle of a string

2006-07-14 Thread Dave Goodchild
On 14/07/06, Steve Turnbull [EMAIL PROTECTED] wrote: Hey folks I don't want to just get you to do the work, but I have so far tried in vain to achieve something... I have a string similar to the following; cn=emailadmin,ou=services,dc=domain,dc=net I want to extract whatever falls between

Re: [PHP] Zend Studio, phpMyAdmin, and mysql.sock

2006-07-14 Thread Dave M G
development environment so that I can debug my PHP scripts without it conflicting with the PHP database administration system is on-topic? -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Silly varible question

2006-07-13 Thread Dave Goodchild
On 13/07/06, Ed Curtis [EMAIL PROTECTED] wrote: I know this is probably simple as all get out but it's early and I can't find an answer anywhere after searching for a while I need to assign a number to a variable and then use that variable in a session to store an array. It's for a

Re: [PHP] Upload a big file.

2006-07-13 Thread Dave Goodchild
On 13/07/06, João Cândido de Souza Neto [EMAIL PROTECTED] wrote: Hello gang. I´ve got a e-commerce system where one can import data from his management system. This importation files sometimes has a size about 8Mb. Unfortunatly, when one try to put this file into e-commerce, generaly one gets

[PHP] Zend Studio, phpMyAdmin, and mysql.sock

2006-07-13 Thread Dave M G
on configuring Zend in this matter. What do I need to do to make Zend listen on the MySQL socket that I want it to listen on? (Which, by the way, is /var/run/mysqld/mysqld.sock) Thank you for any advice. -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] $previous variable ?

2006-07-12 Thread Dave Goodchild
On 12/07/06, Jay Blanchard [EMAIL PROTECTED] wrote: [snip] A bit off topic, but I hadn't heard about short tags being a bad idea. What reasons make short tags worse than the regular tags. Just curious. [/snip] Two words, XML. Yep, they can interfere with xml processing, and they also make

[PHP] combine implode() and array_keys() to get a string of key names

2006-07-07 Thread Dave M G
) At least, that's what it looks like if it's just echoed out. Is there a way I can strip out the relevant column names to be more like this: column1, column2. column3 Thank you for any advice. -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] Filter php page

2006-07-05 Thread Dave Goodchild
On 05/07/06, Jay Blanchard [EMAIL PROTECTED] wrote: [snip] can I create a script that will search a php page for iframes. And have it check the path of the iframe, If the iframe is listed as bad don't show. (list I make) Trying to do something with virus like through an iframe. I don't

[PHP] PHP sessions possibly eating up inodes

2006-07-03 Thread Dave M G
I can: 1. Verify that sessions are in fact the cause of inodes being created? 2. Destroy them? Thank you for any advice. -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] ONE PAGE CONNECTS MANY DATABASE

2006-06-30 Thread Dave Goodchild
On 30/06/06, John Nichel [EMAIL PROTECTED] wrote: BBC wrote: Hi again.. I'm wondering is it possible to make one page which connects to many DataBase? Yes. If you are using mysql, why not create connection functions that sit outside the server root (in the include path) for security

Re: [PHP] Programming question - New to PHP

2006-06-29 Thread Dave Goodchild
On 29/06/06, Chris [EMAIL PROTECTED] wrote: Russbucket wrote: I took an example of a script from the PHP documentation and try to connect to my database. If I leave in the or die part of line 3, I get nothing, if I comment out that part I get the echo message on line 4. ?php //

Re: [PHP] Re: Find out cookies on a computer?

2006-06-29 Thread Dave Goodchild
On 29/06/06, Jay Blanchard [EMAIL PROTECTED] wrote: [snip] But I am loosing hope that it can be done now :) [/snip] I will go ahead and remove all hope. If you do not own the cookie, you cannot see it or use it. It is a rule of this jungle that has been in place for years. Yes, let's put this

Re: [PHP] Equivelant to mysql_fetch_row for normal array

2006-06-23 Thread Dave M G
. foreach($elements as $e){ while(list($key, $value) = each($e)){ echo key = . $key . br /; echo value = . $value . br /; } } But it still doesn't work. It says: Warning: Variable passed to each() is not an array or object in /home/dave/web_sites/thinkingworks.com/web/Article.class

Re: [PHP] templating

2006-06-22 Thread Dave Goodchild
On 22/06/06, Miles Thompson [EMAIL PROTECTED] wrote: At 08:10 AM 6/22/2006, Ryan A wrote:Hi,A pal of mine needed some help on his project, he isusing a header and footer file to template hisproject... but its gotten a bit complicated as he has a few dynamic parts in the header and footer files,

[PHP] Equivelant to mysql_fetch_row for normal array

2006-06-22 Thread Dave M G
for any advice. -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Equivelant to mysql_fetch_row for normal array

2006-06-22 Thread Dave M G
can't go all the way into my code, but $val[type] should be a string value containing the words Article or Text. But instead, I get: val[type] = 2 val[resource] = 2 Am I still not doing the foreach correctly? -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] Simple class declaration returns error [SOLVED]

2006-06-16 Thread Dave M G
this: $data = database::getDB()-getData($arg1, arg2); Thank you for your time and advice. -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Simple class declaration returns error

2006-06-15 Thread Dave M G
PHP List, Okay, I've upgraded to php 5 on my home machine, and I'm still getting some syntax errors. Parse error: syntax error, unexpected T_NEW in /home/dave/web_sites/thinkingworks.com/web/database.class on line 5 This is the code producing the error: class database { public static

Re: [PHP] Simple blog software... Simple but clean code... suggestions?

2006-06-15 Thread Dave Goodchild
On 15/06/06, Micky Hulse [EMAIL PROTECTED] wrote: Hi, I am looking for a very simple blog software... I would prefer something that functions well with CSS and is standards compliant. I am getting tired of setting-up the bigger full-featured blogging packages for small/quick/simple sites. It

Re: [PHP] basic php problem

2006-06-15 Thread Dave Goodchild
On 15/06/06, Ross [EMAIL PROTECTED] wrote: I want to set a page number of a page if(!isset($_REQUEST['page'])) { $page =$_REQUEST['page'] + 1; echo page is .$page; // this echos out page is 1 } The problem is when I try and use $page further down in the body $page is 0 Question ?=$page;

Re: [PHP] Seeking recommendations for use of include()

2006-06-14 Thread Dave M G
explicitly how someone could exploit a dynamic include() function with simple access through forms? And, can that access be exploited even when fairly common restrictions on form data is implemented (such as no tags and such)? -- Dave M G -- PHP General Mailing List (http://www.php.net

[PHP] Simple class declaration returns error

2006-06-14 Thread Dave M G
T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /web/article.class on line 5 Of course I consulted the PHP manual to make sure that I had the class syntax correct, and it seems that I've followed the basic structure as described there. Where have I gone wrong? Thank you for any advice. -- Dave

Re: [PHP] Simple class declaration returns error

2006-06-14 Thread Dave M G
have to consider whether or not to make my code PHP 4 compatible, or upgrade to version 5. -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Seeking recommendations for use of include()

2006-06-14 Thread Dave M G
Jochem, ::index.php ?php include $_GET['page']; ? Wouldn't strip_tags() eliminate the ?php ? tags that make this possible? -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Upgrade to PHP5 on Fedora Core

2006-06-14 Thread Dave M G
? -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Seeking recommendations for use of include()

2006-06-13 Thread Dave M G
the included files, or do most people make a static list that they edit by hand? -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] preg_replace \\1 yIKES!

2006-06-13 Thread Dave Goodchild
On 13/06/06, tedd [EMAIL PROTECTED] wrote: At 11:33 AM -0700 6/13/06, sam wrote: Wow this is hard I can't wait till I get the hang of it. Capitalize the first letter of a word. Why not use ucfirst(), that is what the function is for. --

Re: [PHP] Seeking recommendations for use of include()

2006-06-13 Thread Dave M G
for them to exploit a dynamic include() function, then please let me know. -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Short writage of clauses

2006-06-12 Thread Dave Goodchild
On 12/06/06, Barry [EMAIL PROTECTED] wrote: Hi everyone! Well i do know that you can write IF as ( ? : ) but what i am asking about is something like this: if (a = 1 OR a = 2) is it anyway possible to write it like: if (a = 1 OR 2) I know this is wrong because 2 will always be true ... Any

Re: [PHP] weird problem in php

2006-06-12 Thread Dave Goodchild
On 12/06/06, weetat [EMAIL PROTECTED] wrote: Hi all , I have using php 4.3.2 and mysql database. I have a form which have select tag which have the value for example -New York. When use submit the form , i need to find the first occurence of - , i use strpos function as shown below :

Re: [PHP] php-html rendering

2006-06-12 Thread Dave Goodchild
On 12/06/06, Ryan A [EMAIL PROTECTED] wrote: Hey all, heres the short explanation of what I am supposed to do, I need to render/convert the entire site to normal html pages so that it can be loaded onto a cd and given out. The good news is that the whole site has not yet been built so i can

Re: [PHP] mail() function dying half way through. [SOLVED]

2006-06-11 Thread Dave M G
for taking the time to help. -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Curio

2006-06-10 Thread Dave Goodchild
Just a question out of curiousity for the language lawyers out there. Why is it illegal to begin a variable name with a number in php? -- http://www.web-buddha.co.uk dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml, css) look out for project karma, our new venture, coming

[PHP] mail() function dying half way through.

2006-06-09 Thread Dave M G
, of individual emails before it would die. And I also thought the set_time_limit(0) function would alleviate the problem of timing out. Where have I gone wrong with this? Any advice would be greatly appreciated. Thank you for taking the time to read this. -- Dave M G -- PHP General Mailing List (http

Re: [PHP] parsing out quoted text

2006-06-09 Thread Dave Goodchild
$str='bass electric organ bagpipes'; $parser($str); $query=SELECT * FROM table WHERE tb_instr = bass AND tb_instr = electric organ //quoted phrase AND tb_instr = bagpipes; Anybody know where I can just copy code that will do the above? thanks Why will there be a quoted

Re: [PHP] arrays

2006-06-09 Thread Dave Goodchild
Hola Jesus. Hablo un pocitio espanol, pero en ingles no estoy seguro que quieres decir. Si te ayudara, envia el mensaje otra vez en espanol y tratare comprender. On 09/06/06, Jesús Alain Rodríguez Santos [EMAIL PROTECTED] wrote: if I have two arrays, example: $a = array (one, two, three,

Re: [PHP] Skip first 4 array values

2006-06-09 Thread Dave Goodchild
On 09/06/06, Jonas Rosling [EMAIL PROTECTED] wrote: Is there any way you can skip for example the first 4 array values/posisions in an array no matter how many values it contains? Thanks // Jonas Skip $array[0], $array[1], $array[2], $array[3] if you are talking about integer-indexed arrays.

Re: [PHP] Tables vs. databases

2006-06-09 Thread Dave Goodchild
On 09/06/06, Antonio Bassinger [EMAIL PROTECTED] wrote: Hi gang, Situation: I've a HTTP server. I intend to run a file upload service. There could be up to 1 subscribers. Each saving files up to 10 MB. I made a proof-of-concept service using PHP MySQL, where there is a single database,

Re: [PHP] Running Scripts from the Command Line in Linux

2006-06-08 Thread Dave Goodchild
On 08/06/06, OOzy Pal [EMAIL PROTECTED] wrote: How can I run a .php script from the command in Linux? 1. run /usr/local/bin/php (or wherever the php binary is, run which php to find out) scriptname 2. add the hash bang to the start of the script and run it by typing the scriptname. --

Re: [PHP] order of elements in $_POST super global

2006-06-08 Thread Dave Goodchild
On 08/06/06, Ben Liu [EMAIL PROTECTED] wrote: Hello All, I'm using a form (method=POST) to collect 30 boolean values from the end user using a series of checkboxes in the form. The form is arranged in a table so that the 30 check boxes are not a long list but rather three columns (with related

[PHP] Using variable content to name a class

2006-06-05 Thread Dave M G
= nameFromDatabase; $object = new $className(); Is this possible? I hope I've asked my question clearly. Thank you for any advice. -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Using variable content to name a class

2006-06-05 Thread Dave M G
command I was missing. Well, anyway, I guess I've stumbled on the right syntax. Thank you for pointing it out to me. -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] If value is odd or not

2006-06-02 Thread Dave Goodchild
On 02/06/06, Jonas Rosling [EMAIL PROTECTED] wrote: Hi all, is there any easy why to check if a value is odd or not? Thanks // Jonas Yep, use the modulo operator like so: if ($value % 2 ==0) $odd = false; -- http://www.web-buddha.co.uk dynamic web programming from Reigate, Surrey

Re: [PHP] regex problem

2006-06-01 Thread Dave Goodchild
On 01/06/06, Merlin [EMAIL PROTECTED] wrote: Hi there, I do work on following regex: ^(.*)_a[0-9](.*).htm$ This should be valid for test_a9393.htm, but not for 9393.htm as ther is no leading _a infront of the number. Unfortunatelly this also works for the 9393.htm file. Can somebody give me

Re: [PHP] HTML form

2006-06-01 Thread Dave Goodchild
On 01/06/06, John Meyer [EMAIL PROTECTED] wrote: Martin Marques wrote: Sorry for the OT, but this is PHP output anyway :-) I have a bunch of code to input and modify data through an HTML form. When I modify the options, some are in text, others in textarea, and some are in select options.

Re: [PHP] Executing functions or scripts in parallel

2006-05-30 Thread Dave Goodchild
On 30/05/06, Phil Martin [EMAIL PROTECTED] wrote: Hi everyone, I've made a very basic and small function to suit my needs in monitoring some hosts services. I've noticed that the script is a little bit slow because of the number of hosts and services to monitor. Is there a way to execute

Re: [PHP] problems with regex

2006-05-27 Thread Dave Goodchild
On 27/05/06, Merlin [EMAIL PROTECTED] wrote: Hi there, I am somehow lost when it comes to regex. I am trying to remove ! and ? characters from a string. Could somebody please help me to get a working regex running for that? I tried: $str = preg_replace('/\!\?\./', ' ', $str); How about

Re: [PHP] Why does this preg_replace function not work?

2006-05-27 Thread Dave M G
Robin, Dan, Rabin, Thank you all for your advice. You've helped me understand regular expressions a little better, and cleared some some confusion about arrays. I'll be adapting all the code you provided for me needs. Thank you for taking the time to help. -- Dave M G -- PHP General

[PHP] Why does this preg_replace function not work?

2006-05-26 Thread Dave M G
online manual. I also tried str_replace(), but predictably that did not help. As far as I understand it, it does not accept arrays. What am I doing wrong in the above code? And can the two preg_replace() commands be achieved in one line? Thank you for any advice. -- Dave M G -- PHP General

[PHP] str_replace(), and correctly positioned HTML tags

2006-05-25 Thread Dave M G
to separate those out and then be able to place opening and closing p tags at the right place before and after paragraphs. Is there a way to do this? Is there a good tutorial available? Any advice appreciated. Thank you for taking the time to read this. -- Dave M G -- PHP General Mailing List

Re: [PHP] Escaping double quotes

2006-05-25 Thread Dave Goodchild
On 25/05/06, Pavleck, Jeremy D. [EMAIL PROTECTED] wrote: So I'm writing this page (PHP Newbie here) and it checks to see if a var is set, if it isn't it spits out the form info like so: echo form action=myform.php method=post; Now is there a way to 'wrap' that so I don't have to escape quotes?

Re: [PHP] str_replace(), and correctly positioned HTML tags

2006-05-25 Thread Dave M G
tags. -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] date iteration

2006-05-23 Thread Dave Goodchild
Hi all, I am writing an app that runs a prize draw, wherein the admin chooses the duration by adding a start date and number of days for the draw to run. These values are passed into a small function that generates an array holding the start date, end date and all dates in between as follows:

Re: [PHP] Group date with category

2006-05-22 Thread Dave Goodchild
On 22/05/06, Jonas Rosling [EMAIL PROTECTED] wrote: Anyone know any good why to group date in a recordset in any good way? As if you categorize it in columns. Like: Category 1 Row1 - DataData Row2 - DataData Row3 - DataData Category 2 Row1 - Data

[PHP] Getting the right path output from $_SERVER

2006-05-21 Thread Dave M G
including the file name? Thank you for any advice. -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP JavaScript

2006-05-19 Thread Dave Goodchild
Could you not use an id for the object as well as a name?

Re: [PHP] PHP JavaScript

2006-05-19 Thread Dave Goodchild
I think it's a case of using id for javascript, not for css... -- http://www.web-buddha.co.uk dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml, css) look out for project karma, our new venture, coming soon!

Re: [PHP] PHP and mySQL getting smashed...

2006-05-17 Thread Dave Goodchild
I have a site that is getting 30K+ traffic daily and it is smashing mySQL - any ideas on what to do to make the mysql connections more efficient, or anything in general. No bandwidth issue here, just the server getting killed. ...I may be wrong but using persistent connections (mysql_pconnect)

Re: [PHP] remove html tags in text?

2006-05-11 Thread Dave Goodchild
strip_tags On 11/05/06, Bing Du [EMAIL PROTECTED] wrote: Hello everyone, Say, if I have a paragraph like this: == h1John Smith/h1 Dr. Smith is the directory of a href=http://some.center.com;Some Center/a . His research interests include bWireless Security/b == Any functions that can

Re: [PHP] PHP URL query

2006-05-10 Thread Dave Goodchild
register_globals is disabled on your system, which is a good thing. So you have to reference all values sent via a form using GET with the $_GET superglobal array as follows: Welcome to our web site, {$_GET[var]} or 'Welcome to our web site, ' . $_GET['var'] etc etc On 10/05/06, IraqiGeek

Re: [PHP] heredoc question

2006-05-05 Thread Dave Goodchild
Or just use str_replace On 05/05/06, John Nichel [EMAIL PROTECTED] wrote: Al wrote: How can I include place holders for variables in a heredoc such that after the heredoc is declared, I can assign the variables? I have a config file with a heredoc string declared. I'd like to keep the

Re: [PHP] XSLT issue

2006-05-04 Thread Dave Goodchild
= array_slice($tournaments, 0, 3); //maybe 4 $xml = implode(/tournament, $tournaments); $xml .= \n/xmlfeed; Crude, but effective Captain -- Spock On Wed, May 3, 2006 5:40 am, Dave Goodchild wrote: Hi all, maybe slightly off list but I AM using php and Sablotron to generate xslt. I have a live

Re: [PHP] Echo a value from an arrays position

2006-05-04 Thread Dave Goodchild
This may clarify - in php, integer and associate arrays are created arbitrarily, ie keys can be numbers or strings. So, either create an array like this: array('1' = 'first element', '2' = 'second element'); and call by the key! On 04/05/06, Jonas Rosling [EMAIL PROTECTED] wrote: Is

Re: [PHP] Quotation marks considered harmful

2006-05-04 Thread Dave Goodchild
You can: ul ?php for ($i=0;$i=10;$i++) { ? lilist item ?= $i; /li ?php } ? /ul for example On 04/05/06, John Hicks [EMAIL PROTECTED] wrote: John Wells wrote: Personally, I get tired (and confused) when having to escape all of those quotes like in the string you're trying to echo above.

Re: [PHP] Quotation marks considered harmful

2006-05-04 Thread Dave Goodchild
Surely you can't then interpolate the variables? On 04/05/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: You can simplify usi single instead double quotes: echo ' td width=25% align=center a href=javascript:open_window(\'$php_self?action=view_recorduserid=$userid\'); view/a a

[PHP] XSLT issue

2006-05-03 Thread Dave Goodchild
Hi all, maybe slightly off list but I AM using php and Sablotron to generate xslt. I have a live poker games feed that takes the following format: ?xml version=1.0 encoding=utf-8?xmlfeed tournament tid10035522/tid nameTexas Holdem/name gameTexas Holdem Poker/game buyin5/buyin

Re: [PHP] XSLT issue

2006-05-03 Thread Dave Goodchild
Thanks for our help. Tried both methods and I get this: *Warning*: Sablotron error on line 31: XML parser error 4: not well-formed (invalid token) in */home/stevemas/public_html/dg/xslt/xslt_processor.php*on line *14* On 03/05/06, T.Lensselink [EMAIL PROTECTED] wrote: Hi all, maybe slightly

Re: [PHP] XSLT issue

2006-05-03 Thread Dave Goodchild
=players //td/tr tr class=oddthDate / Time/thtdxsl:value-of select=starttime //td/tr /table hr / /xsl:if /xsl:for-each /xsl:template On 03/05/06, Dave Goodchild [EMAIL PROTECTED] wrote: Thanks for our help. Tried both

Re: [PHP] XSLT issue

2006-05-03 Thread Dave Goodchild
-each /xsl:template On 03/05/06, Dave Goodchild [EMAIL PROTECTED] wrote: Thanks for our help. Tried both methods and I get this: *Warning*: Sablotron error on line 31: XML parser error 4: not well-formed (invalid token) in */home/stevemas/public_html/dg/xslt/xslt_processor.php*on line *14

Re: [PHP] Polymorphism [was] [Fwd: Re: [PHP] Parents constructor]

2006-05-03 Thread Dave Goodchild
That is not polymorphism - that is multiple inheritance. Java can't do that either, and uses a much cleaner method - interfaces. And interfaces are supported in php5. So php does allow it. Not polymorphism - multiple inheritance. Not multiple inheritance - interfaces. On 03/05/06, Jochem Maas

Re: [PHP] Polymorphism [was] [Fwd: Re: [PHP] Parents constructor]

2006-05-03 Thread Dave Goodchild
Not multiple inheritance. Inheritance. Not multiple orgasm. Intercourse. On 03/05/06, Jochem Maas [EMAIL PROTECTED] wrote: Dave Goodchild wrote: That is not polymorphism - that is multiple inheritance. Java can't do well that clears up my misuse of the terminology! that either, and uses

Re: [PHP] array insights

2006-05-03 Thread Dave Goodchild
use: $new_array = array_chunk($input_array, 3)); this will split your original array into a number of arrays with three elements in each and trash the original keys. If you want to preserve the keys pass a third paramater (true). Hope this helps. On 03/05/06, Jason Gerfen [EMAIL PROTECTED]

Re: [PHP] Re: php mysql problem

2006-05-02 Thread Dave Goodchild
Exactly - I don't think you really understand how a relational database works. The ids are retained as they may relate to records in another table. Internal sorting order is of no relevance at the application level. I think you need to rethink your design a little. On 02/05/06, T.Lensselink

[PHP] Question regarding apc

2006-05-02 Thread Dave Goodchild
Hi all. I have heard that functions like apc_define_constants and apc_load-constants are useful in speeding up mass definition of constants but could someone tell me how many constants you would have to have before this became appropriate. I am writing an app that loads a number of constants into

Re: [PHP] Syntax Oddity

2006-05-02 Thread Dave Goodchild
Hmmm. The only time I ever use anything remotely like that is in a loop or other code are where I don't want anything to happen ie for ($foo=0;$foo=10;$foo++) { On 02/05/06, Martin Alterisio [EMAIL PROTECTED] wrote: 2006/5/2, Richard Lynch [EMAIL PROTECTED]: Does anybody have a rational

Re: [PHP] Filesystem or database

2006-05-01 Thread Dave Goodchild
Also, try using mysql_pconnect rather than mysql_connect to set up a persistent database connection. On 01/05/06, Wolf [EMAIL PROTECTED] wrote: Personally I would do the DB option and timestamp that sucker as well. I use it to set/copy :IP, user, SessionID, timestamp. I found it simpler and

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