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.

[PHP] import dbf files

2007-05-11 Thread Bosky, Dave
My goal is to be able to import dbf files into MySQL on a nightly basis. Can I enable dbase support by uncomment the dbase extension entry in the php.ini file or is there more to it? Are there any working examples available that read and import dbf files? Thanks, Dave

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

[PHP] reading Paradox (.db) files

2007-05-17 Thread Bosky, Dave
Has anyone had any experience opening and reading Paradox (.db) files using PHP? Are there any plug-ins/extensions available that someone can recommend? Thanks, Dave ** HTC Disclaimer: The information contained in this

[PHP] convert numerical day of week

2007-05-22 Thread Bosky, Dave
How can I convert the numerical day of week to the string version? Example, if the day of the week is 1 I would like to print out 'Sunday'. Thanks, Dave ** HTC Disclaimer: The information contained in this m

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?

[PHP] scheduling a script to check a directory for files

2007-05-30 Thread Bosky, Dave
Greetings! I need to write a script to import '.csv' data files into MySQL. My question is how can I have a script execute and check a directory every 4 hours for any '.csv' files and if it finds any calls a function to import the

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

[PHP] logging of sql queries - success/failed

2007-06-07 Thread Bosky, Dave
I've got a script that imports several CSV files via the Load Data File command. I need to know if each import query was successful or failed. Is there a way to log the success/failure of each query including how many rows were inserted? Thanks,

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

[PHP] php script from bat file

2007-06-12 Thread Bosky, Dave
ry and contains a single line 'php.exe C:\Inetpub\scripts\run.php'. It seems to run ok but nothing happens. Any ideas? Thanks, Dave ** HTC Disclaimer: The information contained in this message may be privileged and

[PHP] does this code look like it would check a file extensions, and disallow php files or exe files to be attached

2007-06-14 Thread dave peaachepea
storeFile(); } ?> I'm not a programmer, and I'm very new at php so im sure there are errors and stupid logic in my code. It would be greatly appreciated if anyone here could critique and rip apart my code. thank you, -dave

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

[PHP] Help needed with Curl

2007-07-24 Thread Bosky, Dave
s for Curl to work? What the heck am I missing? Thanks, Dave ** HTC Disclaimer: The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not th

RE: [PHP] Help needed with Curl

2007-07-24 Thread Bosky, Dave
om: Daniel Brown [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 24, 2007 9:01 AM To: Bosky, Dave Cc: php-general@lists.php.net Subject: Re: [PHP] Help needed with Curl On 7/24/07, Bosky, Dave <[EMAIL PROTECTED]> wrote: > > I downloaded a copy of PHP Version 5.2.3 and installed

RE: Re[2]: [PHP] Help needed with Curl

2007-07-24 Thread Bosky, Dave
TECTED] Sent: Tuesday, July 24, 2007 10:56 AM To: Daniel Brown Cc: Bosky, Dave; php-general@lists.php.net Subject: Re[2]: [PHP] Help needed with Curl Hi Daniel, Tuesday, July 24, 2007, 2:34:06 PM, you wrote: > In order to enable cURL on a Windows box, you have to copy > libeay32.dll and ssleay

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 ""

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'

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

[PHP] Session issues

2006-08-17 Thread Dave Goodchild
Hi all, I am currently writing a web application that has a 3-stage form process as part of its functionality. The values passed in are placed in the session array after validation and once the user has completed and supplied all required values the relevant session values are inserted into the da

Re: [PHP] Re: Session issues

2006-08-17 Thread Dave Goodchild
How does the user "go back one page"? If it by using the browser's back-button, the php script has no way of knowing it. Yes, but the session variables have already been set, and are configured to display in the form fields. -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] Re: Session issues

2006-08-17 Thread Dave Goodchild
On 17/08/06, John Nichel <[EMAIL PROTECTED]> wrote: Dave Goodchild wrote: >> >> >> How does the user "go back one page"? If it by using the browser's >> back-button, the php script has no way of knowing it. > > > > Yes, but the sessi

