Re: [PHP] Newbie question: need to transfer directory contents fr om my local machine to my website

2006-01-04 Thread Jochem Maas
Jim Moseby wrote: ... Perhaps I misunderstand what the OP wanted. I thought he was running a webserver somewhere, and that he wanted his remote webserver to be able to grab a file listing on his local machine by just visiting a webpage there. if you ask me it wasn't very clear what the

[PHP] Newbie question: need to transfer directory contents from my local machine to my website

2006-01-03 Thread Jon Westcot
Hi all: I'm really new at PHP and will probably embarrass myself many times over asking questions that have been asked gazillions of times before, so let this serve as a blanket apology. Now, to my question. Here's what I'm trying to do. I have a simple database on my website that I

Re: [PHP] php newbie question with xml files

2005-05-04 Thread Mark Cain
; $new_data = preg_replace('/(.*)(\/.*)$/i', '$1' . $my_data . '$2', file_get_contents('./test.txt')); echo $new_data; Mark Cain - Original Message - From: Jared Sherman [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Tuesday, May 03, 2005 2:00 AM Subject: [PHP] php newbie question with xml

Re: [PHP] php newbie question with xml files

2005-05-04 Thread Mark Cain
; $new_data = preg_replace('/(.*)(\/.*)$/i', '$1' . $my_data . '$2', file_get_contents('./test.txt')); echo $new_data; Mark Cain - Original Message - From: Jared Sherman [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Tuesday, May 03, 2005 2:00 AM Subject: [PHP] php newbie question with xml

Re: [PHP] php newbie question with xml files

2005-05-04 Thread disguised.jedi
I have an xml document storing some data I need. What I want to do is this: 1. Scan to the end of the file. 2. Find the closing tag. 3. Insert a new entry in before the closing tag. There are specific classes and functions in the PHP core that can help you do just this. I've tried: 1.

Re: [PHP] php newbie question with xml files

2005-05-04 Thread Jason Barnett
PHP5: http://php.net/manual/en/ref.dom.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: php newbie question with xml files

2005-05-04 Thread Jared Sherman
Thanks these pointers have helped alot. Jared Sherman [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have an xml document storing some data I need. What I want to do is this: 1. Scan to the end of the file. 2. Find the closing tag. 3. Insert a new entry in before the closing

[PHP] php newbie question with xml files

2005-05-03 Thread Jared Sherman
I have an xml document storing some data I need. What I want to do is this: 1. Scan to the end of the file. 2. Find the closing tag. 3. Insert a new entry in before the closing tag. I've tried: 1. Creating new files and renaming them to be the original. 2. Writing the file to a dummy file and

[PHP] Newbie Question - an If in an Array?

2005-03-28 Thread Jackson Linux
I'm so confused. I have an array : $display[] = div class='job-date'{$cv['dates']}/div div class='job-title'{$cv['job_title']}/div div class='company'{$cv['company']}/div div class='job'{$cv['job']}/div; In SOME of the rows of this table, there is a field

[PHP] Newbie Question: breaking a substr() string on a space

2005-03-11 Thread Jackson Linux
Hi, everyone, I apologise if this posts twice; I'm having issues with my outgoing email server. I'm making 'teasers' of the first, say 200 to 250 characters of some articles. This works great: $content = strip_tags($article['content']); $striptease = substr($content, 0, 275); but cuts

RE: [PHP] Newbie Question: breaking a substr() string on a space

2005-03-11 Thread Jay Blanchard
[snip] Hi, everyone, I apologise if this posts twice; I'm having issues with my outgoing email server. I'm making 'teasers' of the first, say 200 to 250 characters of some articles. This works great: $content = strip_tags($article['content']); $striptease = substr($content, 0, 275);

[PHP] Newbie Question: breaking a substr() string on a space

2005-03-11 Thread Jackson Linux
Hi, everyone, I'm 'teasers' of the first, say 200 to 250 characters of some articles. This works great: $content = strip_tags($article['content']); $striptease = substr($content, 0, 275); but cuts off words right in the midd ... I'd like to find a way to take $content, look at the first

Re: [PHP] Newbie Question: breaking a substr() string on a space

2005-03-11 Thread John Nichel
Jackson Linux wrote: Hi, everyone, I apologise if this posts twice; I'm having issues with my outgoing email server. I'm making 'teasers' of the first, say 200 to 250 characters of some articles. This works great: $content = strip_tags($article['content']); $striptease =

Re: [PHP] Newbie Question: breaking a substr() string on a space

2005-03-11 Thread Richard Lynch
Hi, everyone, I'm 'teasers' of the first, say 200 to 250 characters of some articles. This works great: $content = strip_tags($article['content']); $striptease = substr($content, 0, 275); but cuts off words right in the midd ... I'd like to find a way to take $content, look

Re: [PHP] Newbie Question: breaking a substr() string on a space SOLVED

2005-03-11 Thread Jackson Linux
Hi, everyone, Thanks for the great suggestions! I've looked at all and found that the one here: http://www.php.net/explode that Jay recommended was the easiest for me to wrap my brain around. I wll tinker with the other ones as well - it's all really interesting. The function was: function

RE: [PHP] Newbie Question re substr

2005-03-08 Thread Kim Madsen
From: Jackson Linux [mailto:[EMAIL PROTECTED] Sent: 8. marts 2005 04:23 First of all, echo the output to see if You get, what Tou expect in a debug situation: if (!empty($where)) { echo  ul; $article = mysql_fetch_assoc($result); } else { while ($article = mysql_fetch_assoc($result)) {

Fwd: [PHP] Newbie Question re substr

2005-03-08 Thread Jackson Linux
Thanks, Kim! Still having difficulties though.. On 8 Mar 2005, at 03:29, Kim Madsen wrote: From: Jackson Linux [mailto:[EMAIL PROTECTED] Sent: 8. marts 2005 04:23 First of all, echo the output to see if You get, what Tou expect in a debug situation: if (!empty($where)) { echo  ul;

Re: [PHP] Newbie Question re substr

2005-03-08 Thread Jackson Linux
On 8 Mar 2005, at 11:40, Richard Lynch wrote: 1. $content = substr($article['content'], 0 200); // get first 200 chars is choking, and I've looked in docs and can't understand why. I get Parse error: parse error, unexpected T_LNUMBER in /usr/www/users/domain/dynamic/templates/substr.htm

Re: [PHP] Newbie question: qutoes?

2005-03-08 Thread Richard Lynch
James Williams wrote: rory walsh wrote: Can anyone tell me if there is a difference between double quotes and single quotes? Cheers, Rory. What's up Rory... actually there *is* a difference. Double quotes are parsed by the php engine, meaning it goes through and finds variables and stuff

[PHP] Re [PHP] Newbie Question re substr: Solved

2005-03-08 Thread Jackson Linux
Sorry if this posts twice. Thanks everyone for the help. The missing comma was the problem with the display; the missing specification of the column at the start of the sql query was the problem with getting the data from the column. Again, thanks all who replied for the fast and excellent

Re: [PHP] Newbie Question re substr

2005-03-08 Thread Richard Lynch
Jackson Linux wrote: On 8 Mar 2005, at 11:40, Richard Lynch wrote: 1. $content = substr($article['content'], 0 200); // get first 200 chars is choking, and I've looked in docs and can't understand why. I get Parse error: parse error, unexpected T_LNUMBER in

[PHP] Newbie Question re substr

2005-03-07 Thread Jackson Linux
Hi, I'm really new and getting lots of help but need some assistance. I'm running a script which gets specific articles from a database if they're entered in the URL after the ? . For instance if someone asks for www.foo.com/index.htm?a=1234 then the script would look for an database entry with

Re: [PHP] Newbie Question re substr

2005-03-07 Thread Zareef Ahmed
On Mon, 7 Mar 2005 22:23:19 -0500, Jackson Linux [EMAIL PROTECTED] wrote: Hi, I'm really new and getting lots of help but need some assistance. I'm running a script which gets specific articles from a database if they're entered in the URL after the ? . For instance if someone asks for

Re: [PHP] Newbie Question re substr

2005-03-07 Thread Jackson Linux
Zareef, Almost On 7 Mar 2005, at 23:52, Zareef Ahmed wrote: From: [EMAIL PROTECTED] Subject:Re: [PHP] Newbie Question re substr Date: 7 March 2005 23:52:15 GMT-05:00 To: [EMAIL PROTECTED] Cc: php-general@lists.php.net

[PHP] Newbie question: qutoes?

2005-03-06 Thread rory walsh
Can anyone tell me if there is a difference between double quotes and single quotes? Cheers, Rory. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Newbie question: qutoes?

2005-03-06 Thread James Williams
rory walsh wrote: Can anyone tell me if there is a difference between double quotes and single quotes? Cheers, Rory. What's up Rory... actually there *is* a difference. Double quotes are parsed by the php engine, meaning it goes through and finds variables and stuff which it can parse, ex.

Re: [PHP] Newbie question: qutoes?

2005-03-06 Thread Jochem Maas
rory walsh wrote: Can anyone tell me if there is a difference between double quotes and single quotes? Cheers, Rory. apart from the visual difference :-)... yes. with double quotes string interpolation is done. whats that? run this code to see the difference: ?php $varA = 123; echo ' this is

Re: [PHP] Newbie question: qutoes?

2005-03-06 Thread Matt Harnaga
Double quotes expand variables, that is, if $a = 2, then echo The value is $a2; will print The value is 2. Single quotes return strings literally. So, echo 'The value is $a2' would print The value is $a2 Cheers rory walsh wrote: Can anyone tell me if there is a difference between double quotes

Re: [PHP] Newbie question: qutoes?

2005-03-06 Thread rory walsh
Thanks guys, that clears up a lot! Cheers, actually I have to say goodbye to broadband for a while so I hope that I can make it on my own! That's why I have been asking all these obvious little questions! Cheers, Rory. Jochem Maas wrote: rory walsh wrote: Can anyone tell me if there is a

Re: [PHP] Newbie question: qutoes?

2005-03-06 Thread Matt Harnaga
You might want to check this out as well: http://www.zend.com/zend/tut/using-strings.php rory walsh wrote: Can anyone tell me if there is a difference between double quotes and single quotes? Cheers, Rory. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Newbie question

2005-02-18 Thread Adams, Tom
Does anyone know how to force PHP to require all local variables to be declared prior to use or if this is even possible? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Newbie question

2005-02-18 Thread Adrian
error_reporting(E_ALL); Then you will get a notice when you try to read a variable which doesn't exist. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] newbie question regarding forms and drop down list

2005-02-03 Thread Max Krone
I am pretty new to php, so if I am asking a poor question, please forgive me. I have a few input forms using html and php that will take input from text boxes and then put that input into a MySql database. All of the information for the form is put in between a form method element. When I try to

Re: [PHP] newbie question regarding forms and drop down list

2005-02-03 Thread W Luke
On Thu, 3 Feb 2005 15:45:51 -0800, Max Krone [EMAIL PROTECTED] wrote: I assume I am just missing something dumb. Could someone please enlighten me. I can post my code if it will help. Code please, Max! -- Will The Corridor of Uncertainty http://www.cricket.mailliw.com/ - Sanity is a

[PHP] newbie question ; calling php script with parrameters from html

2005-02-02 Thread Sagaert Johan
can i use this kind of construction in my html code ? a href=test.php?selection=highSelect high/a if yes , how do i retrieve the passed string in the php code Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

AW: [PHP] newbie question ; calling php script with parrameters from html

2005-02-02 Thread Mirco Blitz
: Mittwoch, 2. Februar 2005 11:38 An: php-general@lists.php.net Betreff: [PHP] newbie question ; calling php script with parrameters from html can i use this kind of construction in my html code ? a href=test.php?selection=highSelect high/a if yes , how do i retrieve the passed string in the php

RE: [PHP] newbie question ; calling php script with parrameters from html

2005-02-02 Thread Chris W. Parker
Sagaert Johan mailto:[EMAIL PROTECTED] on Wednesday, February 02, 2005 2:38 AM said: can i use this kind of construction in my html code ? a href=test.php?selection=highSelect high/a Yes. if yes , how do i retrieve the passed string in the php code ?php $value =

[PHP] Newbie question? diagnosing a script

2004-12-22 Thread Al Guevara
Hi Yall! I dont know if Im goin overboard askin this, but here goes... What /how does one use to diagnose a php script (for a link exchange) as to why it wont work/write to the file? With Cgi, one can use a telnet shell.. is there a thing to use for diagnosing php? Thank Mucho submit

Re: [PHP] Newbie question? diagnosing a script

2004-12-22 Thread Richard Lynch
Al Guevara wrote: I dont know if Im goin overboard askin this, but here goes... What /how does one use to diagnose a php script (for a link exchange) as to why it wont work/write to the file? With Cgi, one can use a telnet shell.. is there a thing to use for diagnosing php? Perhaps

[PHP] Newbie question

2004-11-28 Thread Pascal Platteeuw
Hello everyone, Here is a newbie question for you guys who are much more advanced than me :-) I want ot do an automatic redirection in a php page... Is there something equivalent to response.redirect used in ASP? Thanks in advance, Pascal Platteeuw -- PHP General Mailing List

RE: [PHP] Newbie question

2004-11-28 Thread Mike
Look at header() http://us2.php.net/manual/en/function.header.php -M -Original Message- From: Pascal Platteeuw [mailto:[EMAIL PROTECTED] Sent: Sunday, November 28, 2004 11:34 AM To: [EMAIL PROTECTED] Subject: [PHP] Newbie question Hello everyone, Here is a newbie question

Re: [PHP] Newbie question

2004-11-28 Thread John Nichel
Pascal Platteeuw wrote: Hello everyone, Here is a newbie question for you guys who are much more advanced than me :-) I want ot do an automatic redirection in a php page... Is there something equivalent to response.redirect used in ASP? Thanks in advance, Pascal Platteeuw http://us4.php.net/header

Re: [PHP] newbie question

2004-11-15 Thread Richard Davey
Hello Max, Monday, November 15, 2004, 6:26:43 PM, you wrote: MK } else if ($_POST[FirstName] != ) { Where you use $_POST you should have the syntax as follows: $_POST['var'] (note the quote marks) Without them, PHP is going to think you're passing in a constant called FirstName (etc) which

[PHP] newbie question

2004-11-15 Thread Max Krone
Hello all, I am new to php programming and web programming in general. I have created a php file that if it works will create a simple form for inputing contact information and then once the submit button is pressed, the information is saved into a MySQL database. When I try to submit, I get no

RE: [PHP] newbie question

2004-11-15 Thread Chris W. Parker
Greg Donald mailto:[EMAIL PROTECTED] on Monday, November 15, 2004 11:08 AM said: ?php if ($_POST[FirstName] == ) { $display_block = h1Add an Entry/h1 form method=\post\ action=\$_SERVER[PHP_SELF]\ PstrongFirst/Last Names:/strongbr input type=\text\

Re: [PHP] newbie question

2004-11-15 Thread Greg Donald
On Mon, 15 Nov 2004 10:26:43 -0800, Max Krone [EMAIL PROTECTED] wrote: When I try to submit, I get no error messages, but no data goes into the MySQL table. I have verified that my MySQL User and Password are correct and I believe I am actually connecting to the database. Please look at what

[PHP] Newbie Question: DHTML client Http Post to PHP running under Apache/Win XP

2004-08-27 Thread Bestman4unowwa
Does the PHP script have to be already running to communicate send a HTTP Post varibale to it (from a DHTML client browser)? Or can it initiate the HTTP Post fron the client that activates the PHP script? I know this must seems simple but I'm having troble receiving these varible from my

Re: [PHP] Newbie Question: DHTML client Http Post to PHP running under Apache/Win XP

2004-08-27 Thread John Holmes
From: [EMAIL PROTECTED] Does the PHP script have to be already running to communicate send a HTTP Post varibale to it (from a DHTML client browser)? Or can it initiate the HTTP Post fron the client that activates the PHP script? Just like any other web page, the POST request causes the web server

[PHP] Newbie question about isset and binary conditionals

2004-06-07 Thread Al
I posted this previously; but the subject was misleading. I could use one additional clarification regarding good practice. As I understand the php manual the following is acceptable and I assume good practice. $foo= TRUE; if($foo) do.. ; where $foo is a binary; but not a variable.

[PHP] Newbie question about isset and binary conditionals

2004-06-07 Thread Al
I posted this previously; but the subject was misleading. I could use one additional clarification regarding good practice. As I understand the php manual the following is acceptable and I assume good practice. $foo= TRUE; if($foo) do.. ; where $foo is a binary; but not a variable.

RE: [PHP] Newbie question about isset and binary conditionals

2004-06-07 Thread Ford, Mike [LSS]
On 07 June 2004 14:04, Al wrote: I posted this previously; but the subject was misleading. You seem to have several possible misconceptions in your posting -- this may just be me misreading you, but anyway... I could use one additional clarification regarding good practice. As I understand

Re: [PHP] Newbie question about isset and binary conditionals

2004-06-07 Thread Al
That's a big help Mike. My server has the error level set such that my incorrect use of if($var) did not show undefined variables. Though everything seemed to work OK. I'm going my code and using if( TRUE or FALSE) isset() and empty() as appropriate. Al.. Mike Ford wrote: On 07 June

Re: [PHP] Newbie question about good coding practice [isset]

2004-06-06 Thread Justin Patrin
Curt Zirzow wrote: * Thus wrote K.Bogac Bokeer ([EMAIL PROTECTED]): When $var is 0? ? $var = 0; or $var = ''; $var = array(); $var = false; // Output: $var: $var not exists if ( $var ) echo '$var: $var existsbr'; else Curt or null -- paperCrane Justin Patrin -- PHP General Mailing

[PHP] Newbie question about good coding practice [isset]

2004-06-05 Thread Al
if($var) do something; verses if(isset($var)) do something; The simple form if($var) seems to work fine and I see it in code often. Is there a good reason for using isset? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Newbie question about good coding practice [isset]

2004-06-05 Thread Larry E . Ullman
if($var) do something; verses if(isset($var)) do something; The simple form if($var) seems to work fine and I see it in code often. Is there a good reason for using isset? Yes, if you don't use isset(), you may see notices (errors) if the variable is not set. This depends upon the error reporting

Re: [PHP] Newbie question about good coding practice [isset]

2004-06-05 Thread K.Bogac Bokeer
When $var is 0? ? $var = 0; // Output: $var: $var not exists if ( $var ) echo '$var: $var existsbr'; else echo '$var: $var not existsbr'; // Output: isset(): var exists if ( isset($var) ) echo 'isset(): $var existsbr'; else echo 'isset(): $var not existsbr'; ? Larry E

Re: [PHP] Newbie question about good coding practice [isset]

2004-06-05 Thread Curt Zirzow
* Thus wrote K.Bogac Bokeer ([EMAIL PROTECTED]): When $var is 0? ? $var = 0; or $var = ''; $var = array(); $var = false; // Output: $var: $var not exists if ( $var ) echo '$var: $var existsbr'; else Curt -- I used to think I was indecisive, but now I'm not so

[PHP] (Newbie question) Advice on comment system (no db!) design issues

2004-06-03 Thread Yngve
Hi! I am about to write a comment system in PHP, but as i am not any good at PHP i am seeking some advice. This is what i want from the system: * Flexibility! I want to be able to attach it where i want let the user give comments easily. For example comments could be on a blog entry or on a

Re: [PHP] Newbie Question: Variables on the fly

2004-05-28 Thread PHP4web
them in normal shape if you get my point - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, May 28, 2004 8:01 AM Subject: RE: [PHP] Newbie Question: Variables on the fly Thanks for the reply Denis, Let me elaborate a bit. I have a php

RE: [PHP] Newbie Question: Variables on the fly

2004-05-28 Thread Steve Edberg
into some kind of variables. Ultimately, you'll have to give a better of sense of the end result you'd like. Dennis Seavers [Original Message] From: [EMAIL PROTECTED] To: PHP List [EMAIL PROTECTED] Date: 05/27/2004 9:17:11 PM Subject: [PHP] Newbie Question: Variables on the fly Hello, I'm sure

Re: [PHP] Newbie Question: Variables on the fly

2004-05-28 Thread Curt Zirzow
* Thus wrote Steve Edberg ([EMAIL PROTECTED]): At 2:01 AM -0300 5/28/04, [EMAIL PROTECTED] wrote: However, most of what you can do with them can be done more simply with arrays. In your example above, use myPage.php?dataPoint[]=10dataPoint[]=20dataPoint[]=30 I'd also suggest to

RE: [PHP] Newbie Question: Variables on the fly

2004-05-28 Thread Tim Winters
[Original Message] From: [EMAIL PROTECTED] To: PHP List [EMAIL PROTECTED] Date: 05/27/2004 9:17:11 PM Subject: [PHP] Newbie Question: Variables on the fly Hello, I'm sure this is a newbie question but I don't know the syntax. I want to create a series of variables within a php script

[PHP] Newbie Question: Variables on the fly

2004-05-27 Thread csnm
Hello, I'm sure this is a newbie question but I don't know the syntax. I want to create a series of variables within a php script at runtime with a for loop. eg myVar1 myVar2 myVar3 etc What is the proper syntax to do this? Thanks, Tim -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] Newbie Question: Variables on the fly

2004-05-27 Thread Dennis Seavers
: [EMAIL PROTECTED] To: PHP List [EMAIL PROTECTED] Date: 05/27/2004 9:17:11 PM Subject: [PHP] Newbie Question: Variables on the fly Hello, I'm sure this is a newbie question but I don't know the syntax. I want to create a series of variables within a php script at runtime with a for loop. eg

RE: [PHP] Newbie Question: Variables on the fly

2004-05-27 Thread Dennis Seavers
Message] From: Dennis Seavers [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Date: 05/27/2004 9:30:19 PM Subject: RE: [PHP] Newbie Question: Variables on the fly Maybe others will catch on to your intention, but I think you need to provide a bit more information. For example

RE: [PHP] Newbie Question: Variables on the fly

2004-05-27 Thread csnm
of the end result you'd like. Dennis Seavers [Original Message] From: [EMAIL PROTECTED] To: PHP List [EMAIL PROTECTED] Date: 05/27/2004 9:17:11 PM Subject: [PHP] Newbie Question: Variables on the fly Hello, I'm sure this is a newbie question but I don't know the syntax. I want to create

[PHP] newbie question about preg_match

2004-05-20 Thread Al
I'm trying to compose a general purpose text snip expression to extract a text segment from a string. Should this work for all reasonable cases? It seems to work for several test strings. $start= str1; $end= str2; preg_match (|$start (.*) ? $end |i, $contents, $text); $segment= $text[1];

Re: [PHP] newbie question about preg_match

2004-05-20 Thread John W. Holmes
From: Al [EMAIL PROTECTED] I'm trying to compose a general purpose text snip expression to extract a text segment from a string. Should this work for all reasonable cases? It seems to work for several test strings. $start= str1; $end= str2; preg_match (|$start (.*) ? $end |i,

Re: [PHP] newbie question about preg_match

2004-05-20 Thread Al
If I have multiple instances that match the pattern, but only want the first one, which is the best way to handle it? Putting the U flag seems to work, but I don't understand the full implications of using it here. preg_match(|$start(.*?)$end |Ui, $contents, $text); Alternatively, I could use

RE: [PHP] newbie question about preg_match

2004-05-20 Thread Chris W. Parker
Al mailto:[EMAIL PROTECTED] on Thursday, May 20, 2004 12:51 PM said: If I have multiple instances that match the pattern, but only want the first one, which is the best way to handle it? reread the last sentence in John's post. John W. Holmes wrote: From: Al [EMAIL PROTECTED] [snip]

[PHP] Newbie question about operators

2004-04-07 Thread Gabe
Looking at the code below, what exactly is happening with the $name=$value part? I looked in the PHP online documentation and I can't find that operator. What is it doing exactly and what is it called? foreach ($some_array as $name=$value) { ... some code ... } Thanks alot! -- PHP General

Re: [PHP] Newbie question about operators

2004-04-07 Thread Matt Matijevich
[snip] foreach ($some_array as $name=$value) { ... some code ... } [/snip] http://www.php.net/foreach will give you a good explanation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Newbie question about operators

2004-04-07 Thread Gabe
Thanks for the page. That was helpful. Just to make sure, is that operator only typically used then with foreach loops and arrays? Matt Matijevich [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [snip] foreach ($some_array as $name=$value) { ... some code ... } [/snip]

Re: [PHP] Newbie question about operators

2004-04-07 Thread Red Wingate
arrays :-) you are defining arrays like: $x = array ( 'a' = 'Apple' , 'b' = 'Banana' , ... ); -- red Gabe wrote: Thanks for the page. That was helpful. Just to make sure, is that operator only typically used then with foreach loops and arrays? Matt Matijevich [EMAIL PROTECTED] wrote in

[PHP] Newbie question on arrays

2004-03-28 Thread Willem van der Scheun
Hi, I've written the piece of code below and I do not get any output out of the 2 dimensional array. I do not see what's wrong. Must be something obvious I guess. ?php $monthname[NL][1] = Januari; $monthname[NL][2] = Februari; $monthname[NL][3] = Maart; $monthname[NL][4] = April;

[PHP] Newbie question on Array

2004-03-28 Thread carlson
Sorry, I am new and could not supply the correct search strings on search sites to answer by question. I am trying to construct an array with key-value from a resultSet which will be used often within the page or between pages. Which looks like this: $optionBox=select used_1, rub from

Re: [PHP] Newbie question on Array

2004-03-28 Thread Jason Wong
On Monday 29 March 2004 03:27, [EMAIL PROTECTED] wrote: I am trying to construct an array with key-value from a resultSet which will be used often within the page or between pages. Which looks like this: $optionBox=select used_1, rub from rub_table order by rub asc;

[PHP] newbie question

2004-02-24 Thread wannes
hi - i don't know much about php, but somehow i managed to install a simple php-guestbook on my website: http://www.maanzand.be/guestbookk/readbook.php unfortunately, i cannot get it to work everything seems fine, but i can't manage to write to the guestbook.txt file (permissions are

Re: [PHP] newbie question

2004-02-24 Thread Chris Hayes
could it be that this is an old script that requires register_globals to be turned ON or so? if you can read Dutch, read http://www.phpfreakz.nl/artikelen.php?aid=88 At 12:25 24-2-04, you wrote: hi - i don't know much about php, but somehow i managed to install a simple php-guestbook on my

[PHP] Newbie question

2004-01-13 Thread James Marcinek
Hello Everyone, I'm new to this so forgive my ignorance. I'm trying to use php with MySQL as a database. I'm using apache 2.0 in addition to Mysql 4.1. I created a simple page (using book to learn) and when I try to go to a simple php script I recieve the following error: Call to undefined

Re: [PHP] Newbie question

2004-01-13 Thread Richard Davey
Hello James, Tuesday, January 13, 2004, 3:37:17 PM, you wrote: JM The book I'm learning from had some simple examples pages that I created JM early on and they work; however this is the first attempt at trying to use JM php to connect. Post your code (if it's from a book I'm guessing it isn't

RE: [PHP] Newbie question

2004-01-13 Thread Sam Masiello
It appears as if you don't have MySQL support compiled in with your PHP build. If you installed it from source you will want to recompile PHP with the --with-mysql option. I have never installed PHP from RPM though so if you installed it that way, perhaps someone else in the group can provide

[PHP] Newbie question... date.

2004-01-13 Thread DL
Hi all, I was wondering how you get the year, month, and day from a timestamp. (mySQL timestamp, Eg: 20040113130137) What PHP function(s) do I use? An example would be great Cheers, David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Newbie question... date.

2004-01-13 Thread Chris Boget
I was wondering how you get the year, month, and day from a timestamp. (mySQL timestamp, Eg: 20040113130137) What PHP function(s) do I use? An example would be great I *believe* you can use strtotime(); Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Newbie question... date.

2004-01-13 Thread Ray
On Tuesday 13 January 2004 13:57, DL wrote: Hi all, I was wondering how you get the year, month, and day from a timestamp. (mySQL timestamp, Eg: 20040113130137) What PHP function(s) do I use? An example would be great Cheers, David http://www.php.net/manual/en/function.strtotime.php

[PHP] newbie question about header()

2003-12-21 Thread Scott Taylor
I am simply trying to redirect users from one page to another. Yet when I use this code I get the following error: *Warning*: Cannot add header information - headers already sent by (output started at /usr/local/psa/home/vhosts/miningstocks.com/httpdocs/etc/php/login/admin/test.php:8) in

Re: [PHP] newbie question about header()

2003-12-21 Thread Website Managers.net
] newbie question about header() | | | I am simply trying to redirect users from one page to another. Yet when | I use this code I get the following error: | | *Warning*: Cannot add header information - headers already sent by | (output started at | /usr/local/psa/home/vhosts/miningstocks.com

Re: [PHP] newbie question about header()

2003-12-21 Thread John W. Holmes
Scott Taylor wrote: I am simply trying to redirect users from one page to another. Yet when I use this code I get the following error: *Warning*: Cannot add header information - headers already sent by (output started at

Re: [PHP] newbie question about header()

2003-12-21 Thread Justin French
On Monday, December 22, 2003, at 01:13 PM, Website Managers.net wrote: Unless you're using an 'if' statement, the header redirect must be the first line of the page, above any HTML markup. That's not entirely accurate. ---Quoted from http://php.net/header --- Remember that header() must be

[PHP] newbie question about scope

2003-11-12 Thread news.comcast.giganews.com
I am an experienced web developer who is just getting into php. I have had a php project fall into my lap and wanted a little advice. Here is the scoop: A client moved their site from a server (unknown details) to a hosting facility (php 4.3.2). Now none of the scripts work. I have

Re: [PHP] newbie question about scope

2003-11-12 Thread Derek Ford
news.comcast.giganews.com wrote: I am an experienced web developer who is just getting into php. I have had a php project fall into my lap and wanted a little advice. Here is the scoop: A client moved their site from a server (unknown details) to a hosting facility (php 4.3.2). Now none of

RE: [PHP] newbie question about scope

2003-11-12 Thread Jay Blanchard
[snip] A client moved their site from a server (unknown details) to a hosting facility (php 4.3.2). Now none of the scripts work. I have guessed that they are coming from an earlier version of apache/php. [/snip] It is likely then that register_globals is set to OFF in the php.ini. In

Re: [PHP] newbie question about scope

2003-11-12 Thread news.comcast.giganews.com
Derek Ford [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] news.comcast.giganews.com wrote: I am an experienced web developer who is just getting into php. I have had a php project fall into my lap and wanted a little advice. Here is the scoop: A client moved their site

RE: [PHP] newbie question about scope

2003-11-12 Thread Jay Blanchard
[snip] Unless I'm misunderstanding something, PHP does not implement scoping (at least in the sense that many other programming languages do) prior to PHP5. [/snip] Actually it does implement scoping, see http://us2.php.net/language.variables.scope -- PHP General Mailing List

Re: [PHP] Newbie question about Class

2003-10-17 Thread Becoming Digital
PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, 15 October, 2003 14:15 Subject: Re: [PHP] Newbie question about Class I was afraid that was the case. Tom Rogers wrote: Hi, Thursday, October 16, 2003, 3:35:56 AM, you wrote: A My question seems fundamental. I want to set a variable in one

Re: [PHP] Newbie question about Class

2003-10-17 Thread Rory McKinley
, October 15, 2003 8:15 PM Subject: Re: [PHP] Newbie question about Class I was afraid that was the case. Tom Rogers wrote: Hi, Thursday, October 16, 2003, 3:35:56 AM, you wrote: A My question seems fundamental. I want to set a variable in one function A in a class and then want to use

[PHP] Newbie question about Class

2003-10-15 Thread Al
My question seems fundamental. I want to set a variable in one function in a class and then want to use the value in a second function. However, the functions are called a html page with two passes. Submit reloads the page and an if(...) calls the second function in the class. If I declare

RE: [PHP] Newbie question about Class

2003-10-15 Thread Chris W. Parker
Al mailto:[EMAIL PROTECTED] on Wednesday, October 15, 2003 10:36 AM said: Will the class structure do this for me or must I save the values in $GLOBAL or something? I think you'd have to send the value via $_GET or save it in a session variable if you want to retrieve it on another page.

Re: [PHP] Newbie question about Class

2003-10-15 Thread Tom Rogers
Hi, Thursday, October 16, 2003, 3:35:56 AM, you wrote: A My question seems fundamental. I want to set a variable in one function A in a class and then want to use the value in a second function. A However, the functions are called a html page with two passes. Submit A reloads the page and

Re: [PHP] Newbie question about Class

2003-10-15 Thread Al
I was afraid that was the case. Tom Rogers wrote: Hi, Thursday, October 16, 2003, 3:35:56 AM, you wrote: A My question seems fundamental. I want to set a variable in one function A in a class and then want to use the value in a second function. A However, the functions are called a html

<    1   2   3   4   5   6   >