[PHP] A workaround for type hinting native types (and a little of self-advertising)

2007-11-06 Thread Martin Alterisio
PROTECTED]', ...); EXAMPLE; echo Regards, \n Martin Alterisio;

Re: [PHP] Regular Expressions

2007-11-06 Thread Martin Alterisio
2007/11/6, Alberto García Gómez [EMAIL PROTECTED]: I'm a mess in regular expressions and I make this code: $link = ereg_replace('ntilde;','n',$link); $link = ereg_replace('aacute;','a',$link); $link = ereg_replace('eacute;','e',$link); $link = ereg_replace('iacute;','i',$link); $link =

Re: [PHP] Code Critique Please :)

2007-11-26 Thread Martin Alterisio
2007/11/21, Simeon F. Willbanks [EMAIL PROTECTED]: Hello, I am trying to increase my knowledge and understanding of OO and OO Design Patterns. I'd like to request a critique of a program that extracts MySQL table information and translates it into XML. In the program, I tried to

Re: [PHP] sprintf() oddness

2007-12-02 Thread Martin Alterisio
2007/12/1, Christoph Boget [EMAIL PROTECTED]: Why does sprintf( '%.03f', 0.1525 ) return 0.152 while sprintf( '%.03f', 0.1575 ) return 0.158? Welcome to the world of f floating point numbers. Discrete mathematics, leave all hope, ye that enter. It's the way floating point

Re: [PHP] Structured Code vs. Performance

2007-12-02 Thread Martin Alterisio
2007/12/2, tedd [EMAIL PROTECTED]: To me, good structure starts at the function level. Like the lattice of a crystal, coding grows and reflects the most basic element. Keep that element consistent and you'll find that it will be reflected in everything you do. How's that for philosophical?

Re: [PHP] Structured Code vs. Performance

2007-12-03 Thread Martin Alterisio
2007/12/2, tedd [EMAIL PROTECTED]: Oh yes, it's very much like fractals, but the term fractalism is usually reserved for art forms based on fractals. However, one could conclude that all crystalline forms are a real-world examples of fractals. In similar vein, all repetitive processes

Re: [PHP] // ?

2007-12-04 Thread Martin Alterisio
2007/12/4, Kevin Schmeichel [EMAIL PROTECTED]: Here's some unexpected behavior: ?php // ? what? ? This will output what? - I expected no output, as is the case if the inline comment was a /* */ comment. Is this a bug? Expected behavior. Read the manual:

Re: [PHP] Try{} Catch()

2007-12-23 Thread Martin Alterisio
It's not supposed to be practical, it's just a way to handle errors. You shouldn't rely on try/catch for algorithm implementation. You create exceptions for errors and unexpected behavior. Then in some other part of the system you use try/catch to prevent the code from terminating abruptly. You

[PHP] Sayonara PHP

2007-12-25 Thread Martin Alterisio
Please let me do a little explanation of the title first. Japanese is an interesting language where context is vital to the meaning of a word. Sayonara usually means a simple good bye, but within a different context can mean we'll probably never meet again. To understand this mail you'll have to

Re: [PHP] Re: [PHP-DEV] Sayonara PHP

2007-12-28 Thread Martin Alterisio
that was much of a rant. The short version is I liked the php development market because it was safe, but now I doubt its safety. That's all. I don't think that rant may be of use to anyone, but at least it felt nice to let go of some steam. Best Regards and Happy New Year, Martin Alterisio

Re: [PHP] Sayonara PHP

2007-12-28 Thread Martin Alterisio
really hope that someone else could find anything sensible in the things I posted in the first mail, and keep on building on top of them. Best Regards and Happy New Year, Martin Alterisio

Re: [PHP] Try{} Catch()

2008-01-01 Thread Martin Alterisio
2007/12/31, Richard Lynch [EMAIL PROTECTED]: On Sun, December 23, 2007 3:50 pm, Martin Alterisio wrote: It's not supposed to be practical, it's just a way to handle errors. You shouldn't rely on try/catch for algorithm implementation. You create exceptions for errors and unexpected

Re: [PHP] function - action

2007-08-10 Thread Martin Alterisio
2007/8/7, Richard Lynch [EMAIL PROTECTED]: On Fri, August 3, 2007 1:38 am, Ralph Kutschera wrote: I'm working on a project, where we distinguish between functions and actions in design, although in PHP both are implemented as functions. Is there a chance that PHP can use the word

Re: [PHP] function - action

