Re: [PHP] Uninitialized string offset: 0

2007-01-06 Thread Dave Goodchild
Can you show us what you're calling it with? Al Padley -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- http://www.web-buddha.co.uk

Re: [PHP] newbie question regarding URL parameters

2007-01-09 Thread Dave Goodchild
Wow, there are some really bitchy, unattractive people here. No wonder some people bail out of IT. Don't confuse knowledge for wisdom. On 1/9/07, tedd <[EMAIL PROTECTED]> wrote: At 9:17 PM -0500 1/5/07, <[EMAIL PROTECTED]> wrote: >You'll probably get 50 answers to this, but here's probably what

Re: [PHP] newbie question regarding URL parameters

2007-01-09 Thread Dave Goodchild
Read the reponses.

Re: [PHP] Please Help with simple Noob problem

2007-01-11 Thread Dave Goodchild
Why not check php.ini to see whether display_errors is set to off and switch it on until you are back in business? Check the httpd.conf file to make sure Apache is parsing .php files correctly.

Re: [PHP] no database selected

2007-01-23 Thread Dave Goodchild
mysql_select_db

[PHP] Encoding issue with £

2007-01-23 Thread Dave Goodchild
This may be more of a mysql issue, but I am using php for my app so here goes... I have a fee field in the database, and when users post events they can specify entrance fee in £. In some, not all, of the fields I am getting, for example, £7 rather than £. Is this an encoding issue? Many thanks

Re: [PHP] Encoding issue with ?

2007-01-24 Thread Dave Goodchild
Thanks guys. The issue is that users can specify text as well as currency in the input field ie '£2 students / £5 general admission'.

[PHP] Ongoing encoding issues

2007-01-26 Thread Dave Goodchild
Hi all, I posted a question a couple of days ago regarding a web app I have wherein users are able to indicated prices and concessions via a text field, and the resulting encoding issues I have experienced, the main one being seeing the pound sign as £ if viewing the results in a browser with the

Re: [PHP] php code to upload a url correctly

2007-01-26 Thread Dave Goodchild
This is what I use: $site = (!preg_match('#^http://#', $_POST['c_site'])) ? raw_param(trim(strip_tags("http:\/\/" . $_POST['c_site']))) : raw_param(trim(strip_tags($_POST['c_site']))); don't worry about raw_param, that's a function of my own, but you get the idea.

[PHP] Sorting a multidimensional array

2007-02-08 Thread Dave Goodchild
Hi all. I am building an online events directory and as part of the system users can search for events by date, category etc. The logic involved in finding events that match the user-entered dates works like so: 1. we create a range of dates from the start and end dates specified by the user 2.

Re: [PHP] Sorting a multidimensional array

2007-02-08 Thread Dave Goodchild
Thanks for that - can't do that as all I know in the database is the start and end date for each event (so I don't have to create mapping tables and perform massive joins), the rest is handle dynamically. I think I can do it using usort, this seems to work, any comments? function compare($x, $y)

[PHP] Problems processing UNIX timestamps in events directory

2007-02-20 Thread Dave Goodchild
Hi all. I have an odd problem. I am building an events directory and when users search, they provide a date range ie Feb 16 2007 to March 12 2007 as one of the options for searching. The system then creates an array of timestamps from this and then polls the database for all events whose lifetime

Re: [PHP] Problems processing UNIX timestamps in events directory

2007-02-20 Thread Dave Goodchild
I AM using the logic you and Jochem suggest in the query, I am not performing any joins. I query for certain criteria re the start and end dates held in the database, and once I have my set I then work with it dynamically as I need to know, based on the event frequency, how many events from that r

Re: [PHP] Problems processing UNIX timestamps in events directory

2007-02-21 Thread Dave Goodchild
Thanks all for your input - you're all correct, I don't really need to use timestamps as I am only interested in dates so will be reworking the app to use dates only. I still need to generate sequences of dates and really don't want to deal with DST, so my question is: can I add days to dates with

Re: [PHP]Transform a block of code in PHP

2007-02-23 Thread Dave Goodchild
I assume you mean you want to hold that html in a variable? Use a heredoc.

Re: [PHP] Option Value

2007-02-23 Thread Dave Goodchild
Also, if you want to get into the habit of writing valid xhtml, use lowercase and selected="selected"

[PHP] IE6 session issues