Re: [PHP] Re: Session issues

2006-08-17 Thread Dave Goodchild
default or blank. I just wanted to know if anyone could spot the issue from experience, otherwise I need a rethink! On 17/08/06, John Nichel <[EMAIL PROTECTED]> wrote: Dave Goodchild wrote: > On 17/08/06, John Nichel <[EMAIL PROTECTED]> wrote: >> >> Dave Goodchild wrote:

Re: [PHP] Re: Session issues

2006-08-18 Thread Dave Goodchild
s resolved. Now the only problem is that when the client completes the cycle blank or default values are entered into the db, whereas the other 4 remote testers have entered the data without issue. On 18/08/06, Richard Lynch <[EMAIL PROTECTED]> wrote: On Thu, August 17, 2006 12:56 pm, Dave

Re: [PHP] preg_match problem

2006-08-21 Thread Dave Goodchild
On 21/08/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: hi. I have to check if the script file belongs to any ov form1.php to form6.php files. Need something like: preg_match('/form*.php/', $_SERVER['PHP_SELF']) wher * kan be any number between 1 and 6. Thanks for any help. the pattern is f

Re: [PHP] Re: Regex

2006-08-21 Thread Dave Goodchild
On 21/08/06, M. Sokolewicz <[EMAIL PROTECTED]> wrote: A little harsh but I agree with the sentiment - plus you will get a lot of pleasure out of it when you see how powerful a tool it is in your arsenal. -- http://www.web-buddha.co.uk http://www.projectkarma.co.uk

[PHP] Session / cookie issues

2006-08-23 Thread Dave Goodchild
Hi all. I mailed some time ago regarding a cookie/session issue I am having and thank you all for your useful and knowledgeable responses. I have now used 10 separate testers and 9 are able to progress through a 3-stage form process that validates data as it goes along and enters the data into the

Re: [PHP] Session / cookie issues

2006-08-24 Thread Dave Goodchild
On 24/08/06, Andrew Kreps <[EMAIL PROTECTED]> wrote: Could it be a 3rd party cookie problem? Does IE display the little eyeball privacy icon on the troubled user's browser status bar? I seem to remember having issues when Microsoft started supporting the cookie privacy stuff. I will check t

Re: [PHP] functions classes

2006-08-25 Thread Dave Goodchild
On 25/08/06, Peter Lauri <[EMAIL PROTECTED]> wrote: It should not be to big of a problem if you can set your mind into thinking about functions and objects instead of a step by step script. Then just cut it in pieces and your are done :) Agreed. If it puts you on the good foot, send an extrac

Re: [PHP] Email with pregmatch

2006-08-27 Thread Dave Goodchild
Try this: preg_match("/^([a-zA-Z0-9.])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+/", $_POST['email']); -- http://www.web-buddha.co.uk http://www.projectkarma.co.uk

Re: [PHP] display a single thumb per gallery

2006-08-27 Thread Dave Goodchild
To find out how many unique galleries: SELECT DISTINCT gallery FROM table Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- http://www.web-buddha.co.uk http://www.projectkarma.co.uk

[PHP] Functions vs html outpuit

2006-09-01 Thread Dave Goodchild
Hi all, this may seem like a silly question, but I am creating a library of html form element generation function, for example a textarea fucntion that takes rows and cols as parameters, a function that generates a day, month and year select box, etc. My question is - is it significantly to switch

Re: [PHP] Re: Functions vs html outpuit

2006-09-03 Thread Dave Goodchild
Thanks, that was what I needed to hear. Cheers. On 03/09/06, Ivo F.A.C. Fokkema <[EMAIL PROTECTED]> wrote: On Fri, 01 Sep 2006 16:44:19 +0200, M. Sokolewicz wrote: > Dave Goodchild wrote: >> Hi all, this may seem like a silly question, but I am creating a library of >&

Re: [PHP] Quotes?

