Re: [PHP] PHP/MySQL fatal error

2004-08-28 Thread Jason Wong
On Saturday 28 August 2004 09:43, gc wrote:
 Hi all,

 I'm Gene Candelaria and I'm a PHP and MySQL newbie.

You have started a new thread by taking an existing posting and replying to
it while you changed the subject.

That is bad, because it breaks threading. Whenever you reply to a message,
your mail client generates a References: header that tells all recipients
which posting(s) your posting refers to. A mail client uses this information
to build a threaded view (tree view) of the postings.

With your posting style you successfully torpedoed this useful feature; your
posting shows up within an existing thread it has nothing to do with.

Always do a fresh post when you want to start a new thread. To achieve this,
click on New message instead of Reply within your mail client, and enter
the list address as the recipient. You can save the list address in your
address book for convenience.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Dynamic HTML Creation

2004-08-28 Thread Sam Hobbs
Is it possible to use the DOM to add (HTML) elements to a page at the time
the page is being shown? The HTML and VBScript shown below is a simplified
version of what I need to do but of course I need to do it in PHP. Since PHP
is server-side (right?) perhaps it is not possible.


HTML
HEAD
TitleDynamic Table Demo/Title
/HEAD

Script Language=VBScript
Sub Window_Onload
Set NewRow = document.createElement(TR)
Set NewCell = document.createElement(TD)
NewCell.innerText = Cell Text
NewRow.appendChild NewCell
TableBody.appendChild NewRow
End Sub
/Script

Body
h1Dynamic Table Demo/h1

Table Id=NewTable Cols=1 border=1 Width=50%
TBody Id=TableBody
/TBody
/Table

/Body
/HTML

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dynamic HTML Creation

2004-08-28 Thread Justin Patrin
On Fri, 27 Aug 2004 23:17:29 -0700, Sam Hobbs [EMAIL PROTECTED] wrote:
 Is it possible to use the DOM to add (HTML) elements to a page at the time
 the page is being shown? The HTML and VBScript shown below is a simplified
 version of what I need to do but of course I need to do it in PHP. Since PHP
 is server-side (right?) perhaps it is not possible.
 

You're right, it's not possible. You'd have to create the whole page
with DOM and output it at the end.

You may be able to use DOM to make a specific piece and inject it
You could always just use JavaScript to inject things as wel.

 HTML
 HEAD
 TitleDynamic Table Demo/Title
 /HEAD
 
 Script Language=VBScript
 Sub Window_Onload
 Set NewRow = document.createElement(TR)
 Set NewCell = document.createElement(TD)
 NewCell.innerText = Cell Text
 NewRow.appendChild NewCell
 TableBody.appendChild NewRow
 End Sub
 /Script
 
 Body
 h1Dynamic Table Demo/h1
 
 Table Id=NewTable Cols=1 border=1 Width=50%
 TBody Id=TableBody
 /TBody
 /Table
 
 /Body
 /HTML
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 !DSPAM:412fc78a52836398416238!
 
 


-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dynamic HTML Creation

2004-08-28 Thread Ramil Sagum
On Fri, 27 Aug 2004 23:17:29 -0700, Sam Hobbs [EMAIL PROTECTED] wrote:
 Is it possible to use the DOM to add (HTML) elements to a page at the time
 the page is being shown? The HTML and VBScript shown below is a simplified
 version of what I need to do but of course I need to do it in PHP. Since PHP
is server-side (right?) perhaps it is not possible.

---

Yes, it is possible. And you are right,  PHP is a server side
language. In addition to PHP,
use a client-side scripting language (like JavaScript). JavaScript
also has functions for accessing the DOM (createElement and
getElementByID).



HTH



ramil

http://ramil.sagum.net

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dynamic HTML Creation

2004-08-28 Thread Jason Davidson
its possible to add HTML elements with DOM, im not sure what it has to
do with php though?

Jason

Sam Hobbs [EMAIL PROTECTED] wrote: 
 
 Is it possible to use the DOM to add (HTML) elements to a page at the time
 the page is being shown? The HTML and VBScript shown below is a simplified
 version of what I need to do but of course I need to do it in PHP. Since PHP
 is server-side (right?) perhaps it is not possible.
 
 
 HTML
 HEAD
 TitleDynamic Table Demo/Title
 /HEAD
 
 Script Language=VBScript
 Sub Window_Onload
 Set NewRow = document.createElement(TR)
 Set NewCell = document.createElement(TD)
 NewCell.innerText = Cell Text
 NewRow.appendChild NewCell
 TableBody.appendChild NewRow
 End Sub
 /Script
 
 Body
 h1Dynamic Table Demo/h1
 
 Table Id=NewTable Cols=1 border=1 Width=50%
 TBody Id=TableBody
 /TBody
 /Table
 
 /Body
 /HTML
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] backslashes

2004-08-28 Thread Thomas Goyne
On Fri, 27 Aug 2004 18:29:50 -0400, Ryan Schefke [EMAIL PROTECTED]  
wrote:

Thomas,
I'm not sure what your point is.  Please expand.
Ryan
Do you really see nothing wrong with announcing to all users that they  
can
run arbitrary SQL with your script?

well, the where clause in mysql is relativly safe, but suppose the user  
changes giftprint.php?passid=1sort=WHERE thankyou='Not Sent' ORDER BY  
cash ASC to, say.. giftprint.php?passid=1sort=OR 1, as the absolute most  
basic example.  PHP no longer supports
 sending multiple queries with one mysql_query to make this not as bad,  
but if you put SQL in the url or in a form, you are just begging to have  
it changed.  At the very least have sort=cash.  Idealy the query should  
look something like:

$sarr = array('name', 'event', 'description', 'cash', 'action',  
'thankyou', );
$query = 'SELECT `name`, `event`, `description`, `cash`, `action`,  
`thankyou` FROM `gifts` WHERE customerID=' . intval($_GET['passid'] . ' '  
. $sarr[intval($_GET['sort'])];

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Open a stream to the shell..

2004-08-28 Thread Joel Kitching
Hello, is it possible to open a stream in which I can write commands
and read output from them to a shell like bash?  I want to do this
because this program can not be completed with just a `backtick` or
shell_exec() command, as it's somewhat user-interactive.

As an example, let's say I want to get cdecl to explain to me what
char *horse means.  I would type:

# icdecl/i
Type `help' or `?' for help
cdecl iexplain char *horse/i
declare horse as pointer to char
cdecl iexit/i

...where input is surrounded by ithese/i.  This would be difficult
or impossible to do with shell_exec, especially if halfway-through you
have to do some calculating before you can know what to ask cdecl
next.

So I want to know whether you can somehow open a stream to a shell,
and execute commands there.  Like...

$fp = fopen('/bin/bash', 'rw');
$output = fgets($fp);
fputs($fp, 'cdecl');
$output = fgets($fp);
$output = fgets($fp);
fputs($fp, 'explain char *horse');
$expl = fgets($fp);
/* Right now you could do some calculations and figure out what to do next. */
$output = fgets($fp);
fputs($fp, 'exit');
$output = fgets($fp);
fclose($fp);

Now this obviously wouldn't work, as it would overwrite the bash
executable if you had proper access, but it's just to get the idea
across.

So, does anyone know how I can do this?

-- 
Joel Kitching
http://midgardmanga.keenspace.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Problem with sessions

2004-08-28 Thread gregosh
Yes, that indeed was a typo but only in my message above. It's not the
problem with the script

Uzytkownik Andre Dubuc [EMAIL PROTECTED] napisal w wiadomosci
news:[EMAIL PROTECTED]
 Hi,

 Looking at your code, I noticed that either you're missing the closing
double
 quote to close off the Location expression, or you're ending it early with
