Re: [PHP] [PHP5RC3] echo $this-db-host not work

2004-07-12 Thread Michal Migurski
echo $this-db-host; // will output localhost but echo $this-db-host ; // whill output Object id #2-host is that a bug. or just have to workout by myself? http://www.php.net/manual/en/language.types.string.php#language.types.string.parsing.complex

Re: [PHP] [PHP5RC3] echo $this-db-host not work

2004-07-12 Thread Chris
Try enclosing the variable in Curly Braces echo {$this-db-host} ; Otherwise, the string parser sees $this-db as the variable you're referring to. Chris Tomasen wrote: assume $this-db is an object. $db-host is a string localhost. ehco $this-db-host; // will output localhost but ehco

[PHP] Re: Running a PHP script on an automated regular schedule

2004-07-12 Thread Henry Grech-Cini
You may also want to look at wget as a way of invoking your PHP script if command line support is not available. Henry I.A. Gray [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi. I am wanting to use a PHP script to check on an hourly/daily basis on a few things- ie links on my

Re: [PHP] Re: [Q] Why does my php file gets displayed instead of executed

2004-07-12 Thread Marek Kilimajer
Could it be that php files are not executed for POST method? Michael T. Peterson wrote: Per request, here are the two other source files that get executed prior to the invocation of validate_member_login.php, index.php and init.php. But first, here's a simple restatement of the problem: (1) Direct

[PHP] Re: unset empty elements in an array

2004-07-12 Thread Thomas Seifert
On Mon, 12 Jul 2004 15:33:53 +1000, Justin French wrote: Hi, Looking for a one-liner to delete all empty elements in an array. I know I can do it with a foreach loop, but I'm hoping that I've missed an existing function in the manual which may already do this, or a simple one-liner to

[PHP] Re: installing 4.3.x and 5.x

2004-07-12 Thread Thomas Seifert
On Sun, 11 Jul 2004 23:17:04 -0400, Alex Duggan wrote: Hello, Is it possible to build php-4.3.x and php-5.0.0RC3 both as static modules into apache-1.3? If so, can the two version of php be installed in the same prefix? or should they be installed in /usr/local/php4 and /usr/local/php5?

[PHP] HTML and PHP output to PHP variable

2004-07-12 Thread Maris
Hi! Let's say my index.php consists of the following: ? include(header.inc); echo pPHP says Hello World/p; ? pHTML says Hello World/p ? //.. some other php code that generates output... ? ..some other HMTL output.. My question is: how can I make the whole index.php generated output put in one

Re: [PHP] HTML and PHP output to PHP variable

2004-07-12 Thread Miroslav Hudak (php/ml)
hello! use output buffering... ?php ob_start(); //... your code here $_contents = ob_get_contents(); ob_end_clean(); ? regards, m. Maris wrote: Hi! Let's say my index.php consists of the following: ? include(header.inc); echo pPHP says Hello World/p; ? pHTML says Hello World/p ? //..

Re: [PHP] HTML and PHP output to PHP variable

2004-07-12 Thread Maris
Thanks a lot Miroslav, will try this construction! :) Miroslav Hudak [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] hello! use output buffering... ?php ob_start(); //... your code here $_contents = ob_get_contents(); ob_end_clean(); ? regards, m. Maris

[PHP] Re: unset empty elements in an array

2004-07-12 Thread Daniel Kullik
Justin French wrote: Hi, Looking for a one-liner to delete all empty elements in an array. I know I can do it with a foreach loop, but I'm hoping that I've missed an existing function in the manual which may already do this, or a simple one-liner to replace the foreach. ?php foreach($in as $k

[PHP] Re: unset empty elements in an array

2004-07-12 Thread Daniel Kullik
Daniel Kullik wrote: Justin French wrote: Hi, Looking for a one-liner to delete all empty elements in an array. I know I can do it with a foreach loop, but I'm hoping that I've missed an existing function in the manual which may already do this, or a simple one-liner to replace the foreach.

[PHP] Re: Odd Refresh Error

2004-07-12 Thread Scott Taylor
* Thus wrote Scott Taylor: Some people are complaining that when the visit one of my pages that the pages refeshes over and over again. One person said that it was only when he typed something in on one of the forms. How could an error like this be caused? Could this be a bug in a browser?

[PHP] addslashes vs string unescape

2004-07-12 Thread Skippy
I'm confronted with a somewhat weird problem and hopefully someone can make a suggestion. I have to perform the following 3-step task: Step 1. Someone provides a string (let's call it the formatting string) which contains a PHP expression, which will apply a PHP function on another string, let's