2007-02-24 Thread Dave Goodchild
Hi all. I am running an online charity lottery and am having issues with IE6 and sessions. To fix them, I added the following at the top of each file: ini_set('session.name', 'tlc'); header("Cache-control: private"); session_start(); ...ran a local test in IE6 worked fine, then noticed more bla

Re: [PHP] Check if link is on a page

2007-02-24 Thread Dave Goodchild
$web = fopen('http://google.com/index.php', 'r'); $contents = file_get_contents($web); if (preg_match('/$link/', $contents))... you got it simplified and no error checking but you get the idea.

Re: [PHP] GET doesn't work as POST

2007-02-24 Thread Dave Goodchild
On 2/24/07, Otto Wyss <[EMAIL PROTECTED]> wrote: With method="post" just $kind works fine (register_global) yet I've also tried any combination of $_GET['kind'] and $_POST['kind']. With method="get" it doesn't work. O. Wyss Peter Lauri wrote: > How are you fetching the GET and POST? With $_GET

Re: [PHP] GET doesn't work as POST

2007-02-24 Thread Dave Goodchild
On 2/24/07, Dotan Cohen <[EMAIL PROTECTED]> wrote: Also, if you're using the variable in a print string, then you'll need to exit the string, like so: $print "Hello, $kind!"; would become: $print "Hello, ".$_GET["kind"]."!"; Dotan Cohen http://easyanswers.info http://nirot.com -- PHP General

Re: [PHP] Re: how to display images stored in DB

2007-02-25 Thread Dave Goodchild
On 2/25/07, zerof <[EMAIL PROTECTED]> wrote: Alain Roger escreveu: > Hi, > > i stored all my pictures in my PostgreSQL DB as bytea type. > Now i would like to know how can i display them in my PHP pages ? > > where can i find some example ? > > thanks a lot, > -- It is not a good

Re: [PHP] Populating array with function

2007-02-27 Thread Dave Goodchild
You have a typo in your code...

Re: [PHP] IE6 session issues

2007-02-28 Thread Dave Goodchild
OK. Blank entries means that as date is passed in and validated via forms, it is then entered into $_SESSION so data can be persistent as the user goes back and forth. These values are eventually entered into the database and are blank, whereas the few values that are entered from $_POST (ie credi

Re: [PHP] echo text - anti-spam-spider measure

2007-02-28 Thread Dave Goodchild
On 2/28/07, tedd <[EMAIL PROTECTED]> wrote: At 11:22 PM -0500 2/27/07, John Taylor-Johnston wrote: >I need an anti-spam-spider measure for my site. Too many addresses >are getting raked. In once instance, I created a flash page: >http://erasethis.glquebec.org/English/contact.htm >But I just don'

Re: [PHP] Intro to PHP question

2007-03-08 Thread Dave Goodchild
Of course it's possible to output raw html in a php file, that's one of it's fundamental uses! In fact, it's more efficient to switch the php parser off and send raw html as the php parser doesn't need to get involved.

Re: [PHP] Intro to PHP question

2007-03-08 Thread Dave Goodchild
If you are running that from the command line, why do you need html? Not sure why you're doing that.

Re: [PHP] Intro to PHP question

2007-03-08 Thread Dave Goodchild
Why not learn in a web environment if your goal is to build a website? Just create the following file: save it, upload it and view it. If you see the php details you have the system set up as you need it and can just start writing php-driven web pages (the file you are using now is one!). If y

[PHP] Variable variables and references

2007-03-10 Thread Dave Goodchild
Hi guys, I have just read 'Programming PHP' (O'Reilly) and although I think it's a great book, I am confused about variable variables and references - not the mechanics, just where you would use them. The subject of variable variables is explained but no examples are given as to why and where you

Re: [PHP] Redirecting in a PHP script

2007-03-13 Thread Dave Goodchild
If you do want to use the header function after html has been output, you can always look at using output buffering (ob_start()).

Re: [PHP] Capitalizing the first letter

2007-03-13 Thread Dave Goodchild
ucwords(strtolower($string)) or ucfirst(strtolower($string)) On 3/13/07, Todd Cary <[EMAIL PROTECTED]> wrote: I would like to write a filter that takes the text "smith" or "SMith" and returns "Smith"; same for "ralph smith". Is the a good source on using filters this way? Thank you... -- P

Re: [PHP] Re: [PHP-WIN] Re: [PHP] Re: Question on virus/worms

2007-03-15 Thread Dave Goodchild
Turn off register_globals - if you pollute your scripts with global variables like that you are asking for trouble. If you can't make sure you clean the variable. Using include("$page.php") is asking for trouble. If you can get register_globals switched off (it's off by default in PHP5 for this

Re: [PHP] image digit to check password

2007-03-20 Thread Dave Goodchild
Have a look at this: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] image digit to check password

2007-03-21 Thread Dave Goodchild
Om On 3/20/07, Jochem Maas <[EMAIL PROTECTED]> wrote: Tijnema ! wrote: > On 3/20/07, Dave Goodchild <[EMAIL PROTECTED]> wrote: >> Have a look at this: > > Have a look at nothing :) I believe this Dave's way of pointing people to the Great Void :-) >>