a
 double quote at http://;.

 Shouldn't it read:

  header(Location: http://' . $_SERVER['HTTP_HOST']
 ^
  . dirname($_SERVER['PHP_SELF'])
   . '/b.php?'.SID');
   ^^

 Perhaps that's the problem. I'm no expert . . .
 Hth,
 Andre


 On Friday 27 August 2004 07:47 am, gregosh wrote:
   you sure the cookie is being set?  try this
  
   header(Location: http://; . $_SERVER['HTTP_HOST']
. dirname($_SERVER['PHP_SELF'])
. '/b.php?'.SID);
 
  I had tried this before - no result. The cookie is set in the \temp dir
  where it is intended. And that's where the other cookie with new session
is
  located too. This really is a strange problem.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Variable variables

2004-08-28 Thread JanBro
Hi List,



I'm  using PHP5 with global variables off. I've got  around 20 dynamically
generated forms with a total of 300 different variables sent thru these
forms. I'd like to use variable variables, but according to the manual this
is not possible.

Now comes my Questoin, how do I receive my variables  which have the form
$a_123 or $a_124[]. Is there a workaround for PHP5 or PHP in general?



Who do I make  $data = $_REQUEST['a_123'] work ??? I'd hate to set global
variables to on, as I'm dealing with sensitive data.



Thx

JanBro

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Variable variables

2004-08-28 Thread Marek Kilimajer
JanBro wrote:
Hi List,

I'm  using PHP5 with global variables off. I've got  around 20 dynamically
generated forms with a total of 300 different variables sent thru these
forms. I'd like to use variable variables, but according to the manual this
is not possible.
Now comes my Questoin, how do I receive my variables  which have the form
$a_123 or $a_124[]. Is there a workaround for PHP5 or PHP in general?

Who do I make  $data = $_REQUEST['a_123'] work ??? I'd hate to set global
variables to on, as I'm dealing with sensitive data.
$form_var = 'a_123';
$data = $_REQUEST[$form_var];
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Running system command or exec as differnet Users

2004-08-28 Thread Marek Kilimajer
Paul Danko wrote:
Is it possible to run a command on the system using the system() or
exec() commands run as a specific user if I have the username and
password?
 
i.e.
 
[EMAIL PROTECTED]su userNo1
[EMAIL PROTECTED]/home/server/executeScript
 
 
all in a php system() or exec() call..
http://expect.nist.gov/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] mail filtering ... procmail + php query

2004-08-28 Thread vivek athalye
hi,
 
after looking at the imap functions...i was wondering how the mail filtering works...
afaik procmail does that...but is there any std way / php functions to set the filters?
i know the filtering depends on mail server...but if we assume that it is done using 
procmail...
is it somehow possible to write some php code that will take the input from user and 
generate the .procmailrc file?
what problems could occure?
 
any ideas?
 
thanks
- Vivek
 


-
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!

[PHP] Sessions NOT working - somebody please help me!

2004-08-28 Thread gregosh
Sorry for posting this problem again but it's been really driving me crazy.
I've reinstalled Apache and PHP for the 5th time and the result is still the
same - sessions work only when using a href=b.phpclick/a link. When
using header(location: b.php); the session information is lost and a new
cookie is set in the temp dir. My work has been waiting for a week because
of this problem and I can't go on with it. I'm out of ideas. What is going
on??

Greg

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Sessions NOT working - somebody please help me!

2004-08-28 Thread Jason Wong
On Saturday 28 August 2004 18:52, gregosh wrote:
 Sorry for posting this problem again but it's been really driving me crazy.
 I've reinstalled Apache and PHP for the 5th time and the result is still
 the same - sessions work only when using a href=b.phpclick/a link.
 When using header(location: b.php); the session information is lost and a
 new cookie is set in the temp dir. My work has been waiting for a week
 because of this problem and I can't go on with it. I'm out of ideas. What
 is going on??

1) Use a fully qualified URL for the redirection
2) session_write_close() before you redirect
3) In future search the archives first, this type of problem has been asked 
and answered many times before

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Design flaws travel in groups
-- Sad Truths of Life n2
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Sessions NOT working - somebody please help me!

2004-08-28 Thread gregosh

U¿ytkownik Jason Wong [EMAIL PROTECTED] napisa³ w wiadomo¶ci
news:[EMAIL PROTECTED]
 On Saturday 28 August 2004 18:52, gregosh wrote:
  Sorry for posting this problem again but it's been really driving me
crazy.
  I've reinstalled Apache and PHP for the 5th time and the result is still
  the same - sessions work only when using a href=b.phpclick/a link.
  When using header(location: b.php); the session information is lost
and a
  new cookie is set in the temp dir. My work has been waiting for a week
  because of this problem and I can't go on with it. I'm out of ideas.
What
  is going on??

 1) Use a fully qualified URL for the redirection
 2) session_write_close() before you redirect
 3) In future search the archives first, this type of problem has been
asked
 and answered many times before


 session_write_close() didn't help. After yet another reinstallation fully
qualified URL seems to have started working. However it hadn't helped
before - I'd tried it several times. So to be honest I still don't know why
but it started working. Thanks

Greg

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mail filtering ... procmail + php query

2004-08-28 Thread Jason Wong
On Saturday 28 August 2004 18:36, vivek athalye wrote:

 after looking at the imap functions...i was wondering how the mail
 filtering works... afaik procmail does that...

If by filtering you mean imap_search() then that works in a completely 
different way to procmail.

 but is there any std way /
 php functions to set the filters? i know the filtering depends on mail
 server...but if we assume that it is done using procmail... is it somehow
 possible to write some php code that will take the input from user and
 generate the .procmailrc file? 

procmail recipes are simply plaint text files. Just use php's file handling 
functions to read and write them.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
The only function of economic forecasting is to make astrology look 
respectable.
-- John Kenneth Galbraith
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Open a stream to the shell..

2004-08-28 Thread M. Sokolewicz
As of PHP 4.3.0 you can use the proc_* functions (proc_open  proc_close 
in PHP 4.3.0+ and proc_get_status, proc_nice and proc_terminate as of 
PHP 5).

If you don't have access to that, you can use the following:
use shell_exec to create a process, and make it send all output to some 
temporary file. Then, instead of getting it directly, you just read the 
contents of that temporary file :)

eg:
$stream = fopen('cvs server   /tmp/cvsOutput', 'w+');
just read it from /tmp/cvsOutput, and write to the $stream :)
hope it helps,
- Tul
Joel Kitching wrote:
Hello, is it possible to open a stream in which I can write commands
and read output from them to a shell like bash?  I want to do this
because this program can not be completed with just a `backtick` or
shell_exec() command, as it's somewhat user-interactive.
As an example, let's say I want to get cdecl to explain to me what
char *horse means.  I would type:
# icdecl/i
Type `help' or `?' for help
cdecl iexplain char *horse/i
declare horse as pointer to char
cdecl iexit/i
...where input is surrounded by ithese/i.  This would be difficult
or impossible to do with shell_exec, especially if halfway-through you
have to do some calculating before you can know what to ask cdecl
next.
So I want to know whether you can somehow open a stream to a shell,
and execute commands there.  Like...
$fp = fopen('/bin/bash', 'rw');
$output = fgets($fp);
fputs($fp, 'cdecl');
$output = fgets($fp);
$output = fgets($fp);
fputs($fp, 'explain char *horse');
$expl = fgets($fp);
/* Right now you could do some calculations and figure out what to do next. */
$output = fgets($fp);
fputs($fp, 'exit');
$output = fgets($fp);
fclose($fp);
Now this obviously wouldn't work, as it would overwrite the bash
executable if you had proper access, but it's just to get the idea
across.
So, does anyone know how I can do this?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Bouncer Test

2004-08-28 Thread Aidan Lister
Hello,

Another test to ensure we don't have any automatic replies or bouncing
addresses. Please don't reply, or you will be removed.

Thanks

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Object Overloading in PHP5

2004-08-28 Thread Daniel Schierbeck
Do you guys have any idea why this code:
?php
class Foo
{
private $elem = array();

public function __get ($prop)
{
if (isset($this-elem[$prop])) {
return $this-elem[$prop];
} else {
trigger_error(Property '$prop' not defined, 
E_USER_ERROR);
}
}

public function __set ($prop, $val)
{
$this-elem[$prop] = $val;
}
}
$obj= new Foo;
$obj-a  = new Foo;
$obj-a-b= Foobar;
?
returns this:
	Fatal error: Cannot access undefined property for object with 