Re: [PHP] Re: Odd Refresh Error

2004-07-12 Thread Toze Araujo
The problem is in the browser, i have IE 6.0 and some pages on my localhost server have the same problem, sometimes it happend, sometimes not. If i use other browser like Opera the page has no problem. I think this problem is not related to the version, because others with the same version doesnt

[PHP] Cannot send session cookie

2004-07-12 Thread Michael Purdy
Folks I am a new to php. I am currently learning about session handling and would appreciate some assistance with the following: I am using php 4.3.7 and I am using the default values in the php.ini for session.use_cookies = 1 session.cache_limiter = nocache When experimenting with a few

Re: [PHP] Cannot send session cookie

2004-07-12 Thread André Ventura Lemos
From: http://www.php.net/manual/en/function.session-start.php Note: If you are using cookie-based sessions, you must call session_start() before anything is outputted to the browser. You have to put session_start before anything else. On Mon, 2004-07-12 at 15:40, Michael Purdy wrote:

Re: [PHP] Cannot send session cookie

2004-07-12 Thread Michal Migurski
When experimenting with a few simple lines of code script language='php' This is line 14 session_start(); /script I get the following errors: Warning: session_start(): Cannot send session cookie - headers already sent by (output started at e:\http\cgi\a.php:14) in

[PHP] Echoing a value

2004-07-12 Thread Ed Curtis
I'm having some trouble echoing a value to a file that is being pulled from a MySQL database. I've included my code below I'm sure it's something really simple but I'm not seeing it. $row['users.name'] and $row['users.company'] echo nothing while $row['cnt'] echoes it's expected values. If anyone

[PHP] placing values in html teaxtarea

2004-07-12 Thread Hull, Douglas D
After doing calculations etc on my data I am wanting to place it in a textarea form in html. I am having trouble getting my data to show up in my texarea. For example, say after all my calculations I my field called $test ends up containing This is a test. Here is what I tried: textarea

Re: [PHP] placing values in html teaxtarea

2004-07-12 Thread Travis Low
Would you please turn off return receipt in your messages? Thanks! Travis Hull, Douglas D wrote: After doing calculations etc on my data I am wanting to place it in a textarea form in html. I am having trouble getting my data to show up in my texarea. For example, say after all my

Re: [PHP] placing values in html teaxtarea

2004-07-12 Thread Jason Wong
On Monday 12 July 2004 23:09, Hull, Douglas D wrote: After doing calculations etc on my data I am wanting to place it in a textarea form in html. I am having trouble getting my data to show up in my texarea. For example, say after all my calculations I my field called $test ends up

Re: [PHP] Cannot send session cookie

2004-07-12 Thread Andre Dubuc
Hi Michael, session_start(); must be the very first line of code on the page, with no whitespaces trailing, else you'll get the 'header already sent' message: ?php session_start(); ? Hth, Andre On Monday 12 July 2004 10:40 am, Michael Purdy wrote: Folks I am a new to php. I am currently

RE: [PHP] Echoing a value

2004-07-12 Thread Pablo Gosse
Ed Curtis wrote: I'm having some trouble echoing a value to a file that is being pulled from a MySQL database. I've included my code below I'm sure it's something really simple but I'm not seeing it. $row['users.name'] and $row['users.company'] echo nothing while $row['cnt'] echoes it's

[PHP] Re: addslashes vs string unescape

2004-07-12 Thread Daniel Kullik
Skippy wrote: I'm confronted with a somewhat weird problem and hopefully someone can make a suggestion. I have to perform the following 3-step task: Step 1. Someone provides a string (let's call it the formatting string) which contains a PHP expression, which will apply a PHP function on another

Re: [PHP] Echoing a value

