[PHP] Javascript and PHP interaction

2007-03-08 Thread Alain Roger
Hi, I would like to know if there is a way how PHP code can extract from ElementID some property values. for example, i have the following PHP page : ?php print div class='maindiv' id='id_maindiv'my main div/div; $new_Width = somefunction(); print div class='childdiv' id='id_childdiv'

[PHP] server error or script error

2007-03-08 Thread Ross
?php include ('../phpscripts/connect.php'); $id = $_GET['id']; $query = SELECT * FROM mypdfs WHERE id =$id; $result= mysql_query($query) or die('Error, query failed'); if (!mysql_num_rows($result)) { die(No matching records were found in the database.); } while ($row =

RE: [PHP] server error or script error

2007-03-08 Thread Flavien CHANTELOT
I guess the problem is here : $query = SELECT * FROM mypdfs WHERE id =$id; Change it to : $query = SELECT * FROM mypdfs WHERE id =.$id; -Message d'origine- De : Ross [mailto:[EMAIL PROTECTED] Envoyé : jeudi 8 mars 2007 09:39 À : php-general@lists.php.net Objet : [PHP] server error or

Re: [PHP] Class and subclass

2007-03-08 Thread Stut
Please include the list in replies. Budi Setiawan wrote: I suggest you read up on classes and the syntax thereof in the manual - you're not getting it at the moment. Remember, PHP is not C++. what does that mean? It means... 1) Read the manual: http://php.net/oop5 2) PHP is not C++ I

[PHP] why did it stop working?

2007-03-08 Thread Ross
Can someone explain to me why this used to work but then stopped header(Content-length: $size); header(Content-type: $type); header(Content-Disposition: attachment; filename=$name); and this now works header(Content-length: .$size); header(Content-type: .$type); header('Content-Disposition:

Re: [PHP] server error or script error

2007-03-08 Thread Ross
This script change does not make a difference. What could have been turned on/off on the server to cause this? I can output the binary to screen but I cannot create the pdf. R. Flavien CHANTELOT [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I guess the problem is here : $query =

Re: [PHP] why did it stop working?

2007-03-08 Thread Richard Davey
Ross wrote: Can someone explain to me why this used to work but then stopped header(Content-length: $size); header(Content-type: $type); header(Content-Disposition: attachment; filename=$name); and this now works header(Content-length: .$size); header(Content-type: .$type);

[PHP] Oracle XMLTYPE column truncates

2007-03-08 Thread Mikey
Hi! I am running some tests for implementing variable metadata using Oracle's XMLTYPE. Creating the XML and inserting it into the database works fine, however when trying to retrieve data it truncates the returned results. The code I am using to fetch the data is as follows: $row_sql =

[PHP] Re: Javascript and PHP interaction

2007-03-08 Thread Mikey
Alain Roger wrote: Hi, I would like to know if there is a way how PHP code can extract from ElementID some property values. for example, i have the following PHP page : ?php print div class='maindiv' id='id_maindiv'my main div/div; $new_Width = somefunction(); print div class='childdiv'

[PHP] Problem with script....

2007-03-08 Thread Fabio Silva
Hi all, i have a problem with this script... could anybody help me?? Regards, titlePassword change/title/head body bgcolor=#ff ?php //Written by Dave Edick on 6/22/99 // customize these variables for your install $base_dn=ou=People; $ldap_server=localhost; error_reporting(E_ERROR);

Re: [PHP] Monitoring download, detecting completion?

2007-03-08 Thread Nicholas Yim
Hello Skip Evans, $filename=; $fp=fopen($filename,'r'); while(!feof($fp)){ echo fread($fp,1024); } //log something that the client complete the download Best regards, === At 2007-03-08, 07:06:46 you wrote: === Hey all, I have a need to monitor a

[PHP] Joke of the day problem

2007-03-08 Thread Delta Storm
Hi, again me with the silly questions... I need a script that will take data from MySQL database and display one row each day. I have googled, but with no luck. The database retrieving mechanism is of course clear but I really dont know how to do a 24h delay before the next row is

Re: [PHP] Joke of the day problem

2007-03-08 Thread clive
Delta Storm wrote: Hi, again me with the silly questions... you could have another table in your database that logs the id of the current joke and the date it was shown on, then simply 'select jokeid,dateshown from jokelog order by dateshown limit 1' will get you the last joke and when

Re: [PHP] Javascript and PHP interaction

2007-03-08 Thread Németh Zoltán
2007. 03. 8, csütörtök keltezéssel 09.14-kor Alain Roger ezt írta: Hi, I would like to know if there is a way how PHP code can extract from ElementID some property values. for example, i have the following PHP page : ?php print div class='maindiv' id='id_maindiv'my main div/div;

Re: [PHP] why did it stop working?

2007-03-08 Thread Jake McHenry
concatenation changes?? I've noticed this too, you can either do what you did, or put {} around variable within quotes.. - Original Message - From: Ross [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Thursday, March 08, 2007 4:57 AM Subject: [PHP] why did it stop working?

RE: [PHP] Joke of the day problem

2007-03-08 Thread Jim Moseby
Hi, again me with the silly questions... I need a script that will take data from MySQL database and display one row each day. I have googled, but with no luck. The database retrieving mechanism is of course clear but I really dont know how to do a 24h delay before the next

Re: [PHP] server error or script error

2007-03-08 Thread Tijnema !
On 3/8/07, Ross [EMAIL PROTECTED] wrote: ?php include ('../phpscripts/connect.php'); $id = $_GET['id']; $query = SELECT * FROM mypdfs WHERE id =$id; $result= mysql_query($query) or die('Error, query failed'); if (!mysql_num_rows($result)) { die(No matching records were found in the

Re: [PHP] why did it stop working?

2007-03-08 Thread Tijnema !
On 3/8/07, Ross [EMAIL PROTECTED] wrote: Can someone explain to me why this used to work but then stopped header(Content-length: $size); header(Content-type: $type); header(Content-Disposition: attachment; filename=$name); and this now works header(Content-length: .$size);

Re: [PHP] Problem with script....

2007-03-08 Thread Tijnema !
On 3/8/07, Fabio Silva [EMAIL PROTECTED] wrote: Hi all, i have a problem with this script... could anybody help me?? What is your problem? you are only posting your code here and whe have to find the error? What error comes up? Tijnema Regards, titlePassword change/title/head body

[PHP] Re: Oracle XMLTYPE column truncates

2007-03-08 Thread Roberto Mansfield
Hi Mikey, OCI doesn't directly support the XMLtype so you need to convert to string (if 4k) or clob before retrieving. Use: select xml_metadata.getClobVal() ... OR select xml_metadata.getStringVal() ... If converting to clob, you get a clob object back and you'll need to run the load() method

[PHP] Any automated php email sending solution please?

2007-03-08 Thread Chris Carter
Any software that anyone is aware of for sending automated emails. I have some email addresses in my database, now I am looking forward to send HTML Formatted emails to those email address without having to pick up each email address and send it. I am using php on my site and cPanel is where I

Re: [PHP] help with script needed

2007-03-08 Thread Jochem Maas
Stut wrote: Bruce Gilbert wrote: Thanks for the responses so far. This is what I have come up with [php] ?php for( $i=1; $i=100; $i++ ) { echo $i; echo br; if ($i%3 == 0) echo Foo ; elseif ($i%5 == 0) echo Bar; } ? [/php] and the results can be seen here

[PHP] Re: Oracle XMLTYPE column truncates

2007-03-08 Thread Mikey
Mikey wrote: Roberto Mansfield wrote: Hi Mikey, OCI doesn't directly support the XMLtype so you need to convert to string (if 4k) or clob before retrieving. Use: select xml_metadata.getClobVal() ... OR select xml_metadata.getStringVal() ... If converting to clob, you get a clob object back

Re: [PHP] Any automated php email sending solution please?

2007-03-08 Thread Rabih Tayyem
check PHPmailer.. very easy to use.. http://phpmailer.sourceforge.net/ Regards, Rabih On 3/8/07, Chris Carter [EMAIL PROTECTED] wrote: Any software that anyone is aware of for sending automated emails. I have some email addresses in my database, now I am looking forward to send HTML

[PHP] Re: Oracle XMLTYPE column truncates

2007-03-08 Thread Roberto Mansfield
Mikey wrote: Roberto Mansfield wrote: Hi Mikey, OCI doesn't directly support the XMLtype so you need to convert to string (if 4k) or clob before retrieving. Use: select xml_metadata.getClobVal() ... OR select xml_metadata.getStringVal() ... If converting to clob, you get a clob object

Re: [PHP] Any automated php email sending solution please?

2007-03-08 Thread Tijnema !
Or just get all email addresses from the database, and run a loop. Tijnema On 3/8/07, Rabih Tayyem [EMAIL PROTECTED] wrote: check PHPmailer.. very easy to use.. http://phpmailer.sourceforge.net/ Regards, Rabih On 3/8/07, Chris Carter [EMAIL PROTECTED] wrote: Any software that

[PHP] XMLDBX XML extension for PHP

2007-03-08 Thread Mark
A while back I tried to use wddx as an XML serializer for PHP, and for various reasons it didn't really work correctly. What I ended up having to do was almost completely rewrite it, and what came out of that is XMLDBX. Here is documentation http://www.mohawksoft.org/?q=node/17 You can download

[PHP] Creating variable names from values

2007-03-08 Thread Otto Wyss
From an arry I create a table like foreach ($persons as $key = $pers) { echo tdinput name=\K$key\ type=\checkbox\ .../td td.../td } so each checkbox field has its own name created from $key. Yet how can I access these fields (names) later on? foreach ($persons as $key =

Re: [PHP] Urgent: Way to XML-parse data with f n=name /f tags?

2007-03-08 Thread Myron Turner
Rob Gould wrote: The problem I'm having is that the XML data that comes back from the host doesn't just have eventname /eventname tags. It has f n=eventnamedatahere/f tags, and I don't know how to get the XML parser to read the values using that format. (And I don't have control over the

[PHP] Intro to PHP question

2007-03-08 Thread Jonathan Kahan
Hi all, I am using a linux server. When the php file below (uri.php) is run from the command line I get the following error. Any ideas on what I could do differently? Thanks for any help, Jonathan ../uri.php: line 1: syntax error near unexpected token `newline' ../uri.php: line 1: `html'

Re: [PHP] Intro to PHP question

2007-03-08 Thread Tijnema !
Your probably created it from a windows machine. Try converting the file first with dos2unix dos2unix ../uri.php Tijnema On 3/8/07, Jonathan Kahan [EMAIL PROTECTED] wrote: Hi all, I am using a linux server. When the php file below (uri.php) is run from the command line I get the following

[PHP] Way to XML-parse data with f n=name /f tags?

2007-03-08 Thread Rob Gould
Sorry if this is a duplicate post, I'm new to the listserve and I'm not sure my first message made it through I've been trying to retro-fit sample code found at : http:// www.sitepoint.com/article/php-xml-parsing-rss-1-0 to parse XML coming from a server. I'm sooo close to getting

Re: [PHP] Creating variable names from values

2007-03-08 Thread Rabih Tayyem
Actuallyyou're doing it rightyou just need to concatenate. ex: echo tdinput *name=\K.$key.\* type=\checkbox\ .../td and then later you access the values the same way...(you loop on $key and the value would be K.$key)... Regards, Rabih On 3/8/07, Otto Wyss [EMAIL PROTECTED] wrote:

[PHP] What sripts,helpers to use for AJAX

2007-03-08 Thread Otto Wyss
I want to add some AJAX communication to my pages and would like to know, what scripts, helpers you would recommend. I don't want to use a full featured framework, just something to do the AJAX work. So far I've come across the following solutions http://prajax.sourceforge.net/

Re: [PHP] Intro to PHP question

2007-03-08 Thread Jonathan Kahan
Unfortunately not. I used the vi editor within Linux to create the file. I am using a windows machine locally but the server I am doing this all in is a Linux server which I am accessing through putty. - Original Message - From: Tijnema ! To: Jonathan Kahan Cc:

[PHP] Re: Oracle XMLTYPE column truncates

2007-03-08 Thread Mikey
Roberto Mansfield wrote: Mikey wrote: Roberto Mansfield wrote: Hi Mikey, OCI doesn't directly support the XMLtype so you need to convert to string (if 4k) or clob before retrieving. Use: select xml_metadata.getClobVal() ... OR select xml_metadata.getStringVal() ... If converting to clob,

Re: [PHP] Creating variable names from values

2007-03-08 Thread Satyam
- Original Message - From: Otto Wyss [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Thursday, March 08, 2007 5:56 PM Subject: [PHP] Creating variable names from values From an arry I create a table like foreach ($persons as $key = $pers) { echo tdinput name=\K$key\

Re: [PHP] What sripts,helpers to use for AJAX

2007-03-08 Thread Satyam
'Better' is a little subjective and prone to generate a flame war, but I'll risk my opinion. You might want to check Yahoo User Interface (YUI). The Connection Manager at http://developer.yahoo.com/yui/connection/ provides reliable cross-browser JavaScript code for the client side. You might

Re: [PHP] Intro to PHP question

2007-03-08 Thread Tijnema !
I never work with PHP from the commandline,. but i think it is not possible to use HTML in a php file, so try replacing this: html body?php with ?php echo htmlbody; and replace this: ?/body /html with this: echo /body/html; ? I think that will fix it. Tijnema On 3/8/07, Jonathan Kahan [EMAIL

Re: [PHP] Intro to PHP question

2007-03-08 Thread Dave Goodchild
Of course it's possible to output raw html in a php file, that's one of it's fundamental uses! In fact, it's more efficient to switch the php parser off and send raw html as the php parser doesn't need to get involved.

Re: [PHP] Intro to PHP question

2007-03-08 Thread Dave Goodchild
If you are running that from the command line, why do you need html? Not sure why you're doing that.

Re: [PHP] Intro to PHP question

2007-03-08 Thread Jonathan Kahan
Hi all, Dave, I am attempting to use html for learning purposes. My goal is to begin working on a website. Tijnema, I tried the below and got the following errors. I can't imagine the error on line 3 is a tag issue. Jonathan [EMAIL PROTECTED] cgi-bin]# ./uri.php ./uri.php: line 2: ?php:

Re: [PHP] Intro to PHP question

2007-03-08 Thread Satyam
I am not a linux expert but it might be because instead of running it like php myprogram.php you are just typing myprogram.php in which case, the file needs to have a comment in the first line telling the shell which interpreter should handle it. Some #!php or something like that, not

Re: [PHP] Intro to PHP question

2007-03-08 Thread Tijnema !
AFAIK you can't run a php file directly, or you need to add #!/bin/php or something to the first line, but you can run it with php ../uri.php but i suggest you to run it from a webserver like apache. *if you don't have it, i can give you a few MB to try PHP out Tijnema On 3/8/07, Jonathan

Re: [PHP] Intro to PHP question

2007-03-08 Thread Dave Goodchild
Why not learn in a web environment if your goal is to build a website? Just create the following file: ?php phpinfo(); ? save it, upload it and view it. If you see the php details you have the system set up as you need it and can just start writing php-driven web pages (the file you are using

[PHP] Re: What sripts,helpers to use for AJAX

2007-03-08 Thread Mikey
Otto Wyss wrote: I want to add some AJAX communication to my pages and would like to know, what scripts, helpers you would recommend. I don't want to use a full featured framework, just something to do the AJAX work. So far I've come across the following solutions

RE: [PHP] Re: What sripts,helpers to use for AJAX

2007-03-08 Thread Edward Kay
Otto Wyss wrote: I want to add some AJAX communication to my pages and would like to know, what scripts, helpers you would recommend. I don't want to use a full featured framework, just something to do the AJAX work. So far I've come across the following solutions

Re: [PHP] Re: What sripts,helpers to use for AJAX

2007-03-08 Thread benifactor
im using http://www.prototypejs.org/ and have had no problems thus far. - Original Message - From: Mikey [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Thursday, March 08, 2007 10:02 AM Subject: [PHP] Re: What sripts,helpers to use for AJAX Otto Wyss wrote: I want to add some

Re: [PHP] Intro to PHP question

2007-03-08 Thread Ben Ramsey
On 3/8/07 12:59 PM, Dave Goodchild wrote: If you really want to run that on the command line, you will need the path to php on the first line of the file. Or, he can run it through the PHP CLI with: $ php uri.php Please, forget the command line stuff unless you want to write command line

[PHP] Re: Creating variable names from values

2007-03-08 Thread zerof
Otto Wyss escreveu: From an arry I create a table like foreach ($persons as $key = $pers) { echo tdinput name=\K$key\ type=\checkbox\ .../td td.../td } so each checkbox field has its own name created from $key. Yet how can I access these fields (names) later on? foreach

Re: [PHP] Intro to PHP question

2007-03-08 Thread Jonathan Kahan
Hi all, I went to a website called php-cli.com and found that i needed to type #!/usr/bin/php -q in the header line. Once I typed that, my script without the HTML tags executed. Thanks again, Jonathan - Original Message - From: Tijnema ! To: Jonathan Kahan Cc: Dave

Re: [PHP] Intro to PHP question

2007-03-08 Thread Tijnema !
He wanted to use it for the web, so why should he try it out on CL first? I can offer a few MBs for everyone that wants to get learning PHP. Tijnema On 3/8/07, Ben Ramsey [EMAIL PROTECTED] wrote: On 3/8/07 12:59 PM, Dave Goodchild wrote: If you really want to run that on the command line,

Re: [PHP] Intro to PHP question

2007-03-08 Thread Ben Ramsey
On 3/8/07 1:44 PM, Tijnema ! wrote: He wanted to use it for the web, so why should he try it out on CL first? Because there are some advantages to being able to run something quickly through the CLI without having to load it in a web browser. He was just doing a simple test, so the PHP CLI

[PHP] Re: Any automated php email sending solution please?

2007-03-08 Thread Joker7
In news: [EMAIL PROTECTED], Chris Carter said: Any software that anyone is aware of for sending automated emails. I have some email addresses in my database, now I am looking forward to send HTML Formatted emails to those email address without having to pick up each email address and send

RE: [PHP] Intro to PHP question

2007-03-08 Thread Jim Moseby
He wanted to use it for the web, so why should he try it out on CL first? I agree, though trying something out at the CLI may be his only option if he doesn't have/want a webserver set up. I can offer a few MBs for everyone that wants to get learning PHP. Motherboards? JM -- PHP

Re: [PHP] Intro to PHP question

2007-03-08 Thread Jake McHenry
Sorry, I didn't even think about that. I use many php files as shell scripts... and u need this for any interpreter your using if you want to execute the file directly from the command line, otherwise you would have to type php scriptname.php from the command line. - Original Message

Re: [PHP] Creating variable names from values

2007-03-08 Thread David Giragosian
On 3/8/07, Otto Wyss [EMAIL PROTECTED] wrote: Satyam wrote: $key = 'K' . $key; if ($$key) { notice double dollar sign, it means, not the value of $key but the value of the variable $key says. Thanks, any idea where this is described in the PHP manual? Searching for $$ produces no

Re: [PHP] Intro to PHP question

2007-03-08 Thread Ashley M. Kirchner
Tijnema ! wrote: I can offer a few MBs for everyone that wants to get learning PHP. Mariachi Bands! Yes, of course they can teach you how to PHP to the music and Tequila!. :) -- W | It's not a bug - it's an undocumented feature.

[PHP] Re: I almost get what you're saying...

2007-03-08 Thread Myron Turner
Rob Gould wrote: Myron, Thank you thank you! You've pointed me in the right direction - - - - but I'm so new to PHP that I need just a little more pointing From reading the docs, I understand that I need to pull from an associative array, and you are correct that $venuecity =

[PHP] $35 to the first person who can do this XML-parsing PHP script

2007-03-08 Thread Rob Gould
Ok, well after fiddling around with PHP samples from the web for a few hours, I'm shot. But I have a project due soon that relies on this so I'm willing to pay someone: I'll send $35 to someone via paypal who can create a PHP script that will do the following: 1) Read XML data from an

[PHP] Re: $35 to the first person who can do this XML-parsing PHP script

2007-03-08 Thread Ben Ramsey
On 3/8/07 2:59 PM, Rob Gould wrote: 1) Read XML data from an URL (www.librarytools.com/events/sampledata.txt) 2) Loop through all XML results and print to the screen the eventname and eventnextoccurrencedate (Just the date) values I'll probably kick myself once I see how easy it is, but I'm

Re: [PHP] Re: $35 to the first person who can do this XML-parsing PHP script

2007-03-08 Thread Tijnema !
On 3/8/07, Ben Ramsey [EMAIL PROTECTED] wrote: On 3/8/07 2:59 PM, Rob Gould wrote: 1) Read XML data from an URL ( www.librarytools.com/events/sampledata.txt) 2) Loop through all XML results and print to the screen the eventname and eventnextoccurrencedate (Just the date) values I'll

Re: [PHP] Problem with script....

2007-03-08 Thread Jim Lucas
Fabio Silva wrote: Hi all, i have a problem with this script... could anybody help me?? Regards, titlePassword change/title/head body bgcolor=#ff ?php //Written by Dave Edick on 6/22/99 // customize these variables for your install $base_dn=ou=People; $ldap_server=localhost;

Re: [PHP] Re: $35 to the first person who can do this XML-parsing PHP script

2007-03-08 Thread Rob Gould
Ok, well at least I'm honing in on the problems now. I appears that my ISP is only running php 4.4.4. So back in the PHP 4-days, what was the preferred method of doing such things? - Rob On Mar 8, 2007, at 3:13 PM, Ben Ramsey wrote: On 3/8/07 2:59 PM, Rob Gould wrote: 1) Read XML

Re: [PHP] Re: $35 to the first person who can do this XML-parsing PHP script

2007-03-08 Thread Jeremy Privett
Rob Gould wrote: Ok, well at least I'm honing in on the problems now. I appears that my ISP is only running php 4.4.4. So back in the PHP 4-days, what was the preferred method of doing such things? - Rob Expat would probably be the way to go, then. http://www.php.net/xml -- Jeremy C.

Re: [PHP] Creating variable names from values

2007-03-08 Thread Satyam
They are called 'variable variables': http://www.php.net/manual/en/language.variables.variable.php and it is under variables! Satyam PS: it sounds obvious once said, but it's usage might not be, so I meant the pun, but not to tease you. - Original Message - From: Otto Wyss

Re: [PHP] $35 to the first person who can do this XML-parsing PHP script

2007-03-08 Thread Chris Shiflett
Rob Gould wrote: I'll send $35 to someone via paypal who can create a PHP script that will do the following: 1) Read XML data from an URL (www.librarytools.com/events/sampledata.txt) 2) Loop through all XML results and print to the screen the eventname and eventnextoccurrencedate (Just

Re: [PHP] $35 to the first person who can do this XML-parsing PHP script

2007-03-08 Thread Tijnema !
On 3/8/07, Chris Shiflett [EMAIL PROTECTED] wrote: Rob Gould wrote: I'll send $35 to someone via paypal who can create a PHP script that will do the following: 1) Read XML data from an URL ( www.librarytools.com/events/sampledata.txt) 2) Loop through all XML results and print to the

[PHP] Re: Problem with APC

2007-03-08 Thread steve
No one else having problems? On 3/7/07, steve [EMAIL PROTECTED] wrote: Hi, I upgraded to PHP 4.4.6 and APC 3.0.13 at the same time. Every day at some point, it starts having a problem and the load on that machine styrockets. It does not happen with the opcode cache in Zend Platform for PHP

[PHP] Image from a secure site

2007-03-08 Thread Manolet Gmail
hi, i install 4 IP cameras and i want to extract the images from their web interface that is protected be a username and password (HTTP AUTH) and show it into another system. so i do a function to connect to it and get the image... function subd($host,$port,$ownername,$passw,$request) { $sock =

Re: [PHP] Creating variable names from values

2007-03-08 Thread Jim Lucas
Otto Wyss wrote: From an arry I create a table like foreach ($persons as $key = $pers) { echo tdinput name=\K$key\ type=\checkbox\ .../td Maybe this? ... type=\K[{$key}]\ ... td.../td } so each checkbox field has its own name created from $key. Yet how can I access

[PHP] IE not uploading files

2007-03-08 Thread Skip Evans
Hey all, I have the following code uploading and image to a directory from a form, and it works great on FireFox, but not IE 6.0. Does anyone have an suggestions? Thanks, Skip // get the image directory. list($mats_img_path)=bsp_DB_row_fields(SELECT mats_img_path FROM

[PHP] Re: Classes in PHP5 || Puzzling Problem || Trying to Set $this-$name = $value

2007-03-08 Thread PHP
Hey all. Problem: Class test { var $foo = 0; function __construct() { $this-myfunc(foo, 1); } function myfunc($name, $val) { $this-$name = $val; } } Now, PHP correctly evaluates $this-$name as 0; i.e. the default property value of $this-foo. However,

Re: [PHP] Intro to PHP question

2007-03-08 Thread Jim Lucas
Dave Goodchild wrote: Of course it's possible to output raw html in a php file, that's one of it's fundamental uses! In fact, it's more efficient to switch the php parser off and send raw html as the php parser doesn't need to get involved. Just to point out, the last person did not say to

[PHP] Re: Classes in PHP5 || Puzzling Problem || Trying to Set $this-$name = $value

2007-03-08 Thread Bruce Cowin
I don't know the details of your app, but you might want to reconsider a resdesign. Having said that, your code actually works for me. If I use your class as is, foo is 1. That is: $x = new test; echo $x-foo; outputs 1. Isn't that what you want? Regards, Bruce PHP [EMAIL PROTECTED]

Re: [PHP] Re: Classes in PHP5 || Puzzling Problem || Trying to Set $this-$name = $value

2007-03-08 Thread Stut
PHP wrote: Problem: Class test { var $foo = 0; function __construct() { $this-myfunc(foo, 1); } function myfunc($name, $val) { $this-$name = $val; } } Now, PHP correctly evaluates $this-$name as 0; i.e. the default property value of $this-foo. However,

Re: [PHP] Re: Classes in PHP5 || Puzzling Problem || Trying to Set $this-$name = $value

2007-03-08 Thread Frank M. Kromann
Sounds like a PHP version problem. PHP 4 will output 0 and PHP 5 will give 1. The constructor must be named the same as the class name in PHP 4 for this to work. You can have both constructors in your class so it will work in both versions. - Frank I don't know the details of your app, but you

Re: [PHP] Urgent: Way to XML-parse data with f n=name /f tags?

2007-03-08 Thread Myron Turner
Myron Turner wrote: Rob Gould wrote: The problem I'm having is that the XML data that comes back from the host doesn't just have eventname /eventname tags. It has f n=eventnamedatahere/f tags, and I don't know how to get the XML parser to read the values using that format. (And I don't

Re: [PHP] Is there a way to un include a file

2007-03-08 Thread jekillen
On Mar 7, 2007, at 11:47 PM, Larry Garfield wrote: No there is not, because an included file *executes* at the time it is included and is then done. Any memory-resident objects (function/class definitions, variables, etc.) that it defies then exist until you make them un-exist (with unset()

[PHP] url fopen() failed to open stream

2007-03-08 Thread Michael Clayfield
when i open up a url with fopen(), i get this error message:* Warning*: fopen(http://sumurlhere.whatever/index.html) [function.fopen http://127.0.0.1/bots2/function.fopen]: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period

Re: [PHP] Joke of the day problem

2007-03-08 Thread jekillen
On Mar 8, 2007, at 5:30 AM, Delta Storm wrote: Hi, again me with the silly questions... I need a script that will take data from MySQL database and display one row each day. I have googled, but with no luck. The database retrieving mechanism is of course clear but I really dont know how

Re: [PHP] php and javascript error

2007-03-08 Thread jekillen
On Mar 7, 2007, at 11:46 PM, Tijnema ! wrote: Just a little side note, you said that firefox wasn't giving an error, i think it does, but that it hides the error. Open your page, and then go to Tools-javascript console. There it will display all javascript errors. And gives a nice detailed

Re: [PHP] Is there a way to un include a file

2007-03-08 Thread Chris
jekillen wrote: On Mar 7, 2007, at 11:47 PM, Larry Garfield wrote: No there is not, because an included file *executes* at the time it is included and is then done. Any memory-resident objects (function/class definitions, variables, etc.) that it defies then exist until you make them

Re: [PHP] Urgent: Way to XML-parse data with f n=name /f tags?

2007-03-08 Thread Myron Turner
Myron Turner wrote: Rob Gould wrote: The problem I'm having is that the XML data that comes back from the host doesn't just have eventname /eventname tags. It has f n=eventnamedatahere/f tags, and I don't know how to get the XML parser to read the values using that format. (And I don't

Re: [PHP] Joke of the day problem

2007-03-08 Thread Paul Novitski
At 3/8/2007 05:30 AM, Delta Storm wrote: I need a script that will take data from MySQL database and display one row each day. ... The database retrieving mechanism is of course clear but I really dont know how to do a 24h delay before the next row is displayed. Hi Delta, You haven't

Re: [PHP] $35 to the first person who can do this XML-parsing PHP script

2007-03-08 Thread Rob Gould
I have to say this is the most helpful listserve I've ever joined! Such friendly people and such good information. Well, the main thing I learned is - - - PHP 5 rocks, and PHP 4 semi- rocks, but not enough to make XML-parsing enjoyable. So, what I did was I installed MAMP on my Mac OS X

[PHP] Passing a class through an array

2007-03-08 Thread Jeff Taylor
Hey all, I'm very new to programming and PHP. I want to pass instances of a class through an array, and then use a foreach later to grab details of each class at once... but it returns a fatal error Code: $me = new Toon('Toon1','1') $him = new Toon('Toon2','0') $characterListing = array($me,

Re: [PHP] PHP Design View

2007-03-08 Thread Chris
Fred wrote: Hello What program whould i use to see a design view of php scripts not on a server. Im running Windows XP Pro sp2. I thought Dreamweaver did but as i was going to buy a friend told me it cant see design only the script. PHP doesn't have a 'design view', your HTML controls that,

Re: [PHP] Passing a class through an array

2007-03-08 Thread Jim Lucas
Jeff Taylor wrote: Hey all, I'm very new to programming and PHP. I want to pass instances of a class through an array, and then use a foreach later to grab details of each class at once... but it returns a fatal error Code: $me = new Toon('Toon1','1') $him = new Toon('Toon2','0')

Re: [PHP] IE not uploading files

2007-03-08 Thread Tijnema !
Hi, Can you post your HTML code of the form used? I don't really think the problem is in PHP, as it looks like a client side problem, and PHP is server side Tijnema On 3/9/07, Skip Evans [EMAIL PROTECTED] wrote: Hey all, I have the following code uploading and image to a directory