[PHP] Quick question.

2002-10-01 Thread Simon Angell
Hi everyone. I asked this a week or so ago but i am unsure if it got to the list, so here we go again. I am trying to get a remote file to be copied onto my own web server, I have looked at fopen() and fread() and fwrite() and get the general idea of each, but im wondering how to join the

Re: [PHP] Quick question.

2002-10-01 Thread Adam Voigt
Everything you need: http://www.php.net/ftp Adam Voigt [EMAIL PROTECTED] On Tue, 2002-10-01 at 11:50, Simon Angell wrote: Hi everyone. I asked this a week or so ago but i am unsure if it got to the list, so here we go again. I am trying to get a remote file to be copied onto my own web

Re: [PHP] Quick question.

2002-10-01 Thread Robert Cummings
Simon Angell wrote: Hi everyone. I asked this a week or so ago but i am unsure if it got to the list, so here we go again. I am trying to get a remote file to be copied onto my own web server, I have looked at fopen() and fread() and fwrite() and get the general idea of each, but im

Re: [PHP] Quick question.

2002-10-01 Thread Simon Angell
i tried that ine and got this... Warning: fopen(/test/canberra.txt, w+) - No such file or directory in C:\Xitami\webpages\bomonster\test2.php on line 4 code.. ?php $rContents = implode( \n, file( 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) ); if( ($fp = fopen( '/test/canberra.txt', 'w+'

Re: [PHP] Quick question.

2002-10-01 Thread Robert Cummings
You're a Windows guy so probably you need the directory delimiters facing the other way :) Try this one (not tested AT ALL): $rContents = implode( \n, file( 'ftp://www.foo.bar/me/my/data.txt' ) ); if( ($fp = fopen( 'c:\path\to\directory\outfile.txt', 'wb+' )) !== false ) { fputs( $fp,

Re: [PHP] Quick question.

2002-10-01 Thread Simon Angell
i removed a / and it worked :) ?php $rContents = implode( \n, file( 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) ); if( ($fp = fopen( 'test/canberratest.txt', 'w+' )) !== false ) { fputs( $fp, $rContents ); fclose( $fp ); } ? Now the format of the content is no longer, can this be

Re: [PHP] Quick question.

2002-10-01 Thread Robert Cummings
Windows makes me cry... this will fix the problem... Change: $rContents = implode( \n, file( 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) ); To: $rContents = implode( \r\n, file( 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) ); If that doesn't work: To: $rContents =

Re: [PHP] Quick question.

2002-10-01 Thread Simon Angell
Thanks for that Robert *it works*, now i have 1 more problem, after uploading to my web server i get this... Warning: fopen(wtest.txt, wb+) - Permission denied in /home/canberra/public_html/bomonster/canberra.php on line 6 Dunno why either, the directory is not protected, can you help me with

[PHP] quick question

2002-08-15 Thread Chris Barnes
hey people, I have been seeing something in a few php scripts i've been playing with and i really dont know what it means or does. I'm only new to php so maybe someone could explain. i have been seeing -...e.g. while($file = $dir - read()) what does the - mean and do. thanks heaps -- PHP

Re: [PHP] quick question

2002-08-15 Thread Adam Williams
basically it is used for accessing a variable in an array. Adam On Wed, 14 Aug 2002, Chris Barnes wrote: hey people, I have been seeing something in a few php scripts i've been playing with and i really dont know what it means or does. I'm only new to php so maybe

[PHP] Quick Question

2002-07-24 Thread Nicholas Mercier
I'm currently developing a Remote CMS for a site. I'm working on the image upload and want to create a smaller thumbnail type image (thought 200x180 instead of 50x50) I know I'm going to need either imagecopyresize() or imagecopyresample(). I don't know which would be better for this purpose

Re: [PHP] Quick Question

2002-07-24 Thread Jason Wong
On Wednesday 24 July 2002 15:48, Nicholas Mercier wrote: I'm currently developing a Remote CMS for a site. I'm working on the image upload and want to create a smaller thumbnail type image (thought 200x180 instead of 50x50) I know I'm going to need either imagecopyresize() or

[PHP] Quick question

2002-06-14 Thread Dan McCullough
I have a form, and if someone doesnt fill in a field it returns and asks them to filling in the missing field. I have made it so that the person doesnt lose everything, currently they will lose radio button information or checkbox information. Can someone tell me how to best keep it so the

Re: [PHP] Quick question

2002-06-14 Thread Marek Kilimajer
Quick answer: input type=checkbox name=name value=value?= ( $HTTP_POST_VARS['name']=='value' ? ' checked' : '' ) ? the same for radio boxes. Dan McCullough wrote: I have a form, and if someone doesnt fill in a field it returns and asks them to filling in the missing field. I have made it

Re: [PHP] Quick question

2002-06-14 Thread SenthilVelavan
Subject: [PHP] Quick question I have a form, and if someone doesnt fill in a field it returns and asks them to filling in the missing field. I have made it so that the person doesnt lose everything, currently they will lose radio button information or checkbox information. Can someone tell me how

[PHP] Quick Question about Classes

2002-06-06 Thread Jay
When you define a new class can you do the following? $className = Parent; class $className { }; Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Quick Question about Classes

2002-06-06 Thread Ray Hunter
You need to call new operator to create the object. Thank you, RAY HUNTER -Original Message- From: Jay [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 2:22 PM To: Php-General (E-mail) Subject: [PHP] Quick Question about Classes When you define a new class can you do

RE: [PHP] quick question

2002-01-11 Thread Ford, Mike [LSS]
-Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: 10 January 2002 15:44 I thought that $_GET[] and $_POST[] could be used in place of regular variables... that is, $sql = SELECT * FROM tablename WHERE tablename.column=$_GET['criteria_integer']; but

RE: [PHP] quick question

2002-01-11 Thread Philip Olson
$sql = SELECT * FROM tablename WHERE tablename.column=$_GET['criteria_integer']; but unfortunately, this isn't working. On a related note, outside of strings one should always surround keys with quotes, so: $arr = array('a' = 'apple', 'b' = 'banana'); print $arr['a']; // apple

[PHP] both work? (was Re: [PHP] quick question)

2002-01-11 Thread Erik Price
On Friday, January 11, 2002, at 06:05 AM, Ford, Mike [LSS] wrote: Incidentally, I've occasionally had problems including a variable name containing an underscore in a double-quoted string (e.g. $num_recs records retrieved), where PHP tries to insert the value of $num followed by the

Re: [PHP] quick question

2002-01-11 Thread Erik Price
It seems that you are saying that not using quotes is bad (first), but then later you show that omitting the quotes does not result in an error. Or are you saying that the quotes can be omitted if the array element is being used in a string (between quotes), but generally the quotes around the

RE: [PHP] quick question

2002-01-10 Thread Ford, Mike [LSS]
-Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 19:22 I'm trying to write my code in accordance with the PHP 4.1.0 security advisory -- that is, I want to use the $_GET and $_POST arrays when grabbing variables passed with GET and POST forms.

Re: [PHP] quick question

2002-01-10 Thread Erik Price
I thought that $_GET[] and $_POST[] could be used in place of regular variables... that is, $sql = SELECT * FROM tablename WHERE tablename.column=$_GET['criteria_integer']; but unfortunately, this isn't working. On Thursday, January 10, 2002, at 08:18 AM, Ford, Mike [LSS] wrote:

Re: [PHP] quick question

2002-01-10 Thread Erik Price
I thought that $_GET[] and $_POST[] could be used in place of regular variables... that is, $sql = SELECT * FROM tablename WHERE tablename.column=$_GET['criteria_integer']; but unfortunately, this isn't working. It resulted in the following error message in the browser: Parse error: parse

Re: [PHP] quick question

2002-01-10 Thread Miles Thompson
Yes, but $sql is passed to the database, which has no understanding of $_GET. Will it take PHP that much longer to make this assignment: $criteria_integer = $_GET['criteria_integer']; With the benefit that the SQL is much easier to read $sql = SELECT * FROM tablename WHERE

Re: [PHP] quick question

2002-01-10 Thread Ed Swartz
Erik, Although, I've not proved this I think the PHP parser gets confused when it sees a complex variable reference, $_GET[ 'criteria_integer' ] embedded within double quotes. I've run into similar error messages so I've been breaking out the variable from the double quotes as follows: $sql =

[PHP] quick question

2002-01-09 Thread Erik Price
Just a quick question -- I'm temporarily unsubbed so if anyone could CC me directly that would be great. I'm trying to write my code in accordance with the PHP 4.1.0 security advisory -- that is, I want to use the $_GET and $_POST arrays when grabbing variables passed with GET and POST forms.

[PHP] Quick question about recompiling with GD library

2002-01-02 Thread Joelmon2001
Hello, I have png/jpeg support and gd 1.8.3 I see, however, some linux ./configure examples that just use --with-gd and no --with=/usr/local/png or whatever the question is, would --with-gd be enough to create/add text to jpeg/png or *only* if they are included? Just want to double check

[PHP] Quick Question about Variables

2001-12-12 Thread Matthew Walkup
I have a form with checkboxes and they have a name of associate_id. How can I call these variables (or other ideas of getting ID numbers from check boxes)? In PERL i know you can use ${associate_.$id} but I cant seem to find the equivalent for PHP. I could then get a list of id's and check if

RE: [PHP] Quick Question about Variables --- NEVERMIND

2001-12-12 Thread Matthew Walkup
, December 12, 2001 1:27 AM To: [EMAIL PROTECTED] Subject: [PHP] Quick Question about Variables I have a form with checkboxes and they have a name of associate_id. How can I call these variables (or other ideas of getting ID numbers from check boxes)? In PERL i know you can use ${associate_.$id} but I

[PHP] Quick question about no result

2001-11-15 Thread Dan McCullough
I want to show a default piece of information if my query returns no result, and what I mean by no result is the query for a store in a certain state doesnt exist. thanks dan = Dan McCullough --- Theres no such thing as a

[PHP] quick question.

2001-09-26 Thread Jay Paulson
I was just wondering if I could call some functions out side of the class I'm making? The reason why I want to do this is so that I don't have to rewrite the functions as methods in the class and I don't want to get too far into what I'm doing before I find out it doesn't work. Thanks, Jay --

Re: [PHP] quick question.

2001-09-26 Thread Joel Ricker
: I was just wondering if I could call some functions out side of the class : I'm making? The reason why I want to do this is so that I don't have to : rewrite the functions as methods in the class and I don't want to get too : far into what I'm doing before I find out it doesn't work. Sure

Re: [PHP] quick question: frames OT

2001-05-09 Thread Adaran (Marc E. Brinkmann)
Hi Romulo Roberto Pereira, Wednesday, May 09, 2001, 7:11:38 AM, you wrote: Romulo Hello! Romulo Just a quick ot question: Romulo From a php script I open a frameset this divides the browser window in two Romulo rows. How do I do to get rid of the frameset without closing the window? try a link

[PHP] quick question: frames OT

2001-05-08 Thread Romulo Roberto Pereira
Hello! Just a quick ot question: From a php script I open a frameset this divides the browser window in two rows. How do I do to get rid of the frameset without closing the window? TIA Rom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For

[PHP] quick question on the passed variables between scripts

2001-01-18 Thread Romulo Roberto Pereira
Hello! I have one script that has a bunch of checkboxes in a form, all them with different names. As you know the form only submit the ones that are checked. I would like to know witch ones the user checked (they will come in the path as variables I suppose) because I need to make a sum of the

<    1   2