2006-09-05 Thread Dave Goodchild
Or use a heredoc? -- http://www.web-buddha.co.uk http://www.projectkarma.co.uk

Re: [PHP] Newbie question about

2006-09-09 Thread Dave Goodchild
To be gained: less typing To be lost: short_open_tag may be disabled in some environments, making your code less portable. If you are only ever going to run your code in one environment and can enable short_open_tag (or if it is already on), there's no issue. -- http://www.web-buddha.co.u

[PHP] Date maths

2006-09-10 Thread Dave Goodchild
Hi all. I am in the midst of creating a national online events directory (ie evening classes, coffee mornings, yard sales etc). The user is able to enter one-off events or regular events (daily, weekly, monthly) and each event entered makes up one record in the events table in the db (mysql). Peop

Re: [PHP] does magic_quotes_gpc prevents sql injection through forms?

2006-09-11 Thread Dave Goodchild
I don't think so. What if magic_quotes_gpc gets turned off or you move to another environment. Best practice is to turn if off (if you can) and so gain fine control over your data. You can either compromise and use a function that checks whether the setting is enabled and either add your own slas

Re: [PHP] does magic_quotes_gpc prevents sql injection through forms?

2006-09-11 Thread Dave Goodchild
Yes. Always treat incoming data as if it were tainted. How rigorous you are is up to you, but check for required fields, then validate them (type, size etc) and finally escape before database entry. http://www.projectkarma.co.uk -- http://www.web-buddha.co.uk http://www.projectkarma.co.uk

Re: [PHP] does magic_quotes_gpc prevents sql injection through forms?(SOLVED)

2006-09-11 Thread Dave Goodchild
Learning strtolower() for a start. On 11/09/06, Faisal Sahar <[EMAIL PROTECTED]> wrote: CAN ANYONE TELL ME WHAT TOPICS ARE REQUIRED TO MASTER IN ORDER TO BECOME A GENIOUS WEB PROGRAMMER ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP and mySQL dates

2006-09-13 Thread Dave Goodchild
Hi all. I am building an online events registry and have mapped out all the dates between Oct 1 2006 and Dec 31 2030, stored in the database as timestamps incremented by 86400 to give daily slots. I have output the values using the php date function and all is well. Users can enter either one-off

Re: [PHP] PHP and mySQL dates

2006-09-13 Thread Dave Goodchild
Thanks. I have been so up close and personal with this that I can't see the wood for the trees. Of course, so obvious. Thank you - you have made me very happy. -- http://www.web-buddha.co.uk http://www.projectkarma.co.uk

Re: [PHP] PHP and mySQL dates

2006-09-13 Thread Dave Goodchild
Good luck with that. > -- http://www.web-buddha.co.uk http://www.projectkarma.co.uk -- http://www.web-buddha.co.uk http://www.projectkarma.co.uk

Re: [PHP] Question on explode and join.

2006-09-13 Thread Dave Goodchild
Hi. I have just added a profanity filter to a current project which runs like so (all form values are passed into the session after checking for required fields etc). $swearbox is an array containing profanities so I won't include it here! $_SESSION['profane'] = false; foreach ($_POST as $val

[PHP] php - mysql query issue

2006-09-15 Thread Dave Goodchild
Hi all. I am building an online events listing and when I run the following query I get the expected result set: SELECT events.id AS eventid, name, postcode, start_time, dates.date FROM events, dates_events, dates WHERE dates_events.event_id = events.id and dates_events.date_id = dates.id AND dat

Re: [PHP] php - mysql query issue

2006-09-15 Thread Dave Goodchild
On 15/09/06, Brad Bonkoski <[EMAIL PROTECTED]> wrote: Have you tried echoing out your query to run on the backend itself? Maybe there is some problem with how your join is being constructed... Perhaps a left outer join is called for? Hard to tell without having knowledge of your table structure

[PHP] Session issues