overloaded property access in ... on line 24

Where line 24 is:
$obj-a-b= Foobar;
?
--
Daniel Schierbeck
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Variable variables

2004-08-28 Thread M. Sokolewicz
Janbro wrote:
Hi List,

I'm  using PHP5 with global variables off. I've got  around 20 dynamically
generated forms with a total of 300 different variables sent thru these
forms. I'd like to use variable variables, but according to the manual this
is not possible.
Now comes my Questoin, how do I receive my variables  which have the form
$a_123 or $a_124[]. Is there a workaround for PHP5 or PHP in general?
euh, if you're gonna do that automatically, then that's *exactly* the 
same as setting register_globals = On.

Who do I make  $data = $_REQUEST['a_123'] work ???
what's wrong with that? if it gets sent under the name 'a_123' then 
that'll work fine I don't see your problem :S

 I'd hate to set global
variables to on, as I'm dealing with sensitive data.

Thx
JanBro
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Dynamic Function with return?

2004-08-28 Thread Michal Migurski
 This code works.  It calls the function and receives the appropriate
 return value.
  But, is there a better way of doing this? It seems a bit round-a-bout.

Two options, details in the manual: call_user_func() or create_function().

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Object Overloading in PHP5

2004-08-28 Thread Stefan
It's a bug.
 * Siehe http://bugs.php.net/bug.php?id=28444 ... und ...
 *   http://news.php.net/php.bugs/63652
A workaround is possible using __call( $name, $args) { return( 
$this-__get( $name)); }. But it sucks, since constructs using array 
indices are impossible as $obj-not_existing_attr()[0]

regards
Daniel Schierbeck wrote:
Do you guys have any idea why this code:
?php
class Foo
{
private $elem = array();

public function __get ($prop)
{
if (isset($this-elem[$prop])) {
return $this-elem[$prop];
} else {
trigger_error(Property '$prop' not defined, 
E_USER_ERROR);
}
}

public function __set ($prop, $val)
{
$this-elem[$prop] = $val;
}
}

$obj = new Foo;
$obj-a = new Foo;
$obj-a-b = Foobar;
?
returns this:
Fatal error: Cannot access undefined property for object with 
overloaded property access in ... on line 24

Where line 24 is:
$obj-a-b = Foobar;
?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Object Overloading in PHP5

2004-08-28 Thread Daniel Schierbeck
Stefan wrote:
It's a bug.
 * Siehe http://bugs.php.net/bug.php?id=28444 ... und ...
 *   http://news.php.net/php.bugs/63652
A workaround is possible using __call( $name, $args) { return( 
$this-__get( $name)); }. But it sucks, since constructs using array 
indices are impossible as $obj-not_existing_attr()[0]

regards
Daniel Schierbeck wrote:
Do you guys have any idea why this code:
?php
class Foo
{
private $elem = array();
public function __get ($prop)
{
if (isset($this-elem[$prop])) {
return $this-elem[$prop];
} else {
trigger_error(Property '$prop' not defined, 
E_USER_ERROR);
}
}
public function __set ($prop, $val)
{
$this-elem[$prop] = $val;
}
}

$obj = new Foo;
$obj-a = new Foo;
$obj-a-b = Foobar;
?
returns this:
Fatal error: Cannot access undefined property for object with 
overloaded property access in ... on line 24

Where line 24 is:
$obj-a-b = Foobar;
?
%!#¤%¤%(/)((%¤%!#¤%%#!%#!¤
--
Daniel Schierbeck
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP Oficial Certification

2004-08-28 Thread Chris Shiflett
--- Yann Larrivee [EMAIL PROTECTED] wrote:
 I personally dont beleive in this. It is juste another way to make
 money ;) Every body in the indeustry should know that.

Disclaimer: I assisted in the creation of the Zend PHP Certification.

You're right - this is another way to make money. However, based on my
interpretation of what you're suggesting, I think you're wrong about where
Zend intends to make that money. You really think they're going to make a
significant amount of money from people paying to take this certification?

Zend is a major company that will grow as PHP itself grows. This
certification helps PHP in the enterprise and make it seem like a more
legitimate option for companies looking to spend a lot of money on their
Web infrastructure. It also helps the entire PHP community, whether we get
certified or not. The more PHP is used, the more demand for PHP developers
there will be, the higher the salaries will be, etc.

 PHP.net has nothing to do with it, execpt that some people from the
 php.net team help put it together.

I assume you mean the PHP Group has nothing to do with it (php.net is a
domain name with no other significance), and you're right. Of course, Zend
is a much more appropriate entity for this. I'd prefer that the PHP Group
spend their time making PHP better and better.

 Hostely, what kind of market value does the certification has? Go get
 sun certified at least it has some sort of history and value.

You should think about that for a minute (apply some good common sense).

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming Fall 2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Oficial Certification

2004-08-28 Thread Chris Shiflett
--- Yann Larrivee [EMAIL PROTECTED] wrote:
 Sorry another reply, there use to be the .geek php certification that
 was annonced on php.net then was removed right off like 2 days
 after)
 
 Was it cause of some pressure of a companie and group of people?
 You tell me.

OK, I will. No.

 It was not really professional according to me, but you cant kill the
 competition like this, well at least not in opensource world.

I'd suggest that you not speak until you know what you're talking about. I
had volunteered to assist with the DotGeek certifications, and I can tell
you that no group of people other than the PHP community itself had
anything to do with that effort being stopped. In fact, in the forum
discussion surrounding it, most people were calling for Zend to create an
official one.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming Fall 2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Oficial Certification

2004-08-28 Thread Chris Shiflett
--- John Nichel [EMAIL PROTECTED] wrote:
 Know what helps me get php jobs?  A resume that details almost 6
 years of php programming.

Disclaimer: I assisted in the creation of the Zend PHP Certification.

This is a very good point. However, and I'm speaking from experience, how
do you verify these types of statements when you're looking at more than a
hundred resumes? Zend gives me a place online to verify whether someone is
certified. With a pretty simple PHP script, I can automate this process.

What I've done in the past is have a simple online test that people take
when they apply, and this at least gives me some idea whether the
applicant is worth bringing in for an interview (or calling for a phone
interview). This has worked fairly well, but it's pretty time consuming
for me, and it definitely has problems: It has to either be very long (or
narrow in scope), I have no assurance that the applicant is the one taking
the test, and the applicant can't use these test results anywhere else.

Of course, certifications are only useful when the employer places the
right amount of value in them. I've seen certifications discussed in
several different communities over the past 10 years, and there always
seem to be extremists on both sides - certifications are worthless or
certifications will get you hired. A PHP certification only tells me that
the applicant knows PHP pretty well at a fundamental level. Whether they
can apply this knowledge, have the experience I'm looking for, have a
personality that works well in my team, and questions like these are
things I need to answer for myself in the hiring process. A certification
does not replace the need to do any work to find a good employee.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming Fall 2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Oficial Certification

2004-08-28 Thread Chris Shiflett
--- Curt Zirzow [EMAIL PROTECTED] wrote:
 OSS doesn't make a person better programmer, you can easily write
 an OSS app and still lack any knowledge of proper writting.

As a PHP security advocate for the last few years, I can tell you that
Curt is absolutely correct. In fact, poor open source applications written
in PHP are the top reason why PHP is considered insecure by the
programming community at large. This is a myth that is very difficult to
dispel, and it shows how powerful perception can be.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming Fall 2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP Oficial Certification

2004-08-28 Thread Chris Shiflett
--- Dan Joseph [EMAIL PROTECTED] wrote:
 Its good that there's a PHP Cert, PHP/Zend should endorse one.

http://www.zend.com/store/education/certification/zend-php-certification.php

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming Fall 2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Oficial Certification

2004-08-28 Thread Chris Shiflett
--- John Nichel [EMAIL PROTECTED] wrote:
 I'm not big on certs myself. How many MCSE's have we seen who can't 
 find the power switch?  ;)