2007-08-10 Thread Martin Alterisio
2007/8/3, Ken Tozier [EMAIL PROTECTED]: On Aug 3, 2007, at 9:39 AM, Ken Tozier wrote: On Aug 3, 2007, at 2:38 AM, Ralph Kutschera wrote: Hallo! I'm working on a project, where we distinguish between functions and actions in design, although in PHP both are implemented as

Re: [PHP] Classes and access to outside variables

2007-09-29 Thread Martin Alterisio
Refer to the global on the constructor. Anyway, using a global like that is not a good practice. Just pass the variable to the constructor. 2007/9/29, Merlin [EMAIL PROTECTED]: Hi there, I am new to PHP classes and I do want to access a variable outside the class, but somehow that does not

Re: [PHP] Classes and access to outside variables

2007-09-30 Thread Martin Alterisio
That's incorrectly syntactically. Won't run. Ok, let's write some code to show how this can be done: class SearchHelper extends AjaxACApplication { private $dbh; public function __construct() { $this-dbh = $GLOBALS['dbh']; } } Better yet, pass the database host in the

Re: [PHP] counting with leading zeros

2007-10-01 Thread Martin Alterisio
// glob returns an ordered list (rtfm: man glob) // relies on the use of the operator ++ to generate string sequences. function lastFileInSequence($path, $prefix, $first, $suffix) { return array_pop(glob($path . / . $prefix . str_repeat('?', strlen($first)) . $suffix)); } function

[PHP] PHP Love Letter

2006-07-18 Thread Martin Alterisio
Been quiet too much... *This time, I seriously advise against running this piece of code unless you know what you're doing* Enjoy... --- html head titleLove Letter/title /head body ?php if (in_array($me, $her-acquaintances)) { ? pDear ?=$her-name?,/p pI really enjoy your company and I

Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-03 Thread Martin Alterisio
2006/8/3, Manuel Lemos [EMAIL PROTECTED]: Hello, on 08/01/2006 01:35 PM Gabe said the following: What's the common consensus as to a solid PHP framework to use for application development? There seems to be a number of them out there, but I'm not sure which one's are the most robust,

Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-06 Thread Martin Alterisio
2006/8/4, Manuel Lemos [EMAIL PROTECTED]: Hello, on 08/03/2006 05:18 PM Martin Alterisio said the following: Anyway, you may want to read this more in depth reflection of the state of the PHP framework world and recommendations on how to pick what suits best for you: http

Re: [PHP] How to get rid off empty elements of an array?

2006-08-07 Thread Martin Alterisio
2006/8/7, [EMAIL PROTECTED] [EMAIL PROTECTED]: Hi to all! I have a form with 6 text fields where visitor has to enter product serial number (same type data). he has to enter AT LEAST ONE. for ($i=0; $i6; $i++) { echo 'input type=text name=PSN['.$i.'] value='.$PSN[$i].' size=25'; } After

Re: [PHP] Mixing sprintf and mysql_real_escape_string

2006-08-07 Thread Martin Alterisio
2006/8/7, Peter Lauri [EMAIL PROTECTED]: I should maybe add that the data actually comes from a form: mysql_query(sprintf(INSERT INTO table (value1, value2) VALUES (1, '%s'), mysql_real_escape_string($_POST['formvalue']))); And when I have ' in the field, it will insert \' into the database

Re: [PHP] Error Handling Library?

2006-08-31 Thread Martin Alterisio
I'm curious, what features are you looking for in an error handling library? 2006/8/31, Jay Paulson [EMAIL PROTECTED]: I've been doing some research and was wondering if anyone out there has written a library for error handling? I haven't found anything as of yet but would love to hear

Re: [PHP] Iteration through letter

2006-09-15 Thread Martin Alterisio
2006/9/14, Norbert Wenzel [EMAIL PROTECTED]: Hi, just for fun I tried the following code: code for($letter = 'A'; $letter = 'Z'; ++$letter) { echo($letter . ' '); } /code What surprised me was the output, which looked like this: A B C [...] Y Z AA AB AC [...] YY YZ I don't have any

Re: [PHP] Help converting C to PHP

2006-09-22 Thread Martin Alterisio
2006/9/22, Rory Browne [EMAIL PROTECTED]: On 9/22/06, Kevin Waterson [EMAIL PROTECTED] wrote: This one time, at band camp, Curt Zirzow [EMAIL PROTECTED] wrote: what about using: php.net/pi note the precision description. or are we talking about a different pi. The goal of the

Re: [PHP] Help converting C to PHP

2006-09-22 Thread Martin Alterisio
2006/9/22, Tom Atkinson [EMAIL PROTECTED]: Martin Alterisio wrote: 2006/9/22, Rory Browne [EMAIL PROTECTED]: On 9/22/06, Kevin Waterson [EMAIL PROTECTED] wrote: This one time, at band camp, Curt Zirzow [EMAIL PROTECTED] wrote: what about using: php.net/pi note

