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

2006-01-04 Thread Jim Moseby
You will not be able to do what you propose with a purely PHP solution. PHP is a server-side technology. That means all the processing is done at the server, then output to your browser. PHP, to my knowledge, has no way to inspect your computer's folders. You would need to

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

[PHP] Newbie to PHP5

2005-11-15 Thread Danny
Hi there, I´m familiar with PHP syntax, but I´ve been reading some sample scripts, in PHP5 and i´ve seen some strange things, like diferent ways to read a collection of rows, magic functions, wrapers, and operators like :: and -. I know that all is the manual, but before that anyone nows, a

Re: [PHP] Newbie to PHP5

2005-11-15 Thread Jochem Maas
Danny wrote: Hi there, I´m familiar with PHP syntax, but I´ve been reading some sample scripts, in PHP5 and i´ve seen some strange things, like diferent ways to read a collection of rows, magic functions, wrapers, and operators like :: and -. I know that all is the manual, but before that

Re: [PHP] Newbie to PHP5

2005-11-15 Thread Raz
-. I know that all is the manual, but before that anyone nows, a website or a simple tutorial or explained samples, in order that the transition from PHP4 and PHP5 were easiest as possible. http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Newbie to PHP5

2005-11-15 Thread Danny
Thanks. Any other source (some resume pdf or something like What´s new) On 11/15/05, Raz [EMAIL PROTECTED] wrote: -. I know that all is the manual, but before that anyone nows, a website or a simple tutorial or explained samples, in order that the transition from PHP4 and PHP5 were

Re: [PHP] Newbie to PHP5

2005-11-15 Thread Raz
http://uk2.php.net/manual/en/migration5.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Newbie to PHP5

2005-11-15 Thread Marcus Bointon
On 15 Nov 2005, at 10:06, Danny wrote: I´m familiar with PHP syntax, but I´ve been reading some sample scripts, in PHP5 and i´ve seen some strange things, like diferent ways to read a collection of rows, magic functions, wrapers, and operators like :: and -. I know that all is the manual,

[PHP] newbie questionsession and cookie by javascript

2005-09-22 Thread Alex Andrew Mosqueda
Hi! I there a way I can get the cookie data stored by javascript(client side) in php(server side) and vice versa? Thanks.

Re: [PHP] Newbie: Safe function call to a .inc file outside the web folder

2005-08-28 Thread Chris Shiflett
Edward Vermillion wrote: I was under the the impression that the non-'HTTP_*' keys in the $_SERVER array came from the server itself. All of that data comes from the server, but it's difficult to determine which data can be influenced by information within the HTTP request. In other words,

Re: [PHP] Newbie: Safe function call to a .inc file outside the web folder

2005-08-26 Thread Edward Vermillion
Chris Shiflett wrote: Because $_SERVER['SERVER_NAME'] can be manipulated by the user in some cases, you must consider $temp tainted at this point. I was under the the impression that the non-'HTTP_*' keys in the $_SERVER array came from the server itself. Obvoiusly I'm wrong, but I'm

Re: [PHP] Newbie: Safe function call to a .inc file outside the web folder

2005-08-26 Thread Richard Lynch
On Fri, August 26, 2005 5:55 am, Edward Vermillion wrote: Chris Shiflett wrote: Because $_SERVER['SERVER_NAME'] can be manipulated by the user in some cases, you must consider $temp tainted at this point. I was under the the impression that the non-'HTTP_*' keys in the $_SERVER array came

Re: [PHP] Newbie: Safe function call to a .inc file outside the web folder

2005-08-26 Thread Edward Vermillion
Richard Lynch wrote: Disclaimer: I really have no idea how it could harm you, but if Chris Shifflett warns against it, don't do it. :-) That was the assumption I was running under, which is why I was very curious about it. ;) Thanks for the explanation. I'm still not 100% on how a

[PHP] Newbie: Safe function call to a .inc file outside the web folder