This was a big concern for me when working with Zend on their
certification. Especially in the open source communities, certifications
are not considered to be very valuable, and MCSE is the top reason for
this.

Of course, we tried very hard to make this one have a fair amount of value
but not just be difficult for the sake of being difficult. I think we did
a pretty good job, but only time will tell. Regardless of whether we did a
good job with it, the perception of certifications that comes from seeing
clueless MCSEs everywhere is definitely an obstacle within the community.
Outside of the community (where the PHBs reign), this certification is
definitely a good thing for all of us.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming Fall 2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Oficial Certification

2004-08-28 Thread John Nichel
Chris Shiflett wrote:
--- John Nichel [EMAIL PROTECTED] wrote:
I'm not big on certs myself. How many MCSE's have we seen who can't 
find the power switch?  ;)

This was a big concern for me when working with Zend on their
certification. Especially in the open source communities, certifications
are not considered to be very valuable, and MCSE is the top reason for
this.
Of course, we tried very hard to make this one have a fair amount of value
but not just be difficult for the sake of being difficult. I think we did
a pretty good job, but only time will tell. Regardless of whether we did a
good job with it, the perception of certifications that comes from seeing
clueless MCSEs everywhere is definitely an obstacle within the community.
Outside of the community (where the PHBs reign), this certification is
definitely a good thing for all of us.
Chris
  I understand where you're coming from, and I'm sure with your 
involvement in the project it will be top notch.  I've always been 
impressed with your work, and am eagerly awaiting your O'Reilly book. ;) 
 There used to be a time when certifications actually meant something 
(back when I got A+ certified, it was still considered to be a good 
thing in the tech community).  Microsoft and their cookie cutter 
'engineers' have really hurt the whole value of a certification in the 
tech sector.  Those in management (non-tech) still like that piece of 
paper though, so that will help all legitimacy to PHP in that area.  The 
geeks are going to be a tougher crowd to convince though.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP Oficial Certification

2004-08-28 Thread Yann Larrivee
Well i think in a way that getting programmers certified is one thing. I
also think that there might be a need for software certification.
Where it would validate that the standars have been fallowed, check the
quality of the code, check for security, check for proper docummentation
(comments, uml, user docs)
Some what like the ISO 9002 certification but more software oriented.

I think this would help php be more accepted by large compagnies, banks
and gouvernements. It would also reassure the company that buy a
software. The problem with this it would requiert alot of work!

Certify programmers is just solving one part of the problem.
Certifying software and business is the big piece and where money will
be involed.!


On Sat, 2004-08-28 at 11:57, Chris Shiflett wrote:
 --- Yann Larrivee [EMAIL PROTECTED] wrote:
  I personally dont beleive in this. It is juste another way to make
  money ;) Every body in the indeustry should know that.
 
 Disclaimer: I assisted in the creation of the Zend PHP Certification.
 
 You're right - this is another way to make money. However, based on my
 interpretation of what you're suggesting, I think you're wrong about where
 Zend intends to make that money. You really think they're going to make a
 significant amount of money from people paying to take this certification?
 
 Zend is a major company that will grow as PHP itself grows. This
 certification helps PHP in the enterprise and make it seem like a more
 legitimate option for companies looking to spend a lot of money on their
 Web infrastructure. It also helps the entire PHP community, whether we get
 certified or not. The more PHP is used, the more demand for PHP developers
 there will be, the higher the salaries will be, etc.
 
  PHP.net has nothing to do with it, execpt that some people from the
  php.net team help put it together.
 
 I assume you mean the PHP Group has nothing to do with it (php.net is a
 domain name with no other significance), and you're right. Of course, Zend
 is a much more appropriate entity for this. I'd prefer that the PHP Group
 spend their time making PHP better and better.
 
  Hostely, what kind of market value does the certification has? Go get
  sun certified at least it has some sort of history and value.
 
 You should think about that for a minute (apply some good common sense).
 
 Chris
 
 =
 Chris Shiflett - http://shiflett.org/
 
 PHP Security - O'Reilly
  Coming Fall 2004
 HTTP Developer's Handbook - Sams
  http://httphandbook.org/
 PHP Community Site
  http://phpcommunity.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Why won't my echo won't work? [newbie question]

2004-08-28 Thread Bestman4unowwa
The first two of these 3 echo statements work. But my last echo doesn't. 'username' is 
the name of the element I want to echo. To the right of each is what I see echoed.

echo $_SERVER['REQUEST_METHOD'];  echos - POST
echo $_POST;  echos - Array
echo $_POST['username'];  echos - nothing

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP/MySQL fatal error

2004-08-28 Thread gc
Please accept my appologies, it won't happen again. I didn't realize. I must
have missed this in the welcome message. 

gene

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 27, 2004 11:00 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP/MySQL fatal error


On Saturday 28 August 2004 09:43, gc wrote:
 Hi all,

 I'm Gene Candelaria and I'm a PHP and MySQL newbie.

You have started a new thread by taking an existing posting and replying to
it while you changed the subject.

That is bad, because it breaks threading. Whenever you reply to a message,
your mail client generates a References: header that tells all recipients
which posting(s) your posting refers to. A mail client uses this information
to build a threaded view (tree view) of the postings.

With your posting style you successfully torpedoed this useful feature; your
posting shows up within an existing thread it has nothing to do with.

Always do a fresh post when you want to start a new thread. To achieve this,
click on New message instead of Reply within your mail client, and enter
the list address as the recipient. You can save the list address in your
address book for convenience.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Why won't my echo won't work? [newbie question]

2004-08-28 Thread John Nichel
[EMAIL PROTECTED] wrote:
The first two of these 3 echo statements work. But my last echo doesn't. 'username' is 
the name of the element I want to echo. To the right of each is what I see echoed.
echo $_SERVER['REQUEST_METHOD'];  echos - POST
echo $_POST;  echos - Array
echo $_POST['username'];  echos - nothing
How are you setting $_POST['username']?  Let's see the code for the form.
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Why won't my echo won't work? [newbie question]

2004-08-28 Thread Bestman4unowwa
John,

Thanks for the reply. It is done in software called ToolBook, runs in windows.

The toolbook translates to dhtml and then is executed froma browser.  The command in 
toolbook for the data is:

Set HTTP POST parameter username to ahttptest

I don't expect anyone to know ToolBook, but everything else seems to work as far as 
getting a post array from the HTTP communications but I'm struggling to render the 
data from it.

I guess I was hoping someone would see something wrong with the way I coded the echo 
statement.

Dennis

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Oficial Certification

2004-08-28 Thread Chris Shiflett
--- John Nichel [EMAIL PROTECTED] wrote:
I understand where you're coming from, and I'm sure with your 
 involvement in the project it will be top notch. I've always been 
 impressed with your work, and am eagerly awaiting your O'Reilly
 book. ;)

Thanks for the compliments. :-)

I'm behind schedule on the book but am working very hard on it right now.
It should hit shelves by the end of the year at least. In the meantime, I
did write a lot of stuff down in a PDF:

http://shiflett.org/php-security.pdf

It's certainly not complete, since this was just the workbook for a 3 hour
tutorial I gave at OSCON, but it has a few important topics. Plus, it's
free. :-)

 Those in management (non-tech) still like that piece of paper
 though, so that will help all legitimacy to PHP in that area. The
 geeks are going to be a tougher crowd to convince though.

Yeah, and being a part of the geek crowd, I'm more interested in what my
peers think. :-)

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming Fall 2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Why won't my echo won't work? [newbie question]

2004-08-28 Thread John Nichel
[EMAIL PROTECTED] wrote:
John,
Thanks for the reply. It is done in software called ToolBook, runs in windows.
The toolbook translates to dhtml and then is executed froma browser.  The command in 
toolbook for the data is:
Set HTTP POST parameter username to ahttptest
I don't expect anyone to know ToolBook, but everything else seems to work as far as 
getting a post array from the HTTP communications but I'm struggling to render the 
data from it.
I guess I was hoping someone would see something wrong with the way I coded the echo 
statement.
Dennis