Re: [PHP] POST + QUERY

2007-03-27 Thread Dave Goodchild
use: $_POST['max_id'] == or even better: if (empty($_POST['max_id']))

Re: [PHP] POST + QUERY

2007-03-27 Thread Dave Goodchild
Because isset will return true if the variable is set, even if it is blank. Empty will return true is the variable holds an empty string.

Re: [PHP] What is wrong with this INSERT?

2007-03-29 Thread Dave Goodchild
Because of this: $sql = mysql_query("INSERT INTO tbl (WHEN, WHAT, WHO) VALUES ('$WHEN','$WHAT','$WHO')"); $result = mysql_query($sql) or die("Fatal Error :".mysql_error()); ...you are running the query and assigning the results into $sql and then running mysql_query again in the line below. S

[PHP] Duplicate dates in array

2007-04-02 Thread Dave Goodchild
Hi all, I have an array containing a sequence of dates in the following format, for example: Mon 26 Nov 2007 Mon 24 Dec 2007 Mon 31 Dec 2007 Mon 28 Jan 2007 ...and I want to remove any the first element in cases where the Mondays fall in the same month, so in this case I want to be left with: M

Re: [PHP] Duplicate dates in array

2007-04-02 Thread Dave Goodchild
Amazing, just what I needed - many thanks. Have been coding non-stop for 10 days and things are getting foggy. Grats for your informed and quick response and have a fantastic day!

Re: [PHP] Question about form submitting

2007-04-03 Thread Dave Goodchild
Not true. You can submit the form back to itself as many times as required by making the form action $_SERVER['PHP_SELF'] and checking for various sequences and outputting different html in each case.

Re: [PHP] which CMS are you using and why?

2007-04-08 Thread Dave Goodchild
I have just upgraded to Drupal 5 and so far am very impressed - D5 comes bundled with the jquery library and I have found drupal to be very powerful with a wide and supportive community.

Re: [PHP] header('Location:') works locally but not remotely

2007-04-16 Thread Dave Goodchild
Provide some code...?

Re: [PHP] redirect with header still not working

2007-04-17 Thread Dave Goodchild
Can you re-iterate what is happening - I have a site with 1and1 and use header() with no issues.

Re: [PHP] redirect with header still not working

2007-04-17 Thread Dave Goodchild
That is, unless you use output buffering. It may not be the most elegant solution (using header() to redirect users increases server calls), but I built a template-driven php site that calls: ...depending on certain conditions which means I can then use header() even after I have started output

Re: [PHP] Re: CSS vs. Tables OT

2007-04-18 Thread Dave Goodchild
Tables used for presentational layout are a hack, implemented in an albiet ingenious way to overcome the shortcomings of the Web quite a while ago now. Tables should be used for the display of tabular data, ie spreadsheets, calendars etc. Table layout increases download times, the deeper nested

Re: [PHP] CSS vs. Tables OT

2007-04-19 Thread Dave Goodchild
Can we kill this now please? It's not a php issue, is an old and endless argument and is better addressed on a css / design list.

Re: [PHP] Looking for a framework

2007-10-23 Thread Dave Goodchild
You mean a javscript library? If so, check out jquery and moo.fx. On 10/23/07, Merlin <[EMAIL PROTECTED]> wrote: > > Hi there, > > I am looking for a framework to integrate some AJAX Functionality into > my PHP4 MySQL Apache webapp. First thing I would like to do, is an edit > function that opens

Re: [PHP] moving over to php 5

