[PHP] php programming style

2002-11-21 Thread Beau Hartshorne
Hi, I'm curious if it's bad coding style for a function to return a value on success, or simply "false" on fail. Here's what I mean: Is this ok? Thank you, Beau -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] php programming style

2002-11-21 Thread Beau Hartshorne
> I think that some of the above question might help you out. However, > from a programming standpoint i like to make sure that my functions > return the same type at least. Some feel different about this and > return various type (ie, int, strings, arrays)... I agree that it should return a cons

[PHP] writing functions to preform mysql queries

2002-11-22 Thread Beau Hartshorne
Hi, I'm trying to separate my database query code from my application logic. I want to do this by creating a small application-level library with functions that INSERT, DELETE and UPDATE specific information in a mysql database. So I created a file called news_mysql.lib.php and put it in a /libra

[PHP] php and file uploads/downloads

2002-12-03 Thread Beau Hartshorne
Hi, I'm working on a system that allows users to upload and then download pdf files. Each file is related to a mySQL database entry. To keep things simple and consistent, I'd like to store the pdf files like this on the server: [PRIMARY_KEY].pdf But when a user downloads the file, I'd like them

[PHP] Session problems: "Warning: write failed: Disk quota exceeded"

2002-08-21 Thread Beau Hartshorne
Hi, Recently, my php app has started to throw these warnings: Warning: write failed: Disk quota exceeded (122) in Unknown on line 0 Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 I narrowed it do

RE: [PHP] PHP Execution Timer

2002-09-19 Thread Beau Hartshorne
This function: function getmicrotime() { list($usec, $sec) = explode(" ",microtime()); return ((float)$usec + (float)$sec); } is provided on this page: http://www.php.net/manual/en/function.microtime.php and is needed for the code below to work properly. Beau > $timerOn = 1; // s

RE: [PHP] Is php even right for this design?

2002-09-20 Thread Beau Hartshorne
> The admin users will need to run long processes that take about > 5-15 minutes each. They cannot timeout and they must be done throughout the day > while general users are working in the application as well. Is > there a big problem with this? What steps should I take to ensure > t

RE: [PHP] Output Buffering - Am I using it correctly?

2002-09-25 Thread Beau Hartshorne
> I guess that this means I am out of luck here. Anyone know a cleaner > method for delivering spreadsheets? Can you get the server to write it to a file, and then let the client download the file normally? Beau -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:/

RE: [PHP] Output Buffering - Am I using it correctly?

2002-09-25 Thread Beau Hartshorne
> Can you get the server to write it to a file, and then let the client > download the file normally? > [/snip] > > Believe me, if I could have taken that way out I would have done it. I am > researching some classes, but they all seem to take just as long to create > the spreadsheet. What about

[PHP] instantiating objects

2003-02-06 Thread Beau Hartshorne
I'm just starting to use PEAR, and have seen several ways of instantiating the PEAR objects: $form = new HTML_QuickForm(); $form =& new HTML_QuickForm(); $dbh = DB:connect("dsn"); $dbh = new DB(); $mail_object =& Mail::factory('sendmail', $params); Can anyone explain (or point to dome docs that e

RE: [PHP] Cleaning up HTML table structure

2003-03-10 Thread Beau Hartshorne
Jens, I would suggest that you try writing a script that keeps track of how many tags have been opened (look for "<"), versus how many tags have been closed ("[^>]*/>") on a line-by-line basis. Using that number, you should be able to indent the code properly. Let us know what you've got so far.

[PHP] PHP or MSIE Problem?

2004-02-20 Thread Beau Hartshorne
All, When I submit a form from MSIE, under certain circumstances some of the fields don't make it into the $_POST array. I am building a CMS that accepts images and text entered into an HTML form. If I submit a form from MSIE, and if the text contains special characters (like T [TM] for example),

RE: [PHP] PHP or MSIE Problem? -- SOLVED

2004-02-22 Thread Beau Hartshorne
I described a situation where MSIE for Windows would not post all of a form's fields under fairly unique circumstances. This problem occurs in MSIE 5, 5.5, and 6 (with the most recent hotfixes applied). No other browsers seem to be affected. When: 1. A form is submitted with the enctype attribute

RE: [PHP] IE6 with latest hotfixes breaks forms ...

2004-03-01 Thread Beau Hartshorne
Marc: This could be related to the problem I described in detail a few days ago. Here was my solution: http://marc.theaimsgroup.com/?l=php-general&m=107751892631059&w=2 Please let us know if this helps! Beau > We're having a weird problem with some of our PHP forms, > where, when a client use

[PHP] htmlentities, links, javascript

2004-04-12 Thread Beau Hartshorne
hi all, i have a script that calls a popup like this: Choices the & is there to make sure the page validates. the problem is that some browsers seem to be incorrectly translating this to: [REQUEST_URI] => /popup.php?name=Choices&product_id=15 instead of: [REQUEST_URI] => /popup.php?name=Choic