2006-09-15 Thread Dave Goodchild
Hi all. I am using php sessions in an online events listing to carry around user data until all data is clean and then entering it into a database after the final form has been submitted. On the first form the user selects a category and postcode, and the processing script validates and cleans the

Re: [PHP] Just say "hello"

2006-09-15 Thread Dave Goodchild
Lea el f**king manual! On 15/09/06, Ryan A <[EMAIL PROTECTED]> wrote: RTFM Oops, sorry, that seems to be everyone favourite so thought i would be the first one to say it... and welcome to the list :) Cheers! -- - The faulty interface lies between the chair and the keyboard. - Creativi

[PHP] php and session issues continued...

2006-09-16 Thread Dave Goodchild
Hi all. I have a session issue and wondered if anyone else has encountered this: I have an app where a user fills out 3 forms. In each case, after validation and cleaning the form data is passed into session variables and after the final submission the data is entered into the database. I am usin

[PHP] PHP5, Windoze, Extensions

2006-09-27 Thread Dave Carrera
have php in the system path. I also have tried copying the extension to windoze and system32 but still they will not load. ANy ideas ?? Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP5, Windoze, Extensions

2006-09-27 Thread Dave Carrera
ly is not tidy is it. What could be wrong Dave George Pitcher wrote: Dave, I would suggest putting your extension path in your system path. I have encountered problems getting extensions to load where there have been multiple instances of dll files. reducing these to one instance solved that pr

Re: [PHP] PHP5, Windoze, Extensions

2006-09-27 Thread Dave Carrera
Hi George, That worked :-) Many thanks for setting me on the straight and narrow. Dave George Pitcher wrote: Dave, Why not put your ext path into your include path : include_path = "c:\php\pear;c:\php;c:\php\ext" That might solve the problem. Just a bit of lateral thinkin

Re: [PHP] How do i check if a variable is a reference or a copy?

2006-09-28 Thread Dave Goodchild
Why do you want to do that? To check whether a variable is passed by reference or value look at the function prototype. If you clarify the reasons why you want to do that it would help. -- http://www.web-buddha.co.uk http://www.projectkarma.co.uk

Re: [PHP] Strange error in PHP/MySQL

2006-10-02 Thread Dave Goodchild
Do you have the Host field set to unique? -- http://www.web-buddha.co.uk http://www.projectkarma.co.uk

Re: [PHP] Formatting Question

2006-10-02 Thread Dave Goodchild
How is the field set in the database - is it CHAR/VARCHAR or TEXT? -- http://www.web-buddha.co.uk http://www.projectkarma.co.uk

Re: [PHP] alternatively

2006-10-02 Thread Dave Goodchild
Just use {$row['title']} or ${row['title']}, it will save you headaches. I may be a purist, but it's also satisfying as it still indicates the array element is a string rather than a constant. Anyway, the above two methods are the preferred way I think.

Re: [PHP] Breaking lines

2006-10-03 Thread Dave Goodchild
double-quote it Best Regards, Deckard -- 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] Breaking lines / NEW

2006-10-03 Thread Dave Goodchild
There is no real need to keep flipping in and out of the string like that, just use this: $stringData = "\n\n\$'$hostname = '$hostname\n\$$database = wordlife\n\$$mysql_username = $mysql_username\n\$$mysql_user_password = $mysql_user_password\n\n"; ...or something similar - use double quotes to

Re: [PHP] Breaking lines - att. Richard Lynch

2006-10-03 Thread Dave Goodchild
I tend to store passwords in mysql as hashed values (usually md5), and if I am using scripts to connect to the database name that file (for example) connect.inc and add an .htaccess file to stop user download of any files called *.inc. Or store those files outside the web root in the include path.

Re: [PHP] Template system

2006-10-05 Thread Dave Goodchild
Smarty? smarty.php.net -- http://www.web-buddha.co.uk

[PHP] PHP mentoring