Try this on the page receiving the post data...
echo ( pre );
print_r ( $_POST );
echo ( /pre );
And you'll see exactly what it's sending thru.  Maybe it's sending a 
numerical array instead of an associative array.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP Oficial Certification

2004-08-28 Thread John Nichel
Chris Shiflett wrote:
--- John Nichel [EMAIL PROTECTED] wrote:
  I understand where you're coming from, and I'm sure with your 
involvement in the project it will be top notch. I've always been 
impressed with your work, and am eagerly awaiting your O'Reilly
book. ;)

Thanks for the compliments. :-)
I'm behind schedule on the book but am working very hard on it right now.
It should hit shelves by the end of the year at least. In the meantime, I
did write a lot of stuff down in a PDF:
http://shiflett.org/php-security.pdf
It's certainly not complete, since this was just the workbook for a 3 hour
tutorial I gave at OSCON, but it has a few important topics. Plus, it's
free. :-)
Yeah, I grabbed that last week or so, and printed it out.  Some of the 
items I've seen posted to this list (either by you, or that damn Holmes 
guy ;)  But there were quite a few points that made be go back and check 
my code.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Why won't my echo won't work? [newbie question]

2004-08-28 Thread Bestman4unowwa
Thanks, I'll give it a try.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Why won't my echo won't work? [newbie question]

2004-08-28 Thread Bestman4unowwa
John, Thanks for your help. I got it all to work. In my toolbook set parameter stmt I 
needed to put quotes around username - username. No where is this documented in 
ToolBook.

Thnaks for your help!

Dennis

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Variable variables

2004-08-28 Thread Justin Patrin
On Sat, 28 Aug 2004 11:43:13 +0200, JanBro [EMAIL PROTECTED] wrote:
 Hi List,
 
 I'm  using PHP5 with global variables off. I've got  around 20 dynamically
 generated forms with a total of 300 different variables sent thru these
 forms. I'd like to use variable variables, but according to the manual this
 is not possible.
 
 Now comes my Questoin, how do I receive my variables  which have the form
 $a_123 or $a_124[]. Is there a workaround for PHP5 or PHP in general?
 
 Who do I make  $data = $_REQUEST['a_123'] work ??? I'd hate to set global
 variables to on, as I'm dealing with sensitive data.
 

Your question makes absolutely no sense. You can do $_REQUEST['a_123']
just fine. If what you want is to loop through them...
foreach($_REQUEST as $key = $val) {
  //
}

or

foreach($variableNames as $var) {
  $_REQUEST[$var]
}

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dynamic HTML Creation

2004-08-28 Thread Sam Hobbs
Justin Patrin [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 On Fri, 27 Aug 2004 23:17:29 -0700, Sam Hobbs [EMAIL PROTECTED]
wrote:
  Is it possible to use the DOM to add (HTML) elements to a page at the
time
  the page is being shown? The HTML and VBScript shown below is a
simplified
  version of what I need to do but of course I need to do it in PHP. Since
PHP
  is server-side (right?) perhaps it is not possible.
 

 You're right, it's not possible. You'd have to create the whole page
 with DOM and output it at the end.

 You may be able to use DOM to make a specific piece and inject it
 You could always just use JavaScript to inject things as wel.

Thank you. You understand the question. I am not sure of the details of what
you were suggesting, but that is not important. The general idea is probably
what I will do.

This is for osCommerce, which is a shopping cart system written in PHP. Many
of it's pages (the HTML) are not modifiable directly using a WYSIWYG editor,
which make the content difficult to modify, especially for non-technical
people. So what I can do is to make a page that is stored as a HTML page and
then in a separate PHP script add stuff (in this situation, it is left
and/or right menu columns) using the DOM. Since the system is written using
PHP, this improvement should also use PHP. I think PHP will do quite well
using it in this manner yet the system (osCommerce) can be easier to use.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dynamic HTML Creation

2004-08-28 Thread Sam Hobbs
Ramil Sagum [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

 Yes, it is possible. And you are right,  PHP is a server side
 language. In addition to PHP,
 use a client-side scripting language (like JavaScript). JavaScript
 also has functions for accessing the DOM (createElement and
 getElementByID).

I have used so many languages that for me the differences between VBScript
and JavaScript is insignificant. Yes, I know that JavaScript will work too,
essentially the same (for me) as VBScript.

The question is not whether it cn be done using a non-PHP language; the
question only is if it can be done using PHP. The answer is no; at least not
using the design I asked about. At the time that PHP executes, the HTML is
still incomplete, right? More specifically, the HTML document is not
available (to PHP) to be accessed by the DOM. It is the document object that
is a critical part of the design in my original question.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] html tabs

2004-08-28 Thread Michael Gale
Hello

I was working on a web site that will be using TABS, the page will have
three TABS. 

All the data will be dynamic on all the pages, the first tab will be a
search page. After submit is hit the page will be reloaded to display
the results. 

Each result will be a link to detailed information about the result you
clicked on. Can I make is so the link loads the page in the second tab ?

Thanks.


-- 
Hand over the Slackware CD's and back AWAY from the computer, your geek
rights have been revoked !!!

Michael Gale
Slackware user :)
Bluesuperman.com 


-- 
Hand over the Slackware CD's and back AWAY from the computer, your geek
rights have been revoked !!!

Michael Gale
Slackware user :)
Bluesuperman.com 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dynamic HTML Creation

2004-08-28 Thread Sam Hobbs
Read the original question again; it is quite clear about the relevance to
PHP.


Jason Davidson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 its possible to add HTML elements with DOM, im not sure what it has to
 do with php though?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dynamic HTML Creation

2004-08-28 Thread Jason Davidson
I suppose it was too much to ask for some clearification.  I hope
someone else helps you.  Good luck, by they way, the difference between
VBScript and Javascript is monumental when using Gecko based browsers.

Jason

Sam Hobbs [EMAIL PROTECTED] wrote: 
 
 Read the original question again; it is quite clear about the relevance to
 PHP.
 
 
 Jason Davidson [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  its possible to add HTML elements with DOM, im not sure what it has to
  do with php though?
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] html tabs

2004-08-28 Thread Brent Clements
One suggestion that I have is to use curl to get the web page that you want,
put that into a buffer variable and then when you click on the link to the
second page, you would then output the variable to the page.

-Brent

- Original Message - 
From: Michael Gale [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, August 28, 2004 12:05 AM
Subject: [PHP] html tabs


 Hello

 I was working on a web site that will be using TABS, the page will have
 three TABS.

 All the data will be dynamic on all the pages, the first tab will be a
 search page. After submit is hit the page will be reloaded to display
 the results.

 Each result will be a link to detailed information about the result you
 clicked on. Can I make is so the link loads the page in the second tab ?

 Thanks.


 -- 
 Hand over the Slackware CD's and back AWAY from the computer, your geek
 rights have been revoked !!!

 Michael Gale
 Slackware user :)
 Bluesuperman.com


 -- 
 Hand over the Slackware CD's and back AWAY from the computer, your geek
 rights have been revoked !!!

 Michael Gale
 Slackware user :)
 Bluesuperman.com

 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Newbie. Posting to backend MySQL database

2004-08-28 Thread Aidan
Please help, I'm tearing what remains of my hair out here.
I've got a MySQL database where I've defined one of the table fields as an
integer.
Using PSP I've passed a session variable and can echo it to the screen using
?php echo intval($clin_id) ?.  So the session variable exists and can be
echoed
I now want to pass this session variable to the database into the field I've
defined as an integer

I've set up a form to submit other variables to the backend database and
they all work apart from this field.

I'm using a hidden field to pass the variable and I am using

input name=p_clin_id type=hidden id=p_clin_id
value=intval('$clin_id')

What I don't understand is that if I can echo the variable what am I missing
in formatting a sessio variable to make it passable to the database.  It mus
be something basic and I've looked through several books (from where I got
the intval function) but obviously in the wrong place.

I would be grateful for any advice.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Newbie. Posting to backend MySQL database