2004-07-12 Thread Jason Wong
On Monday 12 July 2004 22:58, Ed Curtis wrote: I'm having some trouble echoing a value to a file that is being pulled from a MySQL database. I've included my code below I'm sure it's something really simple but I'm not seeing it. $row['users.name'] and $row['users.company'] echo nothing while

Re: [PHP] placing values in html teaxtarea

2004-07-12 Thread Tom Rogers
Hi, Tuesday, July 13, 2004, 1:09:25 AM, you wrote: HDD After doing calculations etc on my data I am wanting to HDD place it in a textarea form in html. I am having trouble getting HDD my data to show up in my texarea. For example, say after all my HDD calculations I my field called $test ends

[PHP] easy data port

2004-07-12 Thread Edward Peloke
Hello, I have a real estate customer who wants to keep data about their own listings in a mysql db but wants to also pull data from the mls listing db which is sql server. They want to basically use the mls software and enter into the sql server db but have the php site pull from that server and

[PHP] RE: SOLVED! [PHP] Echoing a value

2004-07-12 Thread Ed Curtis
On Mon, 12 Jul 2004, Pablo Gosse wrote: Try changing: fputs($ap, $row['users.name']); fputs($ap, $row['users.company']); To: fputs($ap, $row['name']); fputs($ap, $row['company']); That should do the trick. Cheers, Pablo That did the trick! I knew it was something simple I was

Re: [PHP] placing values in html teaxtarea

2004-07-12 Thread José de Paula
On Mon, 12 Jul 2004 10:09:25 -0500, Hull, Douglas D [EMAIL PROTECTED] wrote: After doing calculations etc on my data I am wanting to place it in a textarea form in html. I am having trouble getting my data to show up in my texarea. For example, say after all my calculations I my field

Re: [PHP] placing values in html teaxtarea

2004-07-12 Thread Keith Greene
textareas do not use the value attribute. instead, the value is placed between the textarea/textarea tags: textarea name=zoutput rows=20 cols=70 wrap /? echo $test; ?/textarea At 08:09 AM 7/12/2004, Hull, Douglas D wrote: After doing calculations etc on my data I am wanting to place it in a

Re: [PHP] Cannot send session cookie

2004-07-12 Thread Michael Gale
Hello, Do you have output buffering enabled in your php.ini file ? --snip-- ; Output buffering allows you to send header lines (including cookies) even ; after you send body content, at the price of slowing PHP's output layer a ; bit. You can enable output buffering during runtime by

[PHP] warning: function registration failed

2004-07-12 Thread Josh Close
I installed php-5.0.0 and I get these error when doing php -v PHP Warning: Function registration failed - duplicate name - mssql_connect in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mssql_pconnect in Unknown on line 0 PHP Warning: Function registration

Re: [PHP] Re: unset empty elements in an array

2004-07-12 Thread Justin French
On 12/07/2004, at 6:38 PM, Thomas Seifert wrote: Really what do you need an internal function for something simple like that? It may be simple, but it's 60 characters I have to type over and over, or a user defined function I have to include() from a library file (and I have to ensure that

Re: [PHP] placing values in html teaxtarea

2004-07-12 Thread John W. Holmes
Keith Greene wrote: Here is what I tried: textarea name=zoutput rows=20 cols=70 wrap value=? echo $test; ? / /textarea textareas do not use the value attribute. instead, the value is placed between the textarea/textarea tags: textarea name=zoutput rows=20 cols=70 wrap /? echo $test;

[PHP] Trouble with arrays from within MySQL results where clause

2004-07-12 Thread Eric Boerner
Hello all, I am having trouble setting array data from within a MySQL results query. I have modified data from the result and wish to enter it into it's own array ($data). That then is used to generate a graph. The following code basically gives me an empty array... I am pulling out a timestamp

RE: [PHP] Trouble with arrays from within MySQL results where clause