Re: [PHP] array_sum($result)=100

2006-09-25 Thread Martin Alterisio
2006/9/25, Robin Vickery [EMAIL PROTECTED]: On 24/09/06, Ahmad Al-Twaijiry [EMAIL PROTECTED] wrote: Hi everyone I have array of numbers and I want to get out of it a list of numbers that if I sum them it will be 100, here is my list (for example ) : $list =

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

2006-09-28 Thread Martin Alterisio
2006/9/28, Mathijs [EMAIL PROTECTED]: Hello there, Is there a way to check if a variable is passed by reference or if it is just a copy. With something like is_copy or is_reference? Thx in advance. Is this part of the I don't know if two vars reference the same object in PHP4 dilemma?

[PHP] OOP Hello World

2006-09-28 Thread Martin Alterisio
What's up folks? I just wanted to tell you about a thread that's going on in the spanish php mailing list. A fellow software developer which had just started with OOP was asking for Hello World examples using OOP. The examples of code he had been doing was not that different from the usual Hello

Re: [PHP] class usage

2006-09-29 Thread Martin Alterisio
2006/9/29, benifactor [EMAIL PROTECTED]: ok, about five minutes ago i decided to learn classes and delve into php's oop side. what i came up with was this... //start example code class newsletter { function send ($email,$subject,$message) { if ($email) { echo(the

Re: [PHP] Re: class usage

2006-09-29 Thread Martin Alterisio
2006/9/29, M.Sokolewicz [EMAIL PROTECTED]: Well, you could say that there is no difference really. Classes are mainly used as collections; They're a collection of functions (methods) sharing a common goal/dataset/whatever. That's a module, my friend, not a class:

Re: [PHP] class usage

2006-09-29 Thread Martin Alterisio
2006/9/29, Ray Hauge [EMAIL PROTECTED]: I think people have pretty much hit the nail on the head with OOP. One thing that I would like to point out is that OOP isn't necessarily needed in every case. Actually there's never a need to use OOP. As I said before OOP doesn't provide anything in

[PHP] Re: OOP Hello World

2006-10-04 Thread Martin Alterisio
it just now, I'll post it later on the spanish list) Well, I think that sums it all up. 2006/9/29, Martin Alterisio [EMAIL PROTECTED]: What's up folks? I just wanted to tell you about a thread that's going on in the spanish php mailing list. A fellow software developer which had just started with OOP

Re: [PHP] Re: OOP Hello World

2006-10-05 Thread Martin Alterisio
PROTECTED]: Are you sure you're not on a Spanish *Java* mailing list? :) On 10/5/06, Martin Alterisio [EMAIL PROTECTED] wrote: Me... again, still boring you to death with meaningless OOP rantings. First I would like to point out that there was a design mistake in what I proposed in the last

Re: [PHP] Help on objects