2004-08-28 Thread M. Sokolewicz
Aidan wrote:
Please help, I'm tearing what remains of my hair out here.
I've got a MySQL database where I've defined one of the table fields as an
integer.
Using PSP I've passed a session variable and can echo it to the screen using
?php echo intval($clin_id) ?.  So the session variable exists and can be
echoed
I now want to pass this session variable to the database into the field I've
defined as an integer
I've set up a form to submit other variables to the backend database and
they all work apart from this field.
I'm using a hidden field to pass the variable and I am using
input name=p_clin_id type=hidden id=p_clin_id
value=intval('$clin_id')
that line doesn't make any sense to me... what are you doing there? 
you're freely mixing PHP and HTML without denoting what is what.
an example that WOULD work would be:
echo 'input name=p_clin_id type=hidden id=p_clin_id 
value='.intval($clin_id).'';

or maybe
?
input name=p_clin_id type=hidden id=p_clin_id
 value=?php echo intval($clin_id);?
?php
So, mixing HTML and PHP without denoting what is what is the first 
mistake. The second one is the actual function call:
intval('$clin_id');

Now, when you put something between SINGLE quotes, it is read LITERALLY, 
meaning it *will not* substitute variables for their value. eg:
echo '$clin_id';

will output:
$clin_id
However,
echo $clin_id;
will output the VALUE of $clin_id (eg. 12)
So, I think that instead of
intval('$clin_id') you actually meant intval($clin_id), or, cleaner, 
intval($clin_id) (since intval isn't expecting a string anyway, and even 
if it were, it would change it to one itself. No need to do extra work 
for nothing.)

The 3rd point about this all... if you get the value from the database, 
and it's an integer there, then why are you converting it to an integer 
AGAIN?? :| just using $clin_id instead of intval($clin_id) is surely 
faster (seen as no extra functions need to be called).

What I don't understand is that if I can echo the variable what am I missing
in formatting a sessio variable to make it passable to the database.  It mus
be something basic and I've looked through several books (from where I got
the intval function) but obviously in the wrong place.
I would be grateful for any advice.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: Newbie. Posting to backend MySQL database

2004-08-28 Thread Jason Davidson
If you just need to put it in the database, you dont need a form to do
that.. 
just open a connection to your db, and query it in. 

read about mysql functions in the php manual.. specifically
mysql_connect, mysql_select_db and mysql_query
, i beleive there is a functional example of all you need on the
introduction page for the mysql functions in the manual.

Jason


M. Sokolewicz [EMAIL PROTECTED] wrote: 
 
 Aidan wrote:
  Please help, I'm tearing what remains of my hair out here.
  I've got a MySQL database where I've defined one of the table fields as an
  integer.
  Using PSP I've passed a session variable and can echo it to the screen using
  ?php echo intval($clin_id) ?.  So the session variable exists and can be
  echoed
  I now want to pass this session variable to the database into the field I've
  defined as an integer
  
  I've set up a form to submit other variables to the backend database and
  they all work apart from this field.
  
  I'm using a hidden field to pass the variable and I am using
  
  input name=p_clin_id type=hidden id=p_clin_id
  value=intval('$clin_id')
 that line doesn't make any sense to me... what are you doing there? 
 you're freely mixing PHP and HTML without denoting what is what.
 an example that WOULD work would be:
 echo 'input name=p_clin_id type=hidden id=p_clin_id 
 value='.intval($clin_id).'';
 
 or maybe
 ?
 input name=p_clin_id type=hidden id=p_clin_id
   value=?php echo intval($clin_id);?
 ?php
 
 So, mixing HTML and PHP without denoting what is what is the first 
 mistake. The second one is the actual function call:
 intval('$clin_id');
 
 Now, when you put something between SINGLE quotes, it is read LITERALLY, 
 meaning it *will not* substitute variables for their value. eg:
 echo '$clin_id';
 
 will output:
 $clin_id
 
 However,
 echo $clin_id;
 will output the VALUE of $clin_id (eg. 12)
 
 So, I think that instead of
 intval('$clin_id') you actually meant intval($clin_id), or, cleaner, 
 intval($clin_id) (since intval isn't expecting a string anyway, and even 
 if it were, it would change it to one itself. No need to do extra work 
 for nothing.)
 
 The 3rd point about this all... if you get the value from the database, 
 and it's an integer there, then why are you converting it to an integer 
 AGAIN?? :| just using $clin_id instead of intval($clin_id) is surely 
 faster (seen as no extra functions need to be called).
 
  
  What I don't understand is that if I can echo the variable what am I missing
  in formatting a sessio variable to make it passable to the database.  It mus
  be something basic and I've looked through several books (from where I got
  the intval function) but obviously in the wrong place.
  
  I would be grateful for any advice.
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] UPdated chm and extended chm docs?

2004-08-28 Thread CSN
When are the chm (last updated Apr. 18, 2004) and
extended chm (last updated Sep. 6, 2003) docs likely
to be updated?

CSN

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] SOAP speed

2004-08-28 Thread FrzzMan
Hello,
I'm developing some site that will share the same UserDB, because these 
site are quite large in scale so I decided to host it on different servers.

Each site will have it own cache of active user on the site, so the user 
wont' have to be authenticated every request (will be a pain in the a$$ 
I'm sure), the cache will be cleared when the session time out.

But since I don't have much experience with these kind of distributed 
authenticate process with SOAP, so I wonder how long it will take to 
receive the response from the UserDB server using SOAP.

There's a change that the site server will be located @ Europe, while 
the UserDB server will be located @ US (for global access).

If the transmission time is about 1, 2 or even 3 secs, I think it 
acceptable. btw, do you have any experience about this?

TIA
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] SOAP speed

2004-08-28 Thread Brent Clements
This isn't really answer to your question, but to possibly simplify your
authentication mechanism, you ought to take a look at the pear package
Liveuser which allows you to have somewhat of a distributed authentication
architecture.
Check out http://pear.php.net/package/LiveUser

-Brent

- Original Message - 
From: FrzzMan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, August 28, 2004 4:55 PM
Subject: [PHP] SOAP speed


 Hello,

 I'm developing some site that will share the same UserDB, because these
 site are quite large in scale so I decided to host it on different
servers.

 Each site will have it own cache of active user on the site, so the user
 wont' have to be authenticated every request (will be a pain in the a$$
 I'm sure), the cache will be cleared when the session time out.

 But since I don't have much experience with these kind of distributed
 authenticate process with SOAP, so I wonder how long it will take to
 receive the response from the UserDB server using SOAP.

 There's a change that the site server will be located @ Europe, while
 the UserDB server will be located @ US (for global access).

 If the transmission time is about 1, 2 or even 3 secs, I think it
 acceptable. btw, do you have any experience about this?

 TIA

 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP Oficial Certification

2004-08-28 Thread Ed Lazor
 -Original Message-
 Of course, we tried very hard to make this one have a fair amount of value
 but not just be difficult for the sake of being difficult. 

Why not offer multiple PHP certifications varied by topic and complexity?

Will certs expire?

=)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP Oficial Certification

2004-08-28 Thread Ed Lazor
 Well i think in a way that getting programmers certified is one thing. I
 also think that there might be a need for software certification.
 Where it would validate that the standars have been fallowed, check the
 quality of the code, check for security, check for proper docummentation
 (comments, uml, user docs)
 Some what like the ISO 9002 certification but more software oriented.

It sounds like you're describing what I'd expect to see from someone with an
IS / IT degree.

-Ed

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Fatal error: Call to undefined function

2004-08-28 Thread gc
Let me try this again,

I'm Gene Candelaria and I'm a PHP and MySQL newbie. I have a feeling a lot
of you may have seen this before. I'm teaching myself
PHP/MySQL and trying to setup a guestbook. I'm running latest versions of
Apache, PHP and MySql on WIN 2000. PHP is installed from the zip file. When
serving php docs (code snippets below) I get the messages:

Fatal error: Call to undefined function mysql_connect() 
Fatal error: Call to undefined function mysql_pconnect() 