2004-07-12 Thread Eric Boerner
Nevermind, I figured it out. Simple case of duh... $data[] = array('$time' = '$time','$aval' = 'aval'); Should have been: $data[] = array('$time' = $time ,'$aval' = aval); Thanks. :) -Original Message- From: Eric Boerner [mailto:[EMAIL PROTECTED] Sent: Monday, July

Re: [PHP] Re: addslashes vs string unescape

2004-07-12 Thread Skippy
On Mon, 12 Jul 2004 17:15:15 +0200 Daniel Kullik [EMAIL PROTECTED] wrote: Skippy wrote: Can you use this? It seems to work, at first test, but it's somewhat convoluted. I've found another fairly reasonable solution: using $val instead of %val%. This way I don't need to ever show the actual

Re: [PHP] Trouble with arrays from within MySQL results where clause

2004-07-12 Thread John W. Holmes
Eric Boerner wrote: Hello all, I am having trouble setting array data from within a MySQL results query. I have modified data from the result and wish to enter it into it's own array ($data). That then is used to generate a graph. The following code basically gives me an empty array... I doubt the

Re: [PHP] Trouble with arrays from within MySQL results where clause

2004-07-12 Thread Jason Wong
On Tuesday 13 July 2004 00:05, Eric Boerner wrote: I am having trouble setting array data from within a MySQL results query. I have modified data from the result and wish to enter it into it's own array ($data). That then is used to generate a graph. The following code basically gives me an

[PHP] using the mssql functions on a linux server

2004-07-12 Thread Edward Peloke
This may be a dumb question but how do I enable the mssql extension on a Linux server...if possible? I have a site which needs to connect to a mssql db. On my windows server, I just enable the mssql.dll extension...how do I do it on the Linux server? Thanks, Eddie WARNING: The information

Re: [PHP] Re: unset empty elements in an array

2004-07-12 Thread Paul Bissex
On Tue, 13 Jul 2004 01:57:48 +1000, Justin French [EMAIL PROTECTED] wrote: [...] My hope was that there was such a function to delete empty array elements already defined in PHP, but since it appears there isn't, I'll just keep including my own from a library file. How about array_filter()?

[PHP] File Upload Question

2004-07-12 Thread Vail, Warren
Perhaps this is more about HTML than PHP, but the PHP $_FILES var seems to be set up to allow a list of files to be uploaded. How does one get the pop-up window to allow a user to select (ctrl-click or whatever) multiple files in the same pop-up window? Everything I have tried has left the user

Re: [PHP] File Upload Question

2004-07-12 Thread John W. Holmes
Vail, Warren wrote: Perhaps this is more about HTML than PHP, but the PHP $_FILES var seems to be set up to allow a list of files to be uploaded. How does one get the pop-up window to allow a user to select (ctrl-click or whatever) multiple files in the same pop-up window? Everything I have

[PHP] Re: File Upload Question

2004-07-12 Thread Arnout Boks
As far as I know, this is not possible. You can however generate more file-upload boxes dynamicly. In this way, users can click an 'Upload another file'-button to display an extra upload form-element. Check the 'variable variables'-part in the PHP reference (user notes) for an example of this

Re: [PHP] File Upload Question

2004-07-12 Thread xin
you might need to resolve to Java applet or other means to select more than one files at same time. The following is an example: http://barleypop.vrac.iastate.edu/BarleyBase/test/upload/version_05/Upload.php yours, xin - Original Message - From: Vail, Warren [EMAIL PROTECTED] To:

[PHP] Re: using the mssql functions on a linux server

2004-07-12 Thread Arnout Boks
== Quote from http://php.us.themoes.org/manual/en/ref.mssql.php: == To use the MSSQL extension on Unix/Linux, you first need to build and install the FreeTDS library. Source code and installation instructions are available at the FreeTDS home page: http://www.freetds.org/ Hope this helps you,

Re: [PHP] Re: unset empty elements in an array

2004-07-12 Thread Curt Zirzow
* Thus wrote Justin French: On 12/07/2004, at 6:38 PM, Thomas Seifert wrote: My view of internal functions is that they solve common, repetitive problems. Sure, some of those problems are quite complex, but others are not. A perfect example would be array_walk() -- it can be solved in

Re: [PHP] Re: addslashes vs string unescape

2004-07-12 Thread Justin Patrin
On Mon, 12 Jul 2004 19:32:59 +0300, Skippy [EMAIL PROTECTED] wrote: On Mon, 12 Jul 2004 17:15:15 +0200 Daniel Kullik [EMAIL PROTECTED] wrote: Skippy wrote: Can you use this? It seems to work, at first test, but it's somewhat convoluted. I've found another fairly reasonable solution: using

Re: [PHP] Re: unset empty elements in an array

2004-07-12 Thread Torsten Roehr
Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * Thus wrote Justin French: On 12/07/2004, at 6:38 PM, Thomas Seifert wrote: My view of internal functions is that they solve common, repetitive problems. Sure, some of those problems are quite complex, but others

[PHP] Re: warning: function registration failed

2004-07-12 Thread Red Wingate
Try a clean install of PHP5 otherwise head over to the interals list to make sure it won't be a showstopper for the Release sceduled for today. -- red Josh Close wrote: I installed php-5.0.0 and I get these error when doing php -v PHP Warning: Function registration failed - duplicate name -

[PHP] PHPEclipse?

2004-07-12 Thread Dan Joseph
Hi, I was wondering, is anyone running Eclipse 3.0 w/PHPEclipse 1.1.0? I'm having trouble getting it working. I downloaded the July .ZIP file and unzipped it into the plugins directory. Its not recognizing it. Anyone have this working? -Dan Joseph -- PHP General Mailing List

[PHP] stripslashes() when reading from the DB

2004-07-12 Thread Jordi Canals
Hi, I usually stripslashes() when I read the info from the database (MySQL). Because the information was inserted after adding slashes, or the system has magic_quotes_gpc set to ON. I'd like to know, if I can do stripslashes() directly, as it is suposed that all data was inserted into DB

RE: [PHP] Re: using the mssql functions on a linux server

2004-07-12 Thread Edward Peloke
Is this the only way around it? Can I get to mssql without using the mssql extension? -Original Message- From: Arnout Boks [mailto:[EMAIL PROTECTED] Sent: Monday, July 12, 2004 1:59 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: using the mssql functions on a linux server == Quote from

[PHP] How to use multiple cookie statements

2004-07-12 Thread Ronald \The Newbie\ Allen
aHere is my code... ? setcookie(cookie[name],$_POST['name'], time()+86400) setcookie (cookie[email],$_POST['email'], time()+86400) setcookie (cookie[bgcolor],$_POST['bgcolor'], time()+86400) setcookie (cookie[tcolor], $_POST['tcolor'], time()+86400) ? I have to use cookies, since I am taking a

[PHP] if((strtolower(substr($author, 0, 1)) == $ausenquiry))

2004-07-12 Thread John Taylor-Johnston
Hi, I'm trying to sort my array. My Usort works, but this line only chooses those that begin with an e: if((strtolower(substr($author, 0, 1)) == $ausenquiry)) http://compcanlit.usherbrooke.ca/new1/db/index.php?ausenquiry=e is different from:

Re: [PHP] How to use multiple cookie statements

2004-07-12 Thread Jordi Canals
Ronald The Newbie Allen wrote: aHere is my code... ? setcookie(cookie[name],$_POST['name'], time()+86400) setcookie (cookie[email],$_POST['email'], time()+86400) setcookie (cookie[bgcolor],$_POST['bgcolor'], time()+86400) setcookie (cookie[tcolor], $_POST['tcolor'], time()+86400) ? I have to use

[PHP] OO woes

2004-07-12 Thread Matthew Sims
PHP version 5.0.0RC3 (cgi) (built: Jul 9 2004 13:18:24) I'm just getting my feet wet with OO and have run into a problem that I'm not familiar with...yet. I have a class that does a database connection and query all together. It all works nicely untiluntil my query has a word with quotes

Re: [PHP] PHPEclipse?

2004-07-12 Thread Ray Hunter
On Mon, 2004-07-12 at 12:39, Dan Joseph wrote: I was wondering, is anyone running Eclipse 3.0 w/PHPEclipse 1.1.0? I'm having trouble getting it working. I downloaded the July .ZIP file and unzipped it into the plugins directory. Its not recognizing it. Anyone have this working? I

Re: [PHP] How to use multiple cookie statements

2004-07-12 Thread Jason Barnett
Or if you feel lazy... then you can use serialize / unserialize. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] auto-increment not working?? MySQL

2004-07-12 Thread barophobia
hello. i've got a strange problem with a MySQL table. although my 'id' column is set to 'auto_increment', each new record i insert has the value 1. (instead of 1, 2, 3, etc.) i checked my sql statement and i'm not assigning the id value by mistake. here is my create statement (showing only a few

Re: [PHP] warning: function registration failed

2004-07-12 Thread Curt Zirzow
* Thus wrote Josh Close: I installed php-5.0.0 and I get these error when doing php -v PHP Warning: Function registration failed - duplicate name - mssql_connect in Unknown on line 0 Usually means that that module tried to get loaded twice or that you have that module staticly compiled in

Re: [PHP] How to use multiple cookie statements

2004-07-12 Thread Matt M.
? setcookie(cookie[name],$_POST['name'], time()+86400) setcookie (cookie[email],$_POST['email'], time()+86400) setcookie (cookie[bgcolor],$_POST['bgcolor'], time()+86400) setcookie (cookie[tcolor], $_POST['tcolor'], time()+86400) ? you could try this: setcookie ('values',

Re: [PHP] stripslashes() when reading from the DB

2004-07-12 Thread Justin Patrin
On Mon, 12 Jul 2004 20:45:12 +0200, Jordi Canals [EMAIL PROTECTED] wrote: Hi, I usually stripslashes() when I read the info from the database (MySQL). Because the information was inserted after adding slashes, or the system has magic_quotes_gpc set to ON. I'd like to know, if I can do

[PHP] Exceptions

2004-07-12 Thread Jason Barnett
public function execute($query) { if (!$this-dbh) { $this-connect(); } // My $query has quotes in it // I try to escape the quotes $query = mysql_escape_string($query); // It causes an error $ret = mysql_query($query, $this-dbh);

RE: [PHP] OO woes

2004-07-12 Thread Dan Joseph
Hi, Doesn't sound like an OO issue, sounds like you're kiling the query with the '. You should go thru and maybe do an str_replace( ', \', $_POST['test'] ) on all your post variables. -Dan Joseph -Original Message- From: Matthew Sims [mailto:[EMAIL PROTECTED] Sent: Monday,

RE: [PHP] PHPEclipse?

2004-07-12 Thread Dan Joseph
LOL.. I read all these PHPEclipse is great! reviews. It relaly does look good. Bummer you couldn't get it working either. I have EPIC installed, a Perl plug-in, its working fine, so I know plugins are working. Ahh well, maybe someone will read the list and have an answer. -Dan Joseph

Re: [PHP] How to use multiple cookie statements

2004-07-12 Thread Michal Migurski
I have to use cookies, since I am taking a class and it dictates that we use cookies, but I can't email my instructor since she never responds. So how do I use a cookie to record multiple values? Help would be appreciative.a A few options: use multiple cookies, e.g. setcookie('cookie_a'),

RE: [PHP] OO woes

2004-07-12 Thread Matthew Sims
Hi, Doesn't sound like an OO issue, sounds like you're kiling the query with the '. You should go thru and maybe do an str_replace( ', \', $_POST['test'] ) on all your post variables. -Dan Joseph Ha! That did it. Thanks! --Matthew Sims --http://killermookie.org -Original

Re: [PHP] PHPEclipse?

2004-07-12 Thread Andrei Verovski (aka MacGuru)
Hi, I am currently using Eclipse 3.0 with latest build of PHPEclipse on Linux. Just great. Did not tried debugger, however. On Monday 12 July 2004 09:39 pm, Dan Joseph wrote: Hi, I was wondering, is anyone running Eclipse 3.0 w/PHPEclipse 1.1.0? I'm having trouble getting it

RE: [PHP] PHPEclipse?

2004-07-12 Thread Dan Joseph
How did you get it installed? Did you just extract the zip into the plugins directory? -Dan Joseph -Original Message- From: Andrei Verovski (aka MacGuru) [mailto:[EMAIL PROTECTED] Sent: Monday, July 12, 2004 4:36 PM To: [EMAIL PROTECTED] Cc: Dan Joseph Subject: Re: [PHP]

RE: [PHP] auto-increment not working?? MySQL

2004-07-12 Thread Jay Blanchard
[snip] i've got a strange problem with a MySQL table. although my 'id' column is set to 'auto_increment', each new record i insert has the value 1. (instead of 1, 2, 3, etc.) i checked my sql statement and i'm not assigning the id value by mistake. here is my create statement (showing only a few

Re: [PHP] OO woes

2004-07-12 Thread Keith Greene
$query = 'INSERT into aeMail set test=\''.$_POST[test].'\''; Your quotes look screwy to me. You seem to be missing both trailing single quotes. try this: $query = 'INSERT into aeMail set test=\'''.$_POST[test].'\'''; At 01:07 PM 7/12/2004, Matthew Sims wrote: PHP version 5.0.0RC3 (cgi) (built:

Re: [PHP] OO woes

2004-07-12 Thread Chris
Your problem has nothing to do with the Objects (or really even PHP for that matter). You're not supposed to run mysql_escape_string on an entire query. Here's an example of its usage: $sString = This string contains a single-quote ('); $sQuery = INSERT INTO mytable SET

Re: [PHP] auto-increment not working?? MySQL

2004-07-12 Thread Justin Patrin
Your primary key should be only (`id`). On Mon, 12 Jul 2004 13:04:19 -0700, barophobia [EMAIL PROTECTED] wrote: hello. i've got a strange problem with a MySQL table. although my 'id' column is set to 'auto_increment', each new record i insert has the value 1. (instead of 1, 2, 3, etc.) i

Re: [PHP] Exceptions

2004-07-12 Thread Matthew Sims
if (!$ret) { // An Exception error is thrown throw new Exception; } elseif (!is_resource($ret)) { return TRUE; } else { $statment = new DB_MysqlStatement($this-dbh, $query); return $statement; } Fatal

Re: [PHP] PHPEclipse?

2004-07-12 Thread Andrei Verovski (aka MacGuru)
On Monday 12 July 2004 11:27 pm, Dan Joseph wrote: How did you get it installed?  Did you just extract the zip into the plugins directory? Yes. -- ***   with best regards ***   Andrei Verovski (aka MacGuru) ***   Mac, Linux, DTP, Programming

Re: [PHP] stripslashes() when reading from the DB

2004-07-12 Thread Philip Olson
I usually stripslashes() when I read the info from the database (MySQL). Because the information was inserted after adding slashes, or the system has magic_quotes_gpc set to ON. I'd like to know, if I can do stripslashes() directly, as it is suposed that all data was inserted into

Re: [PHP] auto-increment not working?? MySQL

2004-07-12 Thread barophobia
On Mon, 12 Jul 2004 15:36:20 -0500, Jay Blanchard [EMAIL PROTECTED] wrote: The guys on the MySQL list do. Have you read this-- http://dev.mysql.com/doc/mysql/en/example-AUTO_INCREMENT.html not for this issue no. the problem for those that read this later is not that i am using multiple

[PHP] array indexes as arguments to a function

2004-07-12 Thread Dennis Gearon
please CC me, as I am on digest. --- say I've got a class that stores the cookie/get/post vars. I want to retrieve say one of them. Say, that post vars come back from browser as: POST[var1_arr][dim1][dim2] they are stored in

Re: [PHP] OO woes

2004-07-12 Thread Matthew Sims
Your problem has nothing to do with the Objects (or really even PHP for that matter). You're not supposed to run mysql_escape_string on an entire query. Yup, you are correct, my bad. So I ran my $_POST array into array_map before the injection: $_POST = array_map(mysql_escape_string,$_POST);

Re: [PHP] stripslashes() when reading from the DB

2004-07-12 Thread John W. Holmes
Jordi Canals wrote: I usually stripslashes() when I read the info from the database (MySQL). Because the information was inserted after adding slashes, or the system has magic_quotes_gpc set to ON. I remember being taught this lesson long ago. :) You do not need to strip slashes from the data

Re: [PHP] OO woes

2004-07-12 Thread John W. Holmes
Matthew Sims wrote: Your problem has nothing to do with the Objects (or really even PHP for that matter). You're not supposed to run mysql_escape_string on an entire query. So I ran my $_POST array into array_map before the injection: $_POST = array_map(mysql_escape_string,$_POST); And it all

[PHP] PHP and HTML Conventions

2004-07-12 Thread Harlequin
Hi all. I just wondered if the general convention was to use entirely PHP and simply encase HTML TAGs within that or use a mix and simply use PHP TAGs when required. -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP

Re: [PHP] stripslashes() when reading from the DB

2004-07-12 Thread Jordi Canals
Philip Olson wrote: I usually stripslashes() when I read the info from the database (MySQL). Because the information was inserted after adding slashes, or the system has magic_quotes_gpc set to ON. To add further comment. If you're required to run stripslashes() on data coming out of your

Re: [PHP] PHP and HTML Conventions

2004-07-12 Thread Matthew Sims
Hi all. I just wondered if the general convention was to use entirely PHP and simply encase HTML TAGs within that or use a mix and simply use PHP TAGs when required. -- - Michael Mason I'm trying to get myself to use PHP tags when required. When I first

[PHP] [Q] Using $_SERVER['DOCUMENT_ROOT'] correctly

2004-07-12 Thread Michael T. Peterson
I'm attempting to define a set of environment variables that will allow me to edit and test my web pages on my local machine and then upload to my ISP for verification and publication without having to change any symbols. What variable should I use for the document root? Here's how some of the

Re: [PHP] How to use multiple cookie statements

2004-07-12 Thread Curt Zirzow
* Thus wrote Jason Barnett: Or if you feel lazy... then you can use serialize / unserialize. I'll be even lazier... setcookie('foo[bar]', 'is ok'); setcookie('foo[qaz]', 'is better'); // after cookie is set. $myFoo = $_COOKIE['foo']; print_r($myFoo); Curt -- First, let me assure you that

[PHP] php reserved characters...

2004-07-12 Thread bruce
hi... got a simple question... i have the following: html body ? $test = p; echo $test; print $test; ? /body /html it doesn't seem to print... which leads me to believe that is a reserved char/word... i tried to do a \p with no luck... any idea as to what's going on, and can someone point

Re: [PHP] php reserved characters...

2004-07-12 Thread John W. Holmes
bruce wrote: i have the following: html body ? $test = p; echo $test; print $test; ? /body /html it doesn't seem to print... which leads me to believe that is a reserved char/word... i tried to do a \p with no luck... any idea as to what's going on, and can someone point me to a list of the

RE: [PHP] php reserved characters...

2004-07-12 Thread Ed Lazor
can someone point me to a list of the actual php reserved chars/words couldn't seem to track them down on the php site/google... http://www.php.net/manual/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP and HTML Conventions

2004-07-12 Thread Steve Douville
I generally do all my program logic first then go to HTML. Once I start HTML, I drop in the PHP stuff where I need it. I think, but am not sure, that it also cuts down on processing time not having to parse out echo tags. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: PHP and HTML Conventions

2004-07-12 Thread Jason Barnett
Harlequin wrote: Hi all. I just wondered if the general convention was to use entirely PHP and simply encase HTML TAGs within that or use a mix and simply use PHP TAGs when required. It depends on the project, but when possible I prefer to have as much static content as possible for better

[PHP] Re: [Q] Using $_SERVER['DOCUMENT_ROOT'] correctly

2004-07-12 Thread Jason Barnett
Is your common script in the server root? If so then you can use something like this in the file: define('WWWROOT', basename(__FILE__)); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php reserved characters...

2004-07-12 Thread Michal Migurski
i tried to do a \p with no luck... any idea as to what's going on, and can someone point me to a list of the actual php reserved chars/words couldn't seem to track them down on the php site/google... is not reserved. The problem is your HTML. Your result ends up like this:

Re: [PHP] Re: unset empty elements in an array

2004-07-12 Thread Justin French
On 13/07/2004, at 3:14 AM, Paul Bissex wrote: How about array_filter()? From the docs: If the callback function is not supplied, array_filter() will remove all the entries of input that are equal to FALSE. $a = array ('a' = 'foo', 'b' = '', 'c' = null, 'd' = 99, 'e' = 0); print_r