2006-10-05 Thread Martin Alterisio
2006/10/4, Deckard [EMAIL PROTECTED]: Hi, I'm trying to lay my hands on PHP OOP, but it's not easy :( I've read several examples in the web, but cannot transpose to may case. I'm trying to set a class to make SQL inserts in mysql. I have the class:

Re: [PHP] Help on objects

2006-10-05 Thread Martin Alterisio
2006/10/5, Satyam [EMAIL PROTECTED]: I've seen you already had a good answer on the errors in the code so I won't go on that. As for OOP, the one design error you have is that you are asking for an action, not an object. You want to make SQL inserts, that is your purpose, and that is an

Re: [PHP] Re: OOP Hello World

2006-10-05 Thread Martin Alterisio
2006/10/5, John Wells [EMAIL PROTECTED]: On 10/5/06, Martin Alterisio [EMAIL PROTECTED] wrote: PHP seems to be getting more and more object oriented, I think it's the right time to start questioning what have been done so far in terms of OOP in PHP, because, honestly, there are too many php

Re: [PHP] Help on objects

2006-10-05 Thread Martin Alterisio
2006/10/5, Satyam [EMAIL PROTECTED]: - Original Message - *From:* Martin Alterisio [EMAIL PROTECTED] *To:* Satyam [EMAIL PROTECTED] *Cc:* Deckard [EMAIL PROTECTED] ; php-general@lists.php.net *Sent:* Thursday, October 05, 2006 3:50 PM *Subject:* Re: [PHP] Help on objects 2006/10/5

Re: [PHP] EZ array problem - What's wrong with my brain?

2006-12-04 Thread Martin Alterisio
2006/11/30, Brian Dunning [EMAIL PROTECTED]: var_dump() gives me this: array(1) { [1.2]= array(2) { [code]= array(1) { [0]= string(3) 111 } [status]= array(1) { [0]= string(3) new } } } I'm trying to set a variable to that

Re: [PHP] Clarification: Jump to a record/PHP paging...

2006-12-24 Thread Martin Alterisio
To solve a problem like yours I ussualy do the following: First you need to use a deterministic order criteria when displaying the results, this means that according to the order columns you provide, MySQL will not have to decide how to order two rows that have the same values for this columns.

Re: [PHP] Odd behavior

2006-12-25 Thread Martin Alterisio
2006/12/25, jekillen [EMAIL PROTECTED]: On Dec 25, 2006, at 7:21 AM, Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-12-24 18:11:03 -0800: function display($list, $in, $out, $save, $req, $x) { for($i = 0; $i count($in); $i++) {$j = $i + 1; // two sets of links

Re: [PHP] Clarification: Jump to a record/PHP paging...

2006-12-25 Thread Martin Alterisio
2006/12/25, Robert Cummings [EMAIL PROTECTED]: WRONG! See Martin Alterisio's post for the same thread. You must not have understood the OP's requirements. xD I was starting to think my mails weren't getting through the list, maybe its nothing else than only a bigger delay than the usual.

Re: [PHP] array_intersect problem

2006-12-25 Thread Martin Alterisio
2006/12/25, Leo Liu [EMAIL PROTECTED]: Hi, I try to intersect associative array and it seems to fail to do so. Can anyone show me a walk around? For example I have array1 Array ( [0] = Array ( [imageID] = 1 ) [1] = Array (

Re: [PHP] Basic question - Starting a background task without waiting for its end.

2007-01-01 Thread Martin Alterisio
2006/12/31, Michel [EMAIL PROTECTED]: I (very simply) try to open a notepad on a simple text file in a simplistic PHP script, and would like to go on and display the next page without waiting for this notepad to be shut. After various attempts, I have used an : exec ('bash -c cmd /C start

Re: [PHP] classes and objects: php5. The Basics

2007-01-16 Thread Martin Alterisio
Backward compatibility with PHP4, where member functions couldn't be declared as static. Any member function could be called statically providing a static context instead of an object instance. 2007/1/16, Cheseldine, D. L. [EMAIL PROTECTED]: Hi I'm stuck on The Basics page of the php5 Object

Re: [PHP] classes and objects: php5. The Basics

2007-01-16 Thread Martin Alterisio
Forgot to mention that calling a non-statical function this way should generate an E_STRICT warning. 2007/1/16, Martin Alterisio [EMAIL PROTECTED]: Backward compatibility with PHP4, where member functions couldn't be declared as static. Any member function could be called statically providing

Re: [PHP] nuSoap -method '' not defined in service

2007-01-20 Thread Martin Alterisio
Try the following: $server-register('getColumns', array(), array()); The second argument is an array containing an entry for each argument of the webservice call, and the third argument is an array for the return value. Since you don't have either arguments nor return value, empty arrays should

Re: [PHP] preg_match problem

2007-01-20 Thread Martin Alterisio
Double slash to prevent PHP interpreting the slashes. Also using single quotes would be a good idea: if (preg_match('/[\\w\\x2F]{6,}/',$a)) 2007/1/19, Németh Zoltán [EMAIL PROTECTED]: Hi all, I have a simple checking like if (preg_match(/[\w\x2F]{6,}/,$a)) as I would like to allow all

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread Martin Alterisio
Maybe you can read the contents of the feeds using fsockopen() and stream_set_timeout() to adjust the timeout, or stream_set_blocking() to read it asynchronously, and then load the xml with simplexml_load_string(). PS: I forgot to reply to all and mention you'll have to send the GET http command

Re: [PHP] function by reference

2006-04-11 Thread Martin Alterisio
The ampersand before the function name indicates that the function returns a reference instead of a copy of the variable, for example: ?php function max($var1, $var2) { if ($var1 $var2) return $var1; else return $var2; } $global1 = 10; $global2 = 9; $maxglobal = max($global1,

Fwd: [PHP] Include Problem

2006-04-16 Thread Martin Alterisio
Ups, I forgot to reply to everyone again, sorry. -- Forwarded message -- From: Martin Alterisio [EMAIL PROTECTED] Date: 16-abr-2006 13:53 Subject: Re: [PHP] Include Problem To: Shaun [EMAIL PROTECTED] You're using an absolute path to the file, maybe what you really meant to do

Re: [PHP] Passing Form As Argument

2006-04-20 Thread Martin Alterisio
My first answer to your question would be: no, you can't refer to an html form in any way in php. My second answer would be, as usual, a question: what, exactly, are you trying to do? 2006/4/20, Chris Kennon [EMAIL PROTECTED]: Hi, I'm new to the list so Hello to all. I'm drafting a

Re: [PHP] Creating an OO Shopping Cart

2006-04-20 Thread Martin Alterisio
The $_SESSION array is already being serialized before saving it to the session datafile. You'll only have to: $_SESSION['cart'] = $cart; And before session_start(): require_once 'fileWhereClassIsDefined'; . . . session_start(); If the class isn't defined before serialization (session start)

Re: [PHP] Linebreak

2006-04-20 Thread Martin Alterisio
You wouldn't feel/look stupid if you had RTFM: http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.single 2006/4/20, Peter Lauri [EMAIL PROTECTED]: I feel stupid. In many examples I have seen similar to: echo 'pWhatever./p\n'; echo 'pAn other

Re: [PHP] Re: Creating an OO Shopping Cart

2006-04-21 Thread Martin Alterisio
You don't need the unserialize(), it's done internally by the session_start(). All the things you put inside $_SESSION, except for resources, will be rebuilt when the session is regenerated. This way you don't need to worry about serializing. Read the manual section about sessions. 2006/4/21,

Re: [PHP] array problem

2006-04-22 Thread Martin Alterisio
You're wrong, he isn't using an associative array, since the keys used are only integers. array(10,10,40,30,30,10); and array(0=10,1=10,2=40,3=30,4=30,5=10); create the same array. The problem is that array_unique preserves keys (read the manual!!!) If you don't want this, use array_values() to

Re: [PHP] How to execute multiples querys

2006-04-26 Thread Martin Alterisio
You should be able to do this in two calls to the mysql_query() function. mysql_query(SET @var1=3); mysql_query(SELECT * from table1 Where [EMAIL PROTECTED]); 2006/4/26, Mauricio Pellegrini [EMAIL PROTECTED]: Hi all I'm trying to execute two querys and they execute perfectly in fact, but

Re: [PHP] Debuggin PHP

2006-04-26 Thread Martin Alterisio
2006/4/26, John Nichel [EMAIL PROTECTED]: hicham wrote: Hello I'm a newbie in php world , and I'm trying to get a php 4 script work on an php5 version how do i debug php ? I get a blank page and nothing tells me what 's wrong ? Thanks hicham Turn on error reporting. --

Re: [PHP] PHP 4.3.11, call_user_func and instances of classes

2006-04-26 Thread Martin Alterisio
The problem is not what it seems. PHP4 assigns object by copy, not by reference. This is causing the call_user_func() to use a copy of the object instead of the original object. So, all modifications are lost once the call is done. One solution to this is to assign objects by reference: $addition

Re: [PHP] how to get the absolute path of an included file?

2006-04-27 Thread Martin Alterisio
2006/4/27, Bing Du [EMAIL PROTECTED]: Hello, Here are the two scripts. The result is 'var is' rather than 'var is foo'. My suspect is I did not set the file path right in 'include'. So in file2.php, how should I get the actual absolute path it really gets for file1.php? Is it stored in

Re: [PHP] Re: forms and dynamic creation and unique field names

2006-04-27 Thread Martin Alterisio
2006/4/27, Jason Gerfen [EMAIL PROTECTED]: Oops, I thought there might be an array function that would be better to use then foreach loops. Thanks. There are other functions (check the Array Functions section in the manual), but they just don't get along with the KISS principle. Dave

Re: [PHP] Recommended PHP frameworks

2006-04-27 Thread Martin Alterisio
2006/4/27, Robert Cummings [EMAIL PROTECTED]: A funny PHPClasses article... http://www.phpclasses.org/blog/post/52-Recommended-PHP-frameworks.html One thing I understood after hitting my head many times to a wall is that a good idea can be, and should be, explained in just three lines of

Re: [PHP] Help!

2006-04-28 Thread Martin Alterisio
2006/4/28, Dave Goodchild [EMAIL PROTECTED]: Hi all - I am attempting to solve some maddening behaviour that has me totally stumped and before I take a blade to my throat I thought I would pick the brains of the group/hive/gang. I am working on a viral marketing application that uses multipart

Re: [PHP] Help!

2006-04-28 Thread Martin Alterisio
2006/4/28, Barry [EMAIL PROTECTED]: Martin Alterisio schrieb: 2006/4/28, Dave Goodchild [EMAIL PROTECTED]: Hi all - I am attempting to solve some maddening behaviour that has me totally stumped and before I take a blade to my throat I thought I would pick the brains of the group/hive/gang

Re: [PHP] undefined variable

2006-04-29 Thread Martin Alterisio
2006/4/29, Smart Software [EMAIL PROTECTED]: code below shows all records from products table with an textbox and an order button for each record ? $query1 = mysql_query(SELECT * FROM products ); while ($rowType = mysql_fetch_array($query1)) { ? table width=500 border=0 tr class=largeheader

Re: [PHP] Help!

2006-04-29 Thread Martin Alterisio
person who will ever use it. Rather anal. On 29/04/06, Martin Alterisio [EMAIL PROTECTED] wrote: 2006/4/28, Barry [EMAIL PROTECTED]: Martin Alterisio schrieb: 2006/4/28, Dave Goodchild [EMAIL PROTECTED]: Hi all - I am attempting to solve some maddening behaviour that has me

Re: [PHP] Syntax Oddity

2006-05-02 Thread Martin Alterisio
2006/5/2, Richard Lynch [EMAIL PROTECTED]: Does anybody have a rational explanation for what purpose in life the following syntax is considered acceptable? ?php $query = UPDATE whatever SET x = 1; $query; ? Note that the line with just $query; on it doesn't, like, do anything. I suppose

Re: [PHP] Class/function scope general question

2006-05-12 Thread Martin Alterisio
2006/5/12, Edward Vermillion [EMAIL PROTECTED]: I'm doing some re-writing of a huge class I've got (don't think OOP cause it's really not, just the usual class full of functions). What I'm doing is moving the functions out of the class and into separate files so the (I'm hoping) memory

Re: [PHP] Class/function scope general question

2006-05-12 Thread Martin Alterisio
2006/5/12, Edward Vermillion [EMAIL PROTECTED]: On May 12, 2006, at 1:09 PM, Martin Alterisio wrote: class foo { function bar() { function baz(){} } } baz() will be a global function there. There are other ways to add member functions at runtime

Re: [PHP] Handling Large Check Box Data

2006-05-17 Thread Martin Alterisio
2006/5/17, Rahul S. Johari [EMAIL PROTECTED]: Ave, I¹m a little confused as to what¹s the best way to handle this. I have a form which, apart from lots of other fields, has a set of 25 ­ 30 Check Boxes, each of which asks the user for some kind of information which the user can check or leave

Re: [PHP] Converting characters

2006-05-18 Thread Martin Alterisio
2006/5/17, Jonas Rosling [EMAIL PROTECTED]: Hi, the PHP newbie is here again asking questions. Is there anyway in PHP to convert none international characters so the are displayed correct? In my case I have lots of data in the database with å,ä and ö. Thanks // Jonas -- PHP General Mailing

Re: [PHP] PHP Notice: Undefined index

2006-05-19 Thread Martin Alterisio
2006/5/19, John Taylor-Johnston [EMAIL PROTECTED] : Any idea why this bit of code if(yes == $_POST['submitter']) { mysql_select_db($db,$myconnection); $sql = INSERT INTO `$db`.`$table` (name,email,comments,entrydate) values ('$name','$email','$comments','$entrydate');

Re: [PHP] Re: Can php convert doc to HTML?

2006-05-23 Thread Martin Alterisio
2006/5/23, Dotan Cohen [EMAIL PROTECTED]: On 5/23/06, tedd [EMAIL PROTECTED] wrote: At 7:09 PM +0300 5/23/06, Dotan Cohen wrote: This may be far-fetched, but can php convert a doc file to HTML? I vaguely remember a thread that discussed converting pdf's, but I cannot find reference to

Re: [PHP] Re: Can php convert doc to HTML?

2006-05-23 Thread Martin Alterisio
2006/5/23, Dotan Cohen [EMAIL PROTECTED]: On 5/23/06, Martin Alterisio [EMAIL PROTECTED] wrote: If that's the case, why don't you just use the export as web page or save as web page tools of MS Word (if you don't have it anymore you can as someone who still has it, or I think OpenOffice

Re: [PHP] Re: Can php convert doc to HTML?

2006-05-23 Thread Martin Alterisio
2006/5/23, Jochem Maas [EMAIL PROTECTED]: my 2cents Martin Alterisio wrote: 2006/5/23, Dotan Cohen [EMAIL PROTECTED]: On 5/23/06, Martin Alterisio [EMAIL PROTECTED] wrote: If that's the case, why don't you just use the export as web page or save as web page tools of MS Word

Re: [PHP] Including Functions; one file or many?

2006-05-27 Thread Martin Alterisio
2006/5/27, Jochem Maas [EMAIL PROTECTED]: 2. any include file that does contain code that runs on inclusion contains something like the following as the first line of code: if (!defined('MY_APP_IS_SETUP')) die('try http://'.$SERVER['SERVER_NAME'].'/'); An enhancement to this strategy could

Re: [PHP] Using 'header' as redirect

2006-05-30 Thread Martin Alterisio
2006/5/30, Philip Thompson [EMAIL PROTECTED]: ? if ($subPage = $_GET['page']) include ($subPage); ? Are you checking what the user is sending inside $_GET['page']? If not, your system is vulnerable to a remote file injection.

Re: [PHP] Help with enter key in Forms

2006-06-02 Thread Martin Alterisio
2006/6/2, George Babichev [EMAIL PROTECTED]: Awesome, thank you so much! It works! On 6/1/06, Chris [EMAIL PROTECTED] wrote: George Babichev wrote: Ok, I sent it to everyone and you. Now can you answer my question please? I type in 1 2 into my form in the program that i

Re: [PHP] How do I make a HTML tree for a set of nodes?

2006-06-04 Thread Martin Alterisio
2006/6/4, Niels [EMAIL PROTECTED]: Hi, I have a set of nodes. Each node has a parent and so the set can be thought of as a tree. I want to show that tree somehow on a webpage, served by PHP. I cannot use Dot/Graphwiz for various reasons. What I'm looking for is an output of DIVs or

Re: [PHP] How do I make a HTML tree for a set of nodes?

2006-06-04 Thread Martin Alterisio
2006/6/4, Niels [EMAIL PROTECTED]: Hi! On Sunday 04 June 2006 18:13, Martin Alterisio wrote: [snip] I had a similar problem that, although it was with a binary tree, it can be used with your tree. PHP doesn't like too much the use of recursion, but this time recursion is the way to go

Re: [PHP] When is z != z ?

2006-06-04 Thread Martin Alterisio
2006/6/4, Rasmus Lerdorf [EMAIL PROTECTED]: tedd wrote: Hi gang: Here's your opportunity to pound me again for not knowing the basics of php. I vaguely remember something like this being discussed a while back, but can't find the reference. In any event, if one uses -- for ($i=a; $iz;

Re: [PHP] When is z != z ?

2006-06-04 Thread Martin Alterisio
2006/6/4, Rasmus Lerdorf [EMAIL PROTECTED]: Martin Alterisio wrote: 2006/6/4, Rasmus Lerdorf [EMAIL PROTECTED]: tedd wrote: Hi gang: Here's your opportunity to pound me again for not knowing the basics of php. I vaguely remember something like this being discussed a while back

Re: [PHP] When is z != z ?

2006-06-04 Thread Martin Alterisio
2006/6/4, Rasmus Lerdorf [EMAIL PROTECTED]: Martin Alterisio wrote: Still: anything ++anything should be true, or at least that's what they taught me on abstract data types design, and I think they're right (at least this time) In loosely typed languages that is not always true

Re: [PHP] When is z != z ?

2006-06-05 Thread Martin Alterisio
2006/6/5, [EMAIL PROTECTED] [EMAIL PROTECTED]: This is just one of those cases where the designers had to make a judgement call on how things were going to operate. It makes sense if you look at the two things separately (incrementing vs string 'greatness' evaluation) and makes sense that how

Re: [PHP] When is z != z ?

2006-06-05 Thread Martin Alterisio
2006/6/5, Larry Garfield [EMAIL PROTECTED]: On Monday 05 June 2006 14:56, Martin Alterisio wrote: 2006/6/5, [EMAIL PROTECTED] [EMAIL PROTECTED]: This is just one of those cases where the designers had to make a judgement call on how things were going to operate. It makes sense if you

Re: [PHP] When is z != z ?

2006-06-05 Thread Martin Alterisio
2006/6/6, Larry Garfield [EMAIL PROTECTED]: On Monday 05 June 2006 21:12, Martin Alterisio wrote: As for the increment, it actually would never have occurred to me to ++ a string before this thread, honestly. :-) However, what it appears to be doing (and I'm sure Rasmus will correct me

Re: [PHP] When is z != z ?

2006-06-06 Thread Martin Alterisio
2006/6/6, Robert Cummings [EMAIL PROTECTED]: On Tue, 2006-06-06 at 00:01, Martin Alterisio wrote: Because defining ++ and and in such a way as to make them behave like numbers would have made them not work for alphabetizing. A string is a string, and comparison of strings is alphabetic

Re: [PHP] When is z != z ?

2006-06-06 Thread Martin Alterisio
2006/6/6, Barry [EMAIL PROTECTED]: Martin Alterisio schrieb: is it really worthy the functionality supplied with the string ++ operator as it is? I don't see its usefullness yet. guess you want to order something by name not by number which might be false in some cases (1,10,2,20,21

Re: [PHP] When is z != z ?

2006-06-06 Thread Martin Alterisio
2006/6/6, Rasmus Lerdorf [EMAIL PROTECTED]: Martin Alterisio wrote: You're right about ++ operator not to be considered a math operator, my mistake. What I should have said is that the usual connotation and expected behaviour of ++ and the comparison operators is to give iteration

Re: [PHP] When is z != z ?

2006-06-06 Thread Martin Alterisio
2006/6/6, Robert Cummings [EMAIL PROTECTED]: On Tue, 2006-06-06 at 09:46, Martin Alterisio wrote: 2006/6/6, Robert Cummings [EMAIL PROTECTED]: In C++ they do leave it to the coder, and well, we all know what a mess it can be deciphering overloaded operators in C++ (or maybe we ALL don't

Re: [PHP] When is z != z ?

2006-06-06 Thread Martin Alterisio
2006/6/6, Robert Cummings [EMAIL PROTECTED]: On Tue, 2006-06-06 at 13:11, Martin Alterisio wrote: 2006/6/6, Robert Cummings [EMAIL PROTECTED]: On Tue, 2006-06-06 at 09:46, Martin Alterisio wrote: 2006/6/6, Robert Cummings [EMAIL PROTECTED]: In C++ they do leave it to the coder

Re: [PHP] When is z != z ?

2006-06-06 Thread Martin Alterisio
2006/6/6, tedd [EMAIL PROTECTED]: If php is supposed to be open source, doesn't that mean that people can voice their opinion on what they observe and expect? I second that. I believe being open-source doesn't mean Yay, it's free! but Cool, someone is listening to us!

Re: [PHP] When is z != z ?

2006-06-06 Thread Martin Alterisio
2006/6/6, Robert Cummings [EMAIL PROTECTED]: On Tue, 2006-06-06 at 14:06, Martin Alterisio wrote: 2006/6/6, Robert Cummings [EMAIL PROTECTED]: You must have missed this post: http://marc.theaimsgroup.com/?l=php-generalm=114945456908350w=2 Yes, I haven't read that post

Re: [PHP] When is z != z ?

2006-06-06 Thread Martin Alterisio
2006/6/6, Robert Cummings [EMAIL PROTECTED]: On Tue, 2006-06-06 at 14:31, Martin Alterisio wrote: 2006/6/6, Robert Cummings [EMAIL PROTECTED]: On Tue, 2006-06-06 at 14:06, Martin Alterisio wrote: 2006/6/6, Robert Cummings [EMAIL PROTECTED]: You must have missed this post

Re: [PHP] generating/transforming HTML so that it 'works' in a flash file

2006-06-07 Thread Martin Alterisio
2006/6/7, Jochem Maas [EMAIL PROTECTED]: hi people, I've been STFW till I'm blue in the face (so lack of oxygen might be problem atm) but can't find any [decent] info on generating/transforming existing HTML so thats it's compatible with the subset of tags that are supported by Flash

Re: [PHP] Skip first 4 array values

2006-06-09 Thread Martin Alterisio
2006/6/9, Jonas Rosling [EMAIL PROTECTED]: 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mysql + PHP

2006-06-15 Thread Martin Alterisio
2006/6/15, weetat [EMAIL PROTECTED]: Hi all, I have SQL query , for example , Select country , name from tbl_chassis order by country. The problem of the sql statement is that , if there are empty value in country field , it be sorted first . How to do sorting the empty value last ? I

Re: [PHP] progress monitor in php

2006-06-15 Thread Martin Alterisio
2006/6/15, weetat [EMAIL PROTECTED]: Hi all , I was using PEAR:HTTP_Upload to upload file in php 4.3.2. Is ok , however i need to display some sort of progress monitor to the user because some file is very large and took some times to upload. I need to inform the users to uploading is in

Re: [PHP] How to run one php app from another? RECAP

2006-06-16 Thread Martin Alterisio
2006/6/16, tedd [EMAIL PROTECTED]: Hi gang: So, there is NOT a way for one running php-application to call another and have it run while having the parent quit? For example, program a runs and presents the user with a web page. The user responds in some fashion (i.e., enters text) and clicks

Re: [PHP] Get rid of line breaks

2006-06-18 Thread Martin Alterisio
2006/6/18, Peter Lauri [EMAIL PROTECTED]: Best group member, I have a variable $content that is taken from a database. It contains line breaks and the $content will be posted with line breaks. I need to use this to insert this into a JavaScript function: $output =

  1   2   >