2005-08-25 Thread Graham Anderson
I am relatively new to security Is the below reasonable safe ? I have all of my main functions outside the web folder I am including this function with every php script that accesses fonovisa.inc function getBrain() { $temp = explode('.', $_SERVER['SERVER_NAME']); // returns

Re: [PHP] Newbie: Safe function call to a .inc file outside the web folder

2005-08-25 Thread Chris Shiflett
Graham Anderson wrote: Is the below reasonable safe ? I have all of my main functions outside the web folder I am including this function with every php script that accesses fonovisa.inc function getBrain() { $temp = explode('.', $_SERVER['SERVER_NAME']); Because $_SERVER['SERVER_NAME']

Re: [PHP] Newbie: Safe function call to a .inc file outside the web folder

2005-08-25 Thread Graham Anderson
Is their some other reasonably safe way to call to the script outside the web folder ? Or, is there some other secure method to get the server name? As an alternative: I tried using a relative path: FROM the php script location TO the fono.inc script location outside the web folder $mypath =

Re: [PHP] Newbie: Safe function call to a .inc file outside the web folder

2005-08-25 Thread Chris Shiflett
Graham Anderson wrote: Is their some other reasonably safe way to call to the script outside the web folder? Assuming you don't have too many hosts, a better way to write this: $brainPath = /home/.$server./includes/fonovisa.inc; is to use a switch statement to make sure $server is valid:

[PHP] Newbie: How to universalize a mysql=xml script

2005-08-24 Thread Graham Anderson
Hi I am try to create a generic function that takes any mysql found set and creates and custom tiered xml list The below works but seems a bit kludgy :( Code synopsis: If we are are on a new row and the first value in that row , artist, is different...then do something Is there a cleaner

[PHP] [NEWBIE GUIDE] For the benefit of new members

2005-08-22 Thread Jay Blanchard
= Please feel free to add more points and send to the list. 20050322jb - Note the new location of PHP Editors list. = 1. If you have any queries/problems about PHP try

[PHP] [NEWBIE GUIDE] For the benefit of new members

2005-08-18 Thread Jay Blanchard
= Please feel free to add more points and send to the list. 20050322jb - Note the new location of PHP Editors list. = 1. If you have any queries/problems about PHP try

Re: FW: [PHP] [NEWBIE GUIDE] For the benefit of new members

2005-08-06 Thread Jochem Maas
Rick Emery wrote: Quoting Chris W. Parker [EMAIL PROTECTED]: Rick Emery mailto:[EMAIL PROTECTED] on Friday, August 05, 2005 4:54 PM said: Well, as I found out when I Google'd before I posted, it *lists* plenty of JavaScript mailing lists. But it can hardly recommend a good one, which is

FW: [PHP] [NEWBIE GUIDE] For the benefit of new members

2005-08-05 Thread Jay Blanchard
= Please feel free to add more points and send to the list. 20050322jb - Note the new location of PHP Editors list. = 1. If you have any queries/problems about PHP try

Re: FW: [PHP] [NEWBIE GUIDE] For the benefit of new members

2005-08-05 Thread Alan Milnes
Jay Blanchard wrote: 6. PHP is a server side scripting language. Whatever processing PHP does takes place BEFORE the output reaches the client. Therefore, it is not possible to access users' computer related information (OS, screen size etc) using PHP. Nor can you modify any the user side

Re: FW: [PHP] [NEWBIE GUIDE] For the benefit of new members

2005-08-05 Thread Rick Emery
Quoting Jay Blanchard [EMAIL PROTECTED]: 6. PHP is a server side scripting language. Whatever processing PHP does takes place BEFORE the output reaches the client. Therefore, it is not possible to access users' computer related information (OS, screen size etc) using PHP. Nor can you modify any

RE: FW: [PHP] [NEWBIE GUIDE] For the benefit of new members

2005-08-05 Thread Chris W. Parker
Rick Emery mailto:[EMAIL PROTECTED] on Friday, August 05, 2005 4:20 PM said: Can anybody recommend a good JavaScript mailing list? If by anybody you mean Google, then yes anybody can recommend a good JavaScript mailing list. Hope this helps! Chris. -- PHP General Mailing List

RE: FW: [PHP] [NEWBIE GUIDE] For the benefit of new members

2005-08-05 Thread Rick Emery
Quoting Chris W. Parker [EMAIL PROTECTED]: Rick Emery mailto:[EMAIL PROTECTED] on Friday, August 05, 2005 4:20 PM said: Can anybody recommend a good JavaScript mailing list? If by anybody you mean Google, then yes anybody can recommend a good JavaScript mailing list. Well, as I found

RE: FW: [PHP] [NEWBIE GUIDE] For the benefit of new members

2005-08-05 Thread Chris W. Parker
Rick Emery mailto:[EMAIL PROTECTED] on Friday, August 05, 2005 4:54 PM said: Well, as I found out when I Google'd before I posted, it *lists* plenty of JavaScript mailing lists. But it can hardly recommend a good one, which is what I asked for, can it? I was soliciting opinions. Yes I

RE: FW: [PHP] [NEWBIE GUIDE] For the benefit of new members

2005-08-05 Thread Rick Emery
Quoting Chris W. Parker [EMAIL PROTECTED]: Rick Emery mailto:[EMAIL PROTECTED] on Friday, August 05, 2005 4:54 PM said: Well, as I found out when I Google'd before I posted, it *lists* plenty of JavaScript mailing lists. But it can hardly recommend a good one, which is what I asked for,

[PHP] Newbie Setup...

2005-06-16 Thread Chase
Hi there! I have been stumbling my way through PHP for a while now and I have finally decided that I need to set up my development machine with a local testing / debugging setup so that I can stop uploading all of my blunders to my public site to test... I am running XP Pro SP2 with IIS

Re: [PHP] Newbie Setup...

2005-06-16 Thread Greg Donald
On 6/16/05, Chase [EMAIL PROTECTED] wrote: Hi there! I have been stumbling my way through PHP for a while now and I have finally decided that I need to set up my development machine with a local testing / debugging setup so that I can stop uploading all of my blunders to my public site to

[PHP] newbie error message i don't understand....please help

2005-06-08 Thread Greg M. Price
Please help - I got Error message: Your PHP version does not have support for MySQL when I did http://x.x.x.x/install.php on windows 2003 with Php 5.04 and MySQL 5.0. Can anybody tell me what this is all about? Thanks, GMP -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] newbie error message i don't understand....please help

2005-06-08 Thread Paul Waring
On 6/8/05, Greg M. Price [EMAIL PROTECTED] wrote: Please help - I got Error message: Your PHP version does not have support for MySQL when I did http://x.x.x.x/install.php on windows 2003 with Php 5.04 and MySQL 5.0. PHP 5 doesn't come with the MySQL client libraries built-in. See:

Re: [PHP] newbie error message i don't understand....please help

2005-06-08 Thread Richard Davey
Hello Greg, Wednesday, June 8, 2005, 3:58:03 PM, you wrote: GMP Please help - I got Error message: GMP Your PHP version does not have support for MySQL GMP when I did http://x.x.x.x/install.php on windows 2003 with Php 5.04 and GMP MySQL 5.0. Possibly you don't have MySQL support enabled in

Re: [PHP] newbie error message i don't understand....please help

2005-06-08 Thread Greg M. Price
The final product here is to install Nucleus blog software (http://nucleuscms.org/) on a windows 2003 servermy IT consultant is having a problem getting PHP to see mysql both of those programs are required to make nucleus work. it's really frustrating for him ( me). Richard Davey [EMAIL

Re[2]: [PHP] newbie error message i don't understand....please help

2005-06-08 Thread Richard Davey
Hello Greg, Wednesday, June 8, 2005, 4:55:45 PM, you wrote: GMP The final product here is to install Nucleus blog software GMP (http://nucleuscms.org/) on a windows 2003 servermy IT GMP consultant is having a problem getting PHP to see mysql both of GMP those programs are required to make

RE: [PHP] newbie error message i don't understand....please help

2005-06-08 Thread Shaw, Chris - Accenture
Message- From: Greg M. Price [mailto:[EMAIL PROTECTED] Sent: 08 June 2005 16:56 To: php-general@lists.php.net Subject: Re: [PHP] newbie error message i don't understandplease help * This e-mail has been received by the Revenue Internet e-mail service

Re: [PHP] Newbie - Request interface for PHP 5 website

2005-06-03 Thread Greg Donald
On 6/2/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: For PHP 4.x sites I used my index page to capture the HTTP request and use a switch statement to call the content or task based on the $_GET and $_POST arrays. That was very inefficient and the Switch case became totally unmanageable

Re: [PHP] Newbie - Request interface for PHP 5 website

2005-06-03 Thread Jason Barnett
Greg Donald wrote: On 6/2/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: For PHP 4.x sites I used my index page to capture the HTTP request and use a switch statement to call the content or task based on the $_GET and $_POST arrays. That was very inefficient and the Switch case became totally

[PHP] Newbie - Request interface for PHP 5 website

2005-06-02 Thread [EMAIL PROTECTED]
For PHP 4.x sites I used my index page to capture the HTTP request and use a switch statement to call the content or task based on the $_GET and $_POST arrays. That was very inefficient and the Switch case became totally unmanageable along with the rest of the site. I am re-designing the site

Re: [PHP] Newbie Help

2005-05-04 Thread Richard Lynch
On Sun, May 1, 2005 7:43 pm, Thomas Bonham said: ?php if(isset($_GET ['page'])) {include($_GET ['page']..php);} So, what happens when I decide to use: http://bonhamlinux.org?page=secret If you have a file named secret.php, I just loaded it. More importantly, 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.

[PHP] [NEWBIE GUIDE] For the benefit of new posters

2005-05-04 Thread Jay Blanchard
= Please feel free to add more points and send to the list. 20050322jb - Note the new location of PHP Editors list. = 1. If you have any queries/problems about PHP try

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

Re: [PHP] Newbie Help

2005-05-02 Thread Richard Collyer
Hello, ?php if(isset($_GET['page'])) {include($_GET['page'] . .php);} else {echo(Page Not Set.);} ? Should work if you use ?page=index Might I suggest that what you are doing is a bad idea. Not only will it look bad becuase of

Re: [PHP] Newbie Help

2005-05-02 Thread Thomas Bonham
Hello, Thank for the information. If that is not a good idea then how would you do it. Thomas --- Richard Collyer [EMAIL PROTECTED] wrote: Hello, ?php if(isset($_GET['page'])) {include($_GET['page'] . .php);} else

Re: [PHP] Newbie Help

2005-05-02 Thread Thomas Bonham
Thanks for the help. It works, for the most part. Now I'm going to write the links page. Thanks agin for all the great help. Thomas --- Mark Cain [EMAIL PROTECTED] wrote: Also, after I looked at more of your code you will need to specify the php extension in only one of two places.

[PHP] Newbie Help

2005-05-01 Thread Thomas Bonham
Hello All, First of I'm new to this a hop I'm doing this right. If some one can help me with my web site page. I'm trying to make it call a page and I get a error line 42. Error: http://bonhamlinux.org/idex.php?page=links/index.php The code that I'm trying to do this is the following: ?php

[PHP] Newbie Help

2005-05-01 Thread Thomas Bonham
Hello All, First of I'm new to this a hop I'm doing this right. If some one can help me with my web site page. I'm trying to make it call a page and I get a error line 42. Error: http://bonhamlinux.org/idex.php?page=links/index.php The code that I'm trying to do this is the following: ?php

Re: [PHP] Newbie Help

2005-05-01 Thread Andre Dubuc
On Sunday 01 May 2005 10:39 pm, Thomas Bonham wrote: Hello All, First of I'm new to this a hop I'm doing this right. If some one can help me with my web site page. I'm trying to make it call a page and I get a error line 42. Error: http://bonhamlinux.org/idex.php?page=links/index.php The

Re: [PHP] Newbie Help

2005-05-01 Thread Thomas Bonham
Andre Dubuc wrote: On Sunday 01 May 2005 10:39 pm, Thomas Bonham wrote: Hello All, First of I'm new to this a hop I'm doing this right. If some one can help me with my web site page. I'm trying to make it call a page and I get a error line 42. Error:

Re: [PHP] Newbie Help

2005-05-01 Thread Mark Cain
like that. Mark Cain - Original Message - From: Thomas Bonham [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Sunday, May 01, 2005 10:39 PM Subject: [PHP] Newbie Help Hello All, First of I'm new to this a hop I'm doing this right. If some one can help me with my web site

Re: [PHP] Newbie Help

2005-05-01 Thread Thomas Bonham
: [PHP] Newbie Help Hello All, First of I'm new to this a hop I'm doing this right. If some one can help me with my web site page. I'm trying to make it call a page and I get a error line 42. Error: http://bonhamlinux.org/idex.php?page=links/index.php The code that I'm trying to do

Re: [PHP] Newbie Help

2005-05-01 Thread Thomas Bonham
Here is all of the page, except one or two and the images. Thomas --- Mark Cain [EMAIL PROTECTED] wrote: YES let see the src - Original Message - From: Thomas Bonham [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Sunday, May 01, 2005 11:31 PM Subject: Re: [PHP] Newbie Help

Re: [PHP] Newbie Help

2005-05-01 Thread Mark Cain
first remove the space between GET and [ I think this keeps your script from find the variable page secondly the variable page already has the php extension being passed to it via the GET statement make the include like: {include($_GET['page']);} try it and let us know. Mark Cain The code

Re: [PHP] Newbie Help

2005-05-01 Thread Mark Cain
Also, after I looked at more of your code you will need to specify the php extension in only one of two places. Currently you are specifying it in 1) the code below and in 2) nav.php and in nav.php you don't have it specified for the main but you do for the other links. That means that the code

[PHP] Newbie Define Paths question

2005-03-31 Thread Jackson Linux
Hi, I've set the following: $nscfg['url'] ='http://www.domain.com/'; $nscfg['secure_url'] ='https://domain.com/'; $nscfg['site root'] = '/Users/username/public_html/'; $nscfg['base'] = 'http://www.domain.com/'; // For use in the HTML documents define (URL, $nscfg['url']); // where to find Articles

Re: [PHP] Newbie Define Paths question

2005-03-31 Thread Richard Davey
Hello Jackson, Thursday, March 31, 2005, 3:20:11 PM, you wrote: JL What am I doing wrong when I try to make this: JL ?php include_once INCLUDES.include.php; ? Be sure you don't define a reserved word, but to get the above working do: include_once(INCLUDES . 'include.php'); Best regards,

Re: [PHP] Newbie Define Paths question

2005-03-31 Thread Richard Lynch
?php include_once INCLUDES.include.php; ? In what way does it not work? Syntax error? WILD GUESS: Maybe you just need parens: ?php include_once (INCLUDES . include.php);? I wouldn't THINK you need that, but maybe somehow the constant makes it necessary... -- Like Music?

Re: [PHP] NEWBIE: Can't Get My Loop Going. . .

2005-03-29 Thread Jochem Maas
Jackson Linux wrote: Hello all, I am a newbie trying to build a set of links to content in a db. I am connecting with the db and seeing the proper number of rows. if I echo out the values of $id and $sidebar I see that they take on the id# and text of the last entry in the database. I'm trying

Re: [PHP] NEWBIE: Can't Get My Loop Going. . .

2005-03-29 Thread Jackson Linux
As usual, Jochem, thanks for all those useful tips. They are much appreciated. Jack On 29 Mar 2005, at 05:15, Jochem Maas wrote: Jackson Linux wrote: Hello all, I am a newbie trying to build a set of links to content in a db. I am connecting with the db and seeing the proper number of rows. if

Re: [PHP] NEWBIE: Can't Get My Loop Going. . .

2005-03-29 Thread Colin Ross
i was thinkin in more general term too, what about: $data = readfile($file); /// etc, etc, etc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] NEWBIE: Can't Get My Loop Going. . .

2005-03-28 Thread Jackson Linux
Hello all, I am a newbie trying to build a set of links to content in a db. I am connecting with the db and seeing the proper number of rows. if I echo out the values of $id and $sidebar I see that they take on the id# and text of the last entry in the database. I'm trying to make the script

Re: [PHP] NEWBIE: Can't Get My Loop Going. . .

2005-03-28 Thread Jackson Linux
Sorry folks. I have been told by a more knowledgeable friend that the problem was I forgot to ECHO out the join. It works now. Thanks anyway!! Jack On 28 Mar 2005, at 15:57, Jackson Linux wrote: Hello all, I am a newbie trying to build a set of links to content in a db. I am connecting with the

Re: [PHP] NEWBIE: Can't Get My Loop Going. . .

2005-03-28 Thread Christian Heinrich
Hello Jack, you simply forgot an echo. ?php echo join(); ? Also, have a look at print_r, which is very very useful for debugging. Greetings from Germany, Christian Jackson Linux schrieb: Hello all, I am a newbie trying to build a set of links to content in a db. I am connecting with the db

[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 GUIDE] For the benefit of new members

2005-03-22 Thread Jay Blanchard
= Please feel free to add more points and send to the list. 20050322jb - Note the new location of PHP Editors list. = 1. If you have any queries/problems about PHP try

Re: [PHP] [NEWBIE GUIDE] For the benefit of new members

2005-03-22 Thread Stan F
[snip] I feel we should add this to the rules. Dunno about the others, but it really drives mad to delete bunches of emails with equal contents posted within 5 minute interval. --- Please avoid sending duplicate letters to the list. If you feel your email was not delivered properly or no-one

[PHP] newbie php/mysql need help

2005-03-13 Thread p80
I do a mysql request like this one: SELECT DISTINCT (brand), COUNT( brand )FROM `machines` where category like 'sold' group by brand I get this from mysql: brand COUNT( brand) brandx4 brandy12 how can I echo this result in php? thanx in advance Pat --

RE: [PHP] newbie php/mysql need help

2005-03-13 Thread Robbert van Andel
Message- From: p80 [mailto:[EMAIL PROTECTED] Sent: Sunday, March 13, 2005 4:35 PM To: php-general@lists.php.net Subject: [PHP] newbie php/mysql need help I do a mysql request like this one: SELECT DISTINCT (brand), COUNT( brand )FROM `machines` where category like 'sold' group by brand I get

Re: [PHP] newbie php/mysql need help

2005-03-13 Thread Burhan Khalid
p80 wrote: I do a mysql request like this one: SELECT DISTINCT (brand), COUNT( brand )FROM `machines` where category like 'sold' group by brand Try adding aliases to your query, such as : SELECT DISTINCT (brand), COUNT (brand) AS brand_count FROM `machines` WHERE `category` LIKE 'sold' GROUP BY

[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 LEFT JOIN question

2005-03-09 Thread Jackson Linux
First, I apologize - I'm new to this, grateful for the list and just confused. I didn't mean to post improperly. Second, thanks so much Rory for simplifying it and answering that anyway. I promise I wasn't going for technical impressiveness and easier is definitely better! Thanks again, Jack

Re: [PHP] Newbie LEFT JOIN question

2005-03-09 Thread John Nichel
Jackson Linux wrote: snip http://lists.mysql.com/ -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Newbie Variable Question

2005-03-09 Thread Jackson Linux
Hi, All, A php variable question. I've done this to take the requested category from the URL (www.foo.com/file.htm?r=1) and use it to build the page: if (isset($_GET['r']) !empty($_GET['r'])) { $r = '{$_GET['r']}'; //Set the variable $r to mean the category number $fields = '*'; } else {

Re: [PHP] Newbie Variable Question

2005-03-09 Thread Jochem Maas
Jackson Linux wrote: Hi, All, A php variable question. I've done this to take the requested category from the URL (www.foo.com/file.htm?r=1) and use it to build the page: if the category number is really always supposed to be an integer (and that it must always be greater than 0, actually in

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 LEFT JOIN question

2005-03-08 Thread Jackson Linux
Hi, all, I have three tables; 'cv', the main table, 'jobcat', a definition table and 'cvjobcats', an intersection table (for more detail see PS below). I'd like to join this all together to be able to make a headline consisting of the plain English description of the job category followed by

Re: [PHP] Newbie LEFT JOIN question

2005-03-08 Thread Robert Cummings
This is the P H P list not the S Q L list. I mean really, your question isn't even worded as a PHP question. Maybe if you add a few echos or a variable here and there someone here might let it pass. But just asking a plain old SQL question is not the purpose of the P H P list. Cheers, Rob. On

Re: [PHP] Newbie LEFT JOIN question

2005-03-08 Thread Rory McKinley
Jackson Linux wrote: Hi, all, I have three tables; 'cv', the main table, 'jobcat', a definition table and 'cvjobcats', an intersection table (for more detail see PS below). I'd like to join this all together to be able to make a headline consisting of the plain English description of the job

[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

<    1   2   3   4   5   6   7   8   9   10   >