2006-10-05 Thread Dave Goodchild
Hi all. I am an intermediate php/mysql developer (1 1/2 years experience) and wondered if anyone would consider mentoring my good self. Would not be heavy, I am constantly working on projects and looking to improve and feel mentoring is a great way to learn, of course after a certain level I would

Re: [PHP] Help on objects [with reply]

2006-10-05 Thread Dave Goodchild
Re the last suggestion, ensure you keep those database details outside the web root (ie in a file called connect.inc for example) or if have to keep it there add a .htaccess file that prevents download of *.inc files. Also, avoid use of the error suppression operator (@). You need to see your err

Re: [PHP] Help on objects [with reply]

2006-10-05 Thread Dave Goodchild
Undoubtedly. He could also use the PEAR DB abstraction layer.

Re: [PHP] What Framework would you recommend?

2006-10-05 Thread Dave Goodchild
I use Code Igniter and think it's great. Very clear, fast, cuts my coding time by about 40%. Then again, depends on what you need a framework for...

Re: [PHP] Miserable escape string problem

2006-10-05 Thread Dave Goodchild
Is this really worth all the keystrokes? Do we not have any more valuable ways to spend our time? On 06/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Richard Lynch wrote: > $curly = '{'; > echo "$curly$var1: $var2}"; > Horrendous workaround. Google Kreme wrote: > On 05 Oct 2006, at 11:3

Re: [PHP] $_SERVER['HTTP_REFERER']

2006-10-08 Thread Dave Goodchild
HTTP_REFERER is not a reliable way of capturing a remote address. Sometimes the client does not set it at all. On 08/10/06, Peter Lauri <[EMAIL PROTECTED]> wrote: Hi guys, I am trying to track where the people entered a unique page from (developing an affiliate system). I have been using

[PHP] php and mysql date mapping question

2006-10-10 Thread Dave Goodchild
Hi all, I am in the process of creating a national events directory where people can enter their events (car boot sales, evening classes etc) and specify whether those events are one-ff events or repeating (daily, weekly etc) affairs and people can search for those events by postcode, date range,

Re: [PHP] Re: moving to other web server

2006-10-11 Thread Dave Goodchild
$this is a bad choice of variable name!

Re: [PHP] Re: moving to other web server

2006-10-11 Thread Dave Goodchild
$this is

[PHP] php - mysql question

2006-10-13 Thread Dave Goodchild
Hi all. I am writing a web app with a mysql back end and there is every chance one of the tables may have to handle 56+ million records. I am no mysql expert but has anyone else here ever handled that volume of data, and if so, any suggestions or caveats? The tables will of course be correctly ind

Re: [PHP] Automatically rounding numbers?

2006-10-18 Thread Dave Goodchild
I think you can use the BCMath or GMP libraries for this. -- http://www.web-buddha.co.uk

[PHP] Sessions /cookies issue

2006-10-18 Thread Dave Goodchild
Hi all. I am building a web app which uses sessions to retain user data between pages and finally enter that data into mysql - I have noticed that out of 100 entries in the database, 10% are blank. I tested this by setting a cookie on the home page and when the user navigated to the form pages, te

[PHP] session - cookie issues

2006-10-20 Thread Dave Goodchild
Hi all, I am having issues with users not being able to post their details to my site. The system uses sessions, so when they hit the index page a test cookie is set thus: setcookie('djst', 'test'); and then I test whether that cookie is set on the next page. If not, I direct the users to an inf

[PHP] A problem with dates

2006-10-20 Thread Dave Goodchild
Hi all. I have an online events directory and am having some issues with date calculations. I have a table of dates (next year) and an events table - which have a many to many relationship and so use an intermediary mapping table called dates_events. All good - when the user enters a single, multi

Re: [PHP] I'm newbie in PHP

2006-10-24 Thread Dave Goodchild
Doesn't look like you have mysql support compiled with PHP. -- http://www.web-buddha.co.uk

Re: [PHP]

2006-10-26 Thread Dave Goodchild
for ($i=1;$i<=31;$i++) : ?> >

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