I've been reading and searching and trying all sorts of things to fix this
and can't find the solution. I've removed the comment from the line
extension=php_mysql.dll in php.ini. (Below is the MySQL section of
php.ini. It's pretty standard, I'm using defaults.) I edited my Apache
config file with the needed lines:

### Section 4: PHP 5 Module
#
ScriptAlias /cgi-bin/ C:/Program Files/Apache
Group/Apache2/cgi-bin/
LoadModule php5_module php/php5apache2.dll
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
PHPIniDir C:/Program Files/Apache Group/Apache2/PHP

When I run phpinfo, MySQL is not listed. Do I need to enable it in the
configure command? How do I edit the configure command. Per phpinfo, It now
reads:

Configure Command cscript /nologo configure.js --with-gd=shared
--enable-snapshot-build 

I read these comments: 

Ok, your php.ini file is set to 'on' for mysql.allow_persistent, but
is
mysql really enabled? Does your configure command look something
like
this?
'./configure'
'--with-mysql=/usr/local/mysql'

If you don't have --with-mysql it means that you cannot use mysql
functions,
so compile PHP again with this option.


How do I edit that pesky configure command. I searched, but couldn't find an
answer. So, where am I going wrong? Thanks for reading and big thanks for
any help.

gene
[EMAIL PROTECTED]