2007-10-29 Thread Dave Goodchild
Support for php4 will be dropped at the end of the year so hosts will be forced to make the upgrade at some point. On 10/29/07, Hulf <[EMAIL PROTECTED]> wrote: > > Hi, > > > It is about time I made the jump to 5, however the only thing that is > holding me back is the problem with hosts. How many

Re: [PHP] Need a hint how to track an error

2007-11-12 Thread Dave Goodchild
Start by coding proper semantic xhtml and you will have less headaches too - that code looks very ugly. On Nov 12, 2007 8:38 AM, Ronald Wiplinger <[EMAIL PROTECTED]> wrote: > Chris wrote: > > Ronald Wiplinger wrote: > >> My php program is working with Firefox, but not with Internet Explorer. > > >

Re: [PHP] tell me :which book is good for newman??

2007-11-17 Thread Dave Goodchild
Start with Programming PHP and then get Upgrading To PHP5 (both by O'Reilly) On Nov 17, 2007 2:31 PM, David Giragosian <[EMAIL PROTECTED]> wrote: > On 11/17/07, joychen <[EMAIL PROTECTED]> wrote: > > > > tell me :which book is good for newman?? > > > You mean paul? > -- PHP General Mailing List

[PHP] Convertig xml into array

2007-11-27 Thread Dave Goodchild
Hi guys. I have the following XML file which I want to convert into a multidimensional array. I am using PHP5 so don't want to use SimpleXML as apparently there are issues with sessions and after conversion I want to pass this array into the session. Any ideas on the best and cleanest way to do thi

Re: [PHP] Select Box CSS OT

2007-12-18 Thread Dave Goodchild
Why not try a css list? css-discuss for example? On Dec 18, 2007 8:06 PM, Børge Holen <[EMAIL PROTECTED]> wrote: > On Tuesday 18 December 2007 20:03:53 Stut wrote: > > VamVan wrote: > > > Please apologize for sending this question to PHP forums. > > > > If you know this already why ask the questi

Re: [PHP] best way for PHP page

2008-01-02 Thread Dave Goodchild
If MVC is too heavy for you it may also be worth exploring templating engines such as Smarty: http://www.smarty.net/ On Jan 2, 2008 4:10 PM, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > On Jan 2, 2008 2:17 AM, Alain Roger <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > i would like to improve my codi

Re: [PHP] First stupid post of the year.

2008-01-02 Thread Dave Goodchild
don't use nonbreaking spaces use CSS to style the input button then you wont have to deal with redundant presentational gunk in your data On 1/2/08, David Giragosian <[EMAIL PROTECTED]> wrote: > On 1/2/08, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > > > > On Jan 2, 2008 1:34 PM, tedd <[EMAIL PROTECT

Re: [PHP] http_request

2008-01-05 Thread Dave Goodchild
Also, supply an absolute URL when using header redirects. On Jan 5, 2008 3:44 PM, Daniel Brown <[EMAIL PROTECTED]> wrote: > On Jan 5, 2008 9:06 AM, peeyush gulati <[EMAIL PROTECTED]> wrote: > > Greetings on New Year :) > >To you, as well! > > > We have a script, say layer.php, which uses HTTP

Re: [PHP] http_request

2008-01-05 Thread Dave Goodchild
It's advisable as the page you will be redirected to will be relative to the one the browser actually requested, so it's a good habit to get into. On Jan 5, 2008 4:05 PM, Daniel Brown <[EMAIL PROTECTED]> wrote: > On Jan 5, 2008 10:59 AM, Dave Goodchild <[EMAIL PROTECTED]>

Re: [PHP] More frustration with MySQL and PHP

2008-01-21 Thread Dave Goodchild
Don't be scared of functions, no magic or mystery there, all you are doing is putting your code in a function like so: function add($a, $b) { return $a + $b; } ..for example and calling it like so: $a = 12; $b = 100; $sum = add(12, 13); ...etc etc, not too much more to learn than that and now I

Re: [PHP] Question about functions

2008-01-24 Thread Dave Goodchild
Methink you're a little confused. A function is a piece of code that performs a specific job that can be called. You may send it data, you may not. It may return data, it may not. If your link goes to logout.php, that script may use functions to do it's job. You can't call a function in a link as p

Re: [PHP] Question about functions