php.ini snippet (comments removed for easier reading:
[MySQL]
mysql.allow_persistent = On
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port =
mysql.default_socket =
mysql.default_host =
mysql.default_user =
mysql.default_password =
mysql.connect_timeout = 60
mysql.trace_mode = Off 


guest.php code snippet:
//connect 
// change localhost to your db host name 
mysql_pconnect( http://aulon.dyndns.org/;, $username, $password) 
or die( Unable to connect to SQL server); 
mysql_select_db( $db_name) or die( Unable to select database); 
guestbook.php code snippet:
// Connect to DB
$li = mysql_connect($dbHost, $dbUser, $dbPass) or die(Could not connect);
mysql_select_db($dbDatabase, $li) or die (could not select DB); 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] php and SMS

2004-08-28 Thread grahama
I want to send SMS Text messages to cell phones from my server app
I would also like cell phones to be able to send text messages back to 
my app

how does one go about doing this ?
Can I do a 'get' or a 'post' to some kind of sms gateway url ?
does anyone know what the costs are for something like this ?
just getting into this...so any help would be appretiated
g
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Fatal error: Call to undefined function

2004-08-28 Thread Justin Patrin
On Sat, 28 Aug 2004 16:57:27 -0700, gc [EMAIL PROTECTED] wrote:
 Let me try this again,
 
 I'm Gene Candelaria and I'm a PHP and MySQL newbie. I have a feeling a lot
 of you may have seen this before. I'm teaching myself
 PHP/MySQL and trying to setup a guestbook. I'm running latest versions of
 Apache, PHP and MySql on WIN 2000. PHP is installed from the zip file. When
 serving php docs (code snippets below) I get the messages:
 
 Fatal error: Call to undefined function mysql_connect() 
 Fatal error: Call to undefined function mysql_pconnect() 
 

You need to enable the mysql dll in your php.ini

 I've been reading and searching and trying all sorts of things to fix this
 and can't find the solution. I've removed the comment from the line
 extension=php_mysql.dll in php.ini. (Below is the MySQL section of
 php.ini. It's pretty standard, I'm using defaults.) I edited my Apache
 config file with the needed lines:
 
 ### Section 4: PHP 5 Module
 #
 ScriptAlias /cgi-bin/ C:/Program Files/Apache
 Group/Apache2/cgi-bin/
 LoadModule php5_module php/php5apache2.dll
 AddType application/x-httpd-php .php
 AddType application/x-httpd-php-source .phps
 PHPIniDir C:/Program Files/Apache Group/Apache2/PHP
 
 When I run phpinfo, MySQL is not listed. Do I need to enable it in the
 configure command? How do I edit the configure command. Per phpinfo, It now
 reads:
 
 Configure Command cscript /nologo configure.js --with-gd=shared
 --enable-snapshot-build
 
 I read these comments:
 
 Ok, your php.ini file is set to 'on' for mysql.allow_persistent, but
 is
 mysql really enabled? Does your configure command look something
 like
 this?
 './configure'
 '--with-mysql=/usr/local/mysql'
 
 If you don't have --with-mysql it means that you cannot use mysql
 functions,
 so compile PHP again with this option.
 
 How do I edit that pesky configure command. I searched, but couldn't find an
 answer. So, where am I going wrong? Thanks for reading and big thanks for
 any help.
 
 gene
 [EMAIL PROTECTED]
 
 php.ini snippet (comments removed for easier reading:
 [MySQL]
 mysql.allow_persistent = On
 mysql.max_persistent = -1
 mysql.max_links = -1
 mysql.default_port =
 mysql.default_socket =
 mysql.default_host =
 mysql.default_user =
 mysql.default_password =
 mysql.connect_timeout = 60
 mysql.trace_mode = Off
 
 guest.php code snippet:
 //connect
 // change localhost to your db host name
 mysql_pconnect( http://aulon.dyndns.org/;, $username, $password)
 or die( Unable to connect to SQL server);
 mysql_select_db( $db_name) or die( Unable to select database);
 guestbook.php code snippet:
 // Connect to DB
 $li = mysql_connect($dbHost, $dbUser, $dbPass) or die(Could not connect);
 mysql_select_db($dbDatabase, $li) or die (could not select DB);
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 !DSPAM:4130ba8d143217233713689!
 
 


-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php and SMS

2004-08-28 Thread Chris Shiflett
--- [EMAIL PROTECTED] wrote:
 I want to send SMS Text messages to cell phones from my server app
 I would also like cell phones to be able to send text messages back to 
 my app how does one go about doing this?

This was done recently for Midnight Madness. The information given by the
developer is as follows:

The SMS server was quite simple really. I borrowed a Sierra Wireless
Aircard 750 from a friend. This is basically a GSM/GPRS cellphone in
PCMCIA card package. The same type of setup can be done with any GSM
cellphone and a serial cable attaching it to a pc.

I used a software called NowSMS which is free for 60 days. It has a lot
of features but I only used one, which is executing a program everytime an
sms message comes in with the message as a command line argument. It then
sends as a reply anything that the program writes to standard output.

Then I wrote two pieces of software. One is the main game application
that keeps track of all the teams, the combination guesses, the hints,
etc. This program also has a sockets server running that waits for
incoming sms messages. The second piece of software is a little sockets
client that the NowSMS software executes when it gets a message. The
client program sends the message to the main application, writes the
response to standard out and exits. Everything is multi-threaded in case
the sms messages overlap, but I don't think this ever happens.

Hope that helps.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming Fall 2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php and SMS

2004-08-28 Thread raditha dissanayake
[EMAIL PROTECTED] wrote:
I want to send SMS Text messages to cell phones from my server app
I would also like cell phones to be able to send text messages back to 
my app

how does one go about doing this ?
Can I do a 'get' or a 'post' to some kind of sms gateway url ?
Goto kannel.org and download their sms gateway. This is an excellent 
open source product. In that download bundle you will find some PHP 
scripts (among other things) that does all this for you.

--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Simultaneus execution

2004-08-28 Thread Andrew
Hello guys,

Do anyone have an idea how to execute 2 different functions in the same
moment, no matter if they're system or custom ones. For example, how can I
execute 2 different loops simultaneously?

--
Regards, Andrew
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Fatal error: Call to undefined function

2004-08-28 Thread John Nichel
gc wrote:
snip-a-roo
It's been awhile since I've done php on Windows, but I think you have to 
uncomment the mysql dll in the php.ini file (make sure you're editing 
the right one as per phpinfo), and restart your web server.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Fatal error: Call to undefined function

2004-08-28 Thread gc
Thanks, John. I have the line uncommented, am editing php.ini in my winnt
directory and have restarted the server. No magic, yet. 

Thanks again.
g

-Original Message-
From: John Nichel

gc wrote:
snip-a-roo

It's been awhile since I've done php on Windows, but I think you have to 
uncomment the mysql dll in the php.ini file (make sure you're editing 
the right one as per phpinfo), and restart your web server.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Loading php_domxml.dll

2004-08-28 Thread Sam Hobbs
I am using PHP 4.3.4 with Windows XP and Apache 2.

I can't get php_domxml.dll loaded. I have searched for answers and tried
many things.

The file:

S:\Software\php-4.3.4-Win32\extensions\php_domxml.dll

exists. In my php.ini, I have tried setting extension_dir to many values,
including:

extension_dir = S:\Software\php-4.3.4-Win32\extensions

When I restart Apache I always get a Unable to load (message box) message
that says:

Unknown(): Unable to load dynamic library
'S:\Software\php-4.3.4-Win32\extensions\php_domxml.dll' - The specified
module could not be found.

Of course, the path that is shown is whatever I have set extension_dir to.
When the php script gets to the line that I use DomDocument, it says it
Cannot instantiate non-existent class: domdocument. When I execute php
from the command line, I get a (message box) message saying that iconv.dll
cannot be loaded, then the Unable to load message, such as the following:

S:\Software\php-4.3.4-Win32php -v
PHP Warning:  Unknown(): Unable to load dynamic library
'S:\Software\php-4.3.4-Win32\extensions\php_domxml.dll' - The specified
module could not be found.
 in Unknown on line 0
PHP 4.3.4 (cgi-fcgi) (built: Nov  2 2003 23:47:22)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Fatal error: Call to undefined function

2004-08-28 Thread Philip Olson
  It's been awhile since I've done php on Windows, but I think 
  you have to uncomment the mysql dll in the php.ini file (make 
  sure you're editing the right one as per phpinfo), and restart 
  your web server. 

 Thanks, John. I have the line uncommented, am editing php.ini in my winnt
 directory and have restarted the server. No magic, yet. 

And make sure libmysql.dll is available in your systems PATH
and a nice way to do that is adding the PHP dir to your PATH
but a less cool way would be to copy libmysql.dll into the
Windows sytem directory because that directory is in the
PATH.  Don't do that though..

The manual talks about all of this, read the installation
section:

  http://php.net/manual/en/install.windows.manual.php

It says how to set your PATH (via system environmetn variables)
and the MySQL documentation also refers to all of this:

  http://www.php.net/mysql

Both of the above manual pages link to related FAQs so read
those as well.

Regards,
Philip

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Simultaneus execution

2004-08-28 Thread Jason Wong
On Sunday 29 August 2004 09:56, Andrew wrote:

 Do anyone have an idea how to execute 2 different functions in the same
 moment, no matter if they're system or custom ones. For example, how can I
 execute 2 different loops simultaneously?

I'm curious at what you're trying to achieve. Could you elaborate?

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
QOTD:
What do you mean, you had the dog fixed?   Just what made you
think he was broken!
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Fatal error: Call to undefined function

2004-08-28 Thread gc
Thanks for the help, Phollip. Yes, I did read and follow the instructions in
the manual and the faq. I did edit my path and restarted my system. Same
result.

g

-Original Message-
From: Philip Olson [mailto:[EMAIL PROTECTED] 
Sent: Saturday, August 28, 2004 7:11 PM
To: gc
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Fatal error: Call to undefined function


  It's been awhile since I've done php on Windows, but I think 
  you have to uncomment the mysql dll in the php.ini file (make 
  sure you're editing the right one as per phpinfo), and restart 
  your web server. 

 Thanks, John. I have the line uncommented, am editing php.ini in my winnt
 directory and have restarted the server. No magic, yet. 

And make sure libmysql.dll is available in your systems PATH
and a nice way to do that is adding the PHP dir to your PATH
but a less cool way would be to copy libmysql.dll into the
Windows sytem directory because that directory is in the
PATH.  Don't do that though..

The manual talks about all of this, read the installation
section:

  http://php.net/manual/en/install.windows.manual.php

It says how to set your PATH (via system environmetn variables)
and the MySQL documentation also refers to all of this:

  http://www.php.net/mysql

Both of the above manual pages link to related FAQs so read
those as well.

Regards,
Philip

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dynamic HTML Creation

2004-08-28 Thread Ramil Sagum
On Sat, 28 Aug 2004 12:30:48 -0700, Sam Hobbs [EMAIL PROTECTED] wrote:
 This is for osCommerce, which is a shopping cart system written in PHP. Many
 of it's pages (the HTML) are not modifiable directly using a WYSIWYG editor,
 which make the content difficult to modify, especially for non-technical
 people. So what I can do is to make a page that is stored as a HTML page and
 then in a separate PHP script add stuff (in this situation, it is left
 and/or right menu columns) using the DOM. Since the system is written using
 PHP, this improvement should also use PHP. I think PHP will do quite well
 using it in this manner yet the system (osCommerce) can be easier to use.

Ah. You should have said this in your first mail (which was
confusing). It now becomes clear. I think what you are looking for is
a template engine, like smarty

http://smarty.php.net/

given a template :
-
body
User Information:p
Name: {$name}br
Address: {$address}br
/body
-
and the php code:

$smarty = new Smarty;
$smarty-assign('name', 'george smith');
$smarty-assign('address', '45th  Harris');
$smarty-display('index.tpl');

I think you can already see what this does. The non-technical people
can edit the pages (as long as they leave the placemarkers for the
output). The PHP-people can edit the code without worrying about the
page layout (as long as the markers are there).

I hope this helps.


(code was taken from http://smarty.php.net/crashcourse.php)




ramil

http://ramil.sagum.net

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] 5.0.1 broke mbstring regex?

2004-08-28 Thread Miles Keaton
I just upgraded PHP from 5.0 to 5.0.1 on a FreeBSD box.

But unfortunately it seemed to break the regex features of mbstring

At startup and every time I try to run PHP I get this:

PHP Warning:  PHP Startup: Unable to load dynamic library
'/usr/local/lib/php/20040412/mbstring.so' -
/usr/local/lib/php/20040412/mbstring.so: Undefined symbol
quot;zif_mb_regex_encodingquot; in Unknown on line 0

Anyone heard of this problem or suggest a solution?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Download installer not found [***SPAM***] **SPAM USA 64.246.30.37 BODY**

2004-08-28 Thread DevX
Hi,
I click PHP 5.0.1 installer 
http://www.php.net/get/php-5.0.1-installer.exe/from/a/mirror link 
download at http://www.php.net/get/php-5.0.1-installer.exe/from/a/mirror .
But i see download not found.

 Download not found
This mirror site is improperly setup, and thus has no copy of the 
executable file you requested. Please select a different mirror site 
http://th.php.net/mirrors to get the file, until this site gets fixed.

same PHP 4.3.8 installer 
http://www.php.net/get/php-4.3.8-installer.exe/from/a/mirror 
link,please fix.

Yingyos Santiprasert


Re: [PHP] Dynamic HTML Creation

2004-08-28 Thread Sam Hobbs
Ramil Sagum [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

 Ah. You should have said this in your first mail (which was
 confusing). It now becomes clear. I think what you are looking for is
 a template engine, like smarty

 http://smarty.php.net/


If Smarty is a good solution that the other osCommerce users and developers
agree is useful, then yes, I should have said more in my original question.
If however Smarty is not a good solution for osCommerce, then explaining
that I am modifying osCommerce would have been confusing and distracting.

I like the idea of separating the UI from the program. Programmers and
software designers have been doing that for many years. It is usually easier
to keep the UI separate from the processing and then have tags of some type
in the UI that allows the processing to put data into the UI and pluck it
out. That type of thing can be done using HTML too. There are some
disadvantages of using HTML and the DOM but I suspect there are limitations
of Smarty too. If it is possible to use HTML and the DOM then there are
significant advantages to using an existing standard that is in common use.

If a web site is hosted in a server owned by someone else and if the
server's owner (which includes the employees) must install Smarty befor it
can be used, then that is a critical disadvantage of Smarty.

So do you know of specific advantages of Smarty compated to using the HTML
and DOM standards? Without spending a lot of time to learn Smarty, it is
difficult for me to see the advantages.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php