2008-01-24 Thread Dave Goodchild
Said it was a crude example and I was pushed for time On Jan 24, 2008 8:13 PM, Eric Butera <[EMAIL PROTECTED]> wrote: > On Jan 24, 2008 3:08 PM, Dave Goodchild <[EMAIL PROTECTED]> wrote: > > header("Location: index.php"); > > Redirect uri's should be absolute. >

Re: [PHP] Re: Why use session_register()?

2008-03-10 Thread Dave Goodchild
session_register is old school. RTFM. On Mon, Mar 10, 2008 at 4:26 PM, Al <[EMAIL PROTECTED]> wrote: > Read the current php manual. > > Lamonte H wrote: > > Is it necessary to use session_register()? What exactly was the point > of > > this function if you can set sessions using $_SESSION it sel

Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Dave Goodchild
Will you two pricks cut it out. How fucking tedious. On Wed, Mar 12, 2008 at 9:34 PM, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Wed, 2008-03-12 at 22:26 +0100, Aschwin Wesselius wrote: > > Robert Cummings wrote: > > > On Wed, 2008-03-12 at 16:11 -0500, Greg Donald wrote: > > > > > >> On 3

Re: [PHP] PHP and #if

2008-03-14 Thread Dave Goodchild
in php you have a number of constructs that can be used to execute code (or not) based on certain conditions ie is_defined(). Not sure if the comparison with C holds true as C is compiled and PHP is interpreted. On Fri, Mar 14, 2008 at 6:34 PM, Eric Gorr <[EMAIL PROTECTED]> wrote: > If you are ta

Re: [PHP] Re: fwrite/fclose troubles

2008-03-21 Thread Dave Goodchild
Why are you writing a logging class? Why not use error_log and enable error logging? On Fri, Mar 21, 2008 at 1:11 PM, Al <[EMAIL PROTECTED]> wrote: > int file_put_contents ( string $filename, mixed $data [, int $flags [, > resource $context]] ) > > This function is identical to calling fopen(), f

Re: [PHP] ${}

2007-04-25 Thread Dave Goodchild
You can also use that in interpolations where the variable name may be ambiguous ie "My name is Stephen and I am a {$type}drone" ..or to interpolate array lookups: "This is {$desc['mood']} don't you know!"

Re: [PHP] Re: everything printed suddenly has blue text, as if were a link

2007-04-26 Thread Dave Goodchild
View the source, you have this: which is not closed, therefore everything after it will be blue.

[PHP] IE and cookie issues in PHP app

2007-04-26 Thread Dave Goodchild
Hi all. I have built an online events directory in php ( http://dontjustsitthere.co.uk) where people can find local events and also post their events. The app is composed of a single page, index.php, that generates different content depending on the parameters passed to it and uses sessions for pe

Re: [PHP] Why does this encoding work in PHP?

2007-05-04 Thread Dave Goodchild
The characters are encoded in octal and the php interpreter converts them into the corresponding ASCII characters and then the sequence is represented as a string which is included?

Re: [PHP] GET variable unexpectedly assigned to session variable

2007-05-10 Thread Dave Goodchild
Another small and unrelated point - you don't need to use double quotes inside the array brackets - you're not processing them at all.

Re: [PHP] Do you use any framework in your applications?

2007-05-12 Thread Dave Goodchild
It's a personal thing. I use Code Igniter (codeigniter.com), which is fast, lightweight, has a great community and excellent documentation, as well as some very good video tutorials. It pales in comparison with Ruby On Rails, of course, but that's another thread on another list...

Re: [PHP] problem with string & floats in PH

2007-05-15 Thread Dave Goodchild
What function(s) are you using to read the file contents? How are you inserting them into the array? Code examples please...

Re: [PHP] Re: Tipos about which CMS use

2007-05-29 Thread Dave Goodchild
You could also try Drupal. Drupal 5 comes bundled with jQuery. Drupal is powerful and flexible and the community is large and supportive.

Re: [PHP] Return or not to return, that is the question

2007-05-30 Thread Dave Goodchild
If there is no need to return a value then I don't do so. However, the function is going to process something, and surely you should check that the processing has succeeded or failed?

Re: [PHP] Attempting to search a MySQL database from PHP not working

2007-05-31 Thread Dave Goodchild
Your problem is this: $result_row[] = mysql_query($query) or die(mysql_error()); ...you are assigning a query to a variable. What you need to do is something like this: $result = mysql_query($query) or die(mysql_error()); while ($result_row = mysql_fetch_array($result)) { . }

Re: [PHP] Re: directories - again

2007-06-07 Thread Dave Goodchild
umask

Re: [PHP] file permissions

2007-06-09 Thread Dave Goodchild
Why not use umask?

Re: [PHP] Re: any security problems with this?

2007-06-12 Thread Dave Goodchild
Unless some server config error causes that stuff to be output on the page? I tend to put such functions in a .inc file and amend the .htaccess to prevent download.

Re: [PHP] Re: any security problems with this?

2007-06-12 Thread Dave Goodchild
Sure, I usually put these files outside the docroot - unless I am in some f**ked-up hosting environment that doesn't let me change the include path...

Re: [PHP] Re: Form Data Filtering

2007-06-15 Thread Dave Goodchild
I use something like this: $_SESSION['profane'] = false; foreach ($_POST as $value) { foreach ($swearbox as $profanity) { if (preg_match("/$profanity/i", $value)) { $errors = true; $_SESSION['profane'] = true; mail(TECHEMAIL, 'profane content

Re: [PHP] Re: Form Data Filtering

2007-06-15 Thread Dave Goodchild
No, because extra processing is done on the other side - now fuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuck

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. > > // Connec

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 thi

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 secur

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 real

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 y

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 shop

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 get

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 betwee

[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 trade

[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 pie

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 +. -- http://www.web

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 " of a "" tag. > Is there any reason why either ere

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 fo

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] preg_match

2006-08-09 Thread Dave Goodchild
On 09/08/06, Peter Lauri <[EMAIL PROTECTED]> wrote: Hi, How do I add so that it checks for a comma , in this preg_match. I think the documentation is not that good for the pref_match: preg_match('/^[a-z0-9-_\'() +]*$/i', $s); Check for a comma inside a range - use a comma! -- h

Re: [PHP] preg_match

2006-08-10 Thread Dave Goodchild
On 10/08/06, Peter Lauri <[EMAIL PROTECTED]> wrote: Hi there, You are correct that I am stupid to call the manual bad, it was not meant like that. It was that it was not suited to me, and that I actually just wanted to find a solution to my problem directly, and it did not give me that. I have

Re: [PHP] Parsing RSS

2006-08-12 Thread Dave Goodchild
On 12/08/06, John Taylor-Johnston < [EMAIL PROTECTED]> wrote: Is there something already created to open an rss file, parse it, and include() the useful stuff into an html file? Not all my students have an rss reader. http://jtjohnston.ca/jtjohnston.rss Yep. The PEAR XML_RSS class. for

[PHP] Include and require

2006-08-14 Thread Dave Goodchild
Hi all - I have several require_once statements in my web app to load in small function libraries. A common one bundles a variety of functions to handle date math and map month numbers to month names. I originally defined an array in that file plus a bunch of functions but when I loaded the page,

Re: [PHP] Creating custom superglobals

2006-08-14 Thread Dave Goodchild
On 15/08/06, Richard Lynch <[EMAIL PROTECTED]> wrote: On Mon, August 14, 2006 8:40 am, Ville Mattila wrote: > Does the PHP environment (5.1.4) provide a way to define some custom > variables as a superglobal? It would be useful for saving certain site > preferences and settings that must be refe

Re: [PHP] login script

2006-08-15 Thread Dave Goodchild
On 15/08/06, Ross <[EMAIL PROTECTED]> wrote: Hello, I have a couple of questions first how do I check two tables is it? $sql = "SELECT * FROM mytable, mytable2 WHERE username = '$username' AND userpass = '$userpass'"; Secondly my table just sends and returns straight values from the db but

Re: [PHP] Espanol en esto lista

2006-08-16 Thread Dave Goodchild
Hablo espanol, pero lo que Rory dice es verdad, hay otra lista en espanol. Pero, si quieres, you tratare entender tu palabra. In short, speaking a language other than English on this list( especially considering that there is a php.general.es - http://news.php.net/php.general.es ), is similar t

Re: [PHP] Espanol en esto lista

2006-08-16 Thread Dave Goodchild
I don't speak enough Spanish to understand it all, but tratare according to altavista is "to treat" - not really sure I get it. Sorry, should be 'yo tratare', tratar also means to try - I will try and understand... -- http://www.web-buddha.co.uk http://www.projectkarma.co.uk

  1   2   3   >