Re: [PHP] How to add a carriage return in the end when using implode?

2002-01-08 Thread Jason Wong
to add the $data as a single line? Not sure if I understand you correctly. If you just want to add a newline character then you can try this: $data[$index]=implode(,, $subdata) . \n; hth -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* BASIC is the Computer Science equivalent

Re: [PHP] Form Problem

2002-01-09 Thread Jason Wong
register_globals = On hth -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Gee, Toto, I don't think we're in Kansas anymore. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list

Re: [PHP] Re: How reliable is the 'user' in http://user@somehost.com/???

2002-01-09 Thread Jason Wong
the session ID thru the url like: http://www.domain.com/index.php?SID=somesessionID and also add a hidden form element containing the session ID to all your forms. hth -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Half of being smart is knowing what you're dumb at. */ -- PHP

Re: [PHP] array_shift and php 4.0.4

2002-01-10 Thread Jason Wong
of the array. array_shift() takes an element off the START of the array. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Never pay a compliment as if expecting a receipt. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands

Re: [PHP] Test if picture exists then load.

2002-01-10 Thread Jason Wong
else? I'm still new to PHP so any feedback would be very appreciated. Use file_exists() to check whether a file exists. To check whether is is a valid image file you could use getimagesize(). hth -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Military justice is to justice what

Re: [PHP] array_shift and php 4.0.4

2002-01-10 Thread Jason Wong
* :) -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* When the blind lead the blind they will both fall over the cliff. -- Chinese proverb */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: [PHP] Help - sending variable(s)

2002-01-10 Thread Jason Wong
=value1myvariable2=value2 In php: echo $PHP_SELF?myvariable1=$myvariable1myvariable2=$myvariable2; hth -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* If Jesus came back today, and saw what was going on in his name, he'd never stop throwing up. -- Max Von Sydow's character

Re: [PHP] Help - sending variable(s)

2002-01-10 Thread Jason Wong
you wanted to pass variables using the URL. But now you're combining it with a form! If you're using a form then: form = form1 method = post input type = text name=myvariable1 value=? echo $myvariable1 ? /form would suffice. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk

Re: [PHP] Help - sending variable(s)

2002-01-10 Thread Jason Wong
type=text name=myvar1 value=? echo $myvar1 ? /form ? echo The value you entered is $myvar1; ? hth -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* OKAY!! Turn on the sound ONLY for TRYNEL CARPETING, FULLY-EQUIPPED R.V.'S

Re: [PHP] Sizeof variable variable arrays

2002-01-11 Thread Jason Wong
the annotated online manual for more examples. hth -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Go out and tell a lie that will make the whole family proud of you. -- Cadmus, to Pentheus, in The Bacchae by Euripides */ -- PHP General Mailing List (http

Re: [PHP] IMPORTANT about asking QUESTIONS

2002-01-11 Thread Jason Wong
others who may be having similar problems to easily determine which posts they should be reading. Subjects like: Quick question Please help!!! etc usually find their way into my trashcan without being read :) my tuppence -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Type

Re: [PHP] ENUM COL to php

2002-01-11 Thread Jason Wong
) { $sth-execute(); while ($row = $sth-fetchrow_hash()) { ereg(('(.*)'), $row[1], $temp); $array = explode( ',', $temp[2] ); while (list ($key, $val) = each ($array)) { $return[] = $val; } } } return $return; } -- Jason Wong - Gremlins Associates

Re: [PHP] External Function

2002-01-13 Thread Jason Wong
('functions.txt'); -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* People should have access to the data which you have about them. There should be a process for them to challenge any inaccuracies. -- Arthur Miller */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] PHP timesheets?

2002-01-13 Thread Jason Wong
On Monday 14 January 2002 05:30, Boaz Yahav wrote: I can't get it to run... 1. The application keeps looking for the include files in the main path instead of the include dir. use ini_set() to change the include_path -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* The day

Re: [PHP] PHP and search engine???

2002-01-13 Thread Jason Wong
in such practices :) -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Take heart amid the deepening gloom that your dog is finally getting enough cheese. -- National Lampoon, Deteriorata */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

Re: [PHP] Php.ini file missing

2002-01-14 Thread Jason Wong
to do is to start sendmail, but I always get errors like: AFAIK you don't actually need to start the sendmail (smtpd?) daemon. You just need the /usr/bin/sendmail (or wherever it's located) program. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Life is like an onion: you peel off

Re: [PHP] checkboxes vs text filed array and hidden variables

2002-01-14 Thread Jason Wong
=\part_number\/; echo input type=\hidden\ value=\$discount_price\ name=\discount_price\/; But what is your question? Does the above code work? If not does it give any error messages? Help us to help you by giving us some details :) -- Jason Wong - Gremlins Associates - www.gremlins.com.hk

Re: [PHP] Overriding php.ini at runtime

2002-01-15 Thread Jason Wong
I make more modifications to the file that the Apache group says not to modify...) Some settings in php.ini can be changed at run-time using ini_set(). Check manual for details. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Vax Vobiscum */ -- PHP General Mailing List (http

Re: [PHP] Overriding php.ini at runtime

2002-01-15 Thread Jason Wong
On Tuesday 15 January 2002 18:31, Daniel Grace wrote: Jason Wong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... On Tuesday 15 January 2002 17:24, Daniel Grace wrote: Is there an equivalent to the php_ini directive available for the CGI version Some settings

Re: [PHP] splitting up an array into lines ...

2002-01-15 Thread Jason Wong
is not an array. The output of `rpm -qa` is just a string (with \n for newlines). Thus to change $rpm_list into an array just do: $rpm_list = explode(\n, $rpm_list); hth -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Alden's Laws: (1) Giving away baby clothes and furniture

Re: [PHP] PHP image rollovers question...

2002-01-15 Thread Jason Wong
you. /hint -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* QOTD: If I could walk that way, I wouldn't need the cologne, now would I? */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: [PHP] Reading File into Array and Searching

2002-01-15 Thread Jason Wong
print the number of lines in your file? The function you want is probably array_count_values(). hth -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* After Goliath's defeat, giants ceased to command respect. - Freeman Dyson */ -- PHP General Mailing List (http://www.php.net

Re: [PHP] Passing vars w/refresh w/register globals off?

2002-01-17 Thread Jason Wong
the META tags then you're not going to get any form (POST) data. Perhaps you can elaborate on what you're trying to do. And if appropriate, post some code. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Sorry, no fortune this time. */ -- PHP General Mailing List (http

Re: [PHP] Passing vars w/refresh w/register globals off?

2002-01-17 Thread Jason Wong
need the META tag refresh thing. If by 'secure' you mean that it's not visible on the url then you *could* use a form. Just use a bit of Javascript to automatically submit the form. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* The clothes have no emperor

Re: [PHP] Passing vars w/refresh w/register globals off?

2002-01-18 Thread Jason Wong
if there is another solution to your problem. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* I am just a nice, clean-cut Mongolian boy. -- Yul Brynner, 1956 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

Re: [PHP] Regular Expressions...

2002-01-18 Thread Jason Wong
tell ereg to include all characters? not only a-zA-Z0-9_. -. / Tony... Use .* as in: ereg((.*),$hlink, $reg3); -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* court, n.: A place where they dispense with justice. -- Arthur Train */ -- PHP General

Re: [PHP] Upload View Image

2002-01-20 Thread Jason Wong
Height? I mean when the Image is displayed, it should be in a Size i want, and not any size. Take a look at the Image Functions section in the manual. And also the File Size.. i dont' want very heavy images uploaded. Can that be restricted? Ditto Handling file uploads -- Jason Wong

Re: [PHP] Upload View Image : Database Thingy!!!!

2002-01-20 Thread Jason Wong
? The best thing to do would be to store the filename ( path if necessary) of the image in the corresponding record of the database. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Mandrell: You know what I think? Doctor: Ah, ah that's a catch question. With a brain your size you

Re: [PHP] Upload View Image

2002-01-20 Thread Jason Wong
within php. This would be probably be done at the time of the upload. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* I have just one word for you, my boy...plastics. - from The Graduate */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED

Re: [PHP] Number of rows reurned?

2002-01-20 Thread Jason Wong
the total number of rows. Check out the relevant chapter in the manual for the db that you're using. Some dbs have a function returning the number of rows. If you're using MySQL then mysql_num_rows() is what you want. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* If a man has

Re: [PHP] File Uploading

2002-01-21 Thread Jason Wong
On Monday 21 January 2002 10:34, Uma Shankari T. wrote: Hello, How to upload files in a particular directory using php script in the browser itself The gory details can be found in the chapter Handling File Uploads. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Love

Re: [PHP] File Uploading

2002-01-21 Thread Jason Wong
the webserver. hth -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* The human race has one really effective weapon, and that is laughter. -- Mark Twain */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: [PHP] Uploads

2002-01-21 Thread Jason Wong
if greater than 6 megs. Did you restart the webserver after changing the settings? -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* I can hire one half of the working class to kill the other half. -- Jay Gould */ -- PHP General Mailing List (http://www.php.net

Re: [PHP] file upload with story

2002-01-21 Thread Jason Wong
rename it to id. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Blessed are the forgetful: for they get the better even of their blunders. -- Nietzsche */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: [PHP] Rand function

2002-01-22 Thread Jason Wong
as there's some useful info regarding random number generation. Remember you only need to call srand() *ONCE* during the lifetime of your php script. Do NOT call srand() each time you want a random number. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Now hatred is by far

Re: [PHP] Form Problem

2002-01-23 Thread Jason Wong
actually you can if you use javascript. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Recursion is the root of computation since it trades description for time. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e

Re: [PHP] How can the Surfer download

2002-01-23 Thread Jason Wong
On Thursday 24 January 2002 13:27, Todd Cary wrote: What is the syntax to give the surfer an opportunity to download a file? Please elaborate. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Kitchen activity is highlighted. Butter up a friend. */ -- PHP General Mailing List

Re: [PHP] Split files

2002-01-23 Thread Jason Wong
file (2 GB) into peaces of 700 MB to burn it on a cd. It's a part of a backup-mechanism I'm wirting in PHP. Maybe you could find a program that will do the split for you then call that from within PHP. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Slurm, n.: The slime

Re: [PHP] Creating a pdf document

2002-01-24 Thread Jason Wong
://sourceforge.net/projects/pc4p/). Its a class which makes creating PDFs extremely easy. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* MOUNT TAPE U1439 ON B3, NO RING */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: [PHP] How can the Surfer download

2002-01-24 Thread Jason Wong
type=submit name=submit value=Download /form Then in your file download.php, have a single statement using the header() function to redirect to the file that is to be downloaded. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Bore, n.: A person who talks when you wish

Re: [PHP] How can the Surfer download

2002-01-24 Thread Jason Wong
in there! -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Fats Loves Madelyn. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] How can the Surfer download

2002-01-24 Thread Jason Wong
: $F); header(content-length: . filesize(/path/to/file.ext)); header(Location:http://www.domain.com/some_filename;); hth -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* TRANSACTION CANCELLED - FARECARD RETURNED */ -- PHP General Mailing List (http://www.php.net

Re: [PHP] How can the Surfer download

2002-01-24 Thread Jason Wong
On Friday 25 January 2002 02:23, Jason Wong wrote: In general, if the file is on disk then simply using: header(Location: http://www.domain.com/downloads/myfile.exe;); would work. Whether the user is asked to Save or Open... depends on the browser setting. If you're using a webserver

Re: [PHP] How can the Surfer download

2002-01-24 Thread Jason Wong
you need to upgrade it. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Accident, n.: A condition in which presence of mind is good, but absence of body is better. -- Foolish Dictionary */ -- PHP General Mailing List (http://www.php.net

Re: [PHP] How can the Surfer download

2002-01-24 Thread Jason Wong
, but if the file was a recognised type then this would just display the file in your browser. So wouldn't it be easier to use the header(Location: ...) example that I gave earlier? In any case I thought your objective was to display a Save/Open ... dialog? -- Jason Wong - Gremlins Associates

Re: [PHP] Uploading a file

2002-01-24 Thread Jason Wong
=action value=Upload /form which works fine for me! -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Love means nothing to a tennis player. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: [PHP] Uploading a file

2002-01-25 Thread Jason Wong
will be deprecated in the near future. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Dying is easy. Comedy is difficult. -- Actor Edmond Gween, on his deathbed. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED

Re: [PHP] move_uploaded_file() query

2002-01-25 Thread Jason Wong
? -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* All of life is a blur of Republicans and meat! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail

Re: [PHP] Passing objects

2002-01-25 Thread Jason Wong
On Saturday 26 January 2002 11:51, Dean Householder wrote: How can you pass an object from one page to another? Is there any convenient way to do it with PHP? Yes, use sessions. See chapter on Session handling functions. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Mum's

Re: [PHP] move_uploaded_file() query

2002-01-25 Thread Jason Wong
. Give a man a fish and you feed him for a day. Teach a man to fish and he feeds himself for the rest of his life. Or something like that. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Everyone's head is a cheap movie show. -- Jeff G. Bone */ -- PHP General Mailing List (http

Re: [PHP] strings and \n

2002-01-25 Thread Jason Wong
they meain. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Biggest security gap -- an open mouth. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e

Re: [PHP] Get FILE NAME and EXTENSION??

2002-01-26 Thread Jason Wong
? Please read the manual chapter Handling file uploads -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Are you sure you're not an encyclopedia salesman? No, Ma'am. Just a burglar, come to ransack the flat. -- Monty Python */ -- PHP General Mailing

Re: [PHP] Re: eval()

2002-01-27 Thread Jason Wong
($temp); return $temp; } If you're using php4.03+ you could try: while ($row = mysql_fetch_assoc($res) { $temp[$row['pname']] = $row['pname'] + $row['amount']; $i++; } -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Life is a sexually transmitted disease

Re: [PHP] Server Communication.

2002-01-27 Thread Jason Wong
['REMOTE_ADDR'] *NB* if user didn't connect through proxy (or NAT) then $_SERVER['HTTP_X_FORWARDED_FOR'] would be empty and Actual ip# would be $_SERVER['REMOTE_ADDR'] The DNS name that the user has connected to the server with; use gethostbyaddr() -- Jason Wong - Gremlins Associates

Re: [PHP] Trying to remove bad charactors.

2002-01-27 Thread Jason Wong
for regular expressions. $q = str_replace(array('!', '@', '#'), '', $q); Also, please do not cross-post. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Slow day. Practice crawling. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED

Re: [PHP] Session updates ok first time only.

2002-01-27 Thread Jason Wong
makes you *think* the session is working when in fact it isn't! hth -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* On the road, ZIPPY is a pinhead without a purpose, but never without a POINT. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

Re: [PHP] mailing to 19000 users

2002-01-27 Thread Jason Wong
. You're probably better off using a real mailing list system :) -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Kramer's Law: You can never tell which way the train went by looking at the tracks. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

Re: [PHP] Session updates ok first time only.

2002-01-27 Thread Jason Wong
systems are specified with a backslash. Try session.save_path = c:\tmp -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Preserve wildlife -- pickle a squirrel today! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: [PHP] mailing to 19000 users

2002-01-27 Thread Jason Wong
type programs at www.davecentral.com. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Scrubbing floors and emptying bedpans has as much dignity as the Presidency. -- Richard Nixon */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

Re: [PHP] Session updates ok first time only.

2002-01-28 Thread Jason Wong
such a report be created? Yes, in php.ini, log_errors = On error_log = c:\tmp\php-error.log Don't forget to restart your webserver or whatever. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* I've finally learned what `upward compatible' means. It means we get to keep all our old

Re: [PHP] mailing to 19000 users

2002-01-28 Thread Jason Wong
list system that could use MySQL to retreive the list of subscribers. Thanks. If you're using qmail, then ezmlm (or even better ezmlm-idx) can be made to work with MySQL. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Leveraging always beats prototyping. */ -- PHP General

Re: [PHP] Sending Form Arrays

2002-01-28 Thread Jason Wong
this: input type=checkbox name=check[0] value='Y' check 1BR input type=checkbox name=check[1] value='Y' check 2BR input type=checkbox name=check[2] value='Y' check 3BR input type=checkbox name=check[3] value='Y' check 4BR input type=checkbox name=check[4] value='Y' check 5BR -- Jason Wong

Re: [PHP] php vs asp

2002-01-28 Thread Jason Wong
or not asp can be used with mysql and is there any drawbacks to using it as opposed to php erm are you looking for an unbiased opinion on a /php/ mailing list? If you're serious you might want to post your question on the MySQL list or something similar. -- Jason Wong - Gremlins

Re: [PHP] upload permission denied!

2002-01-28 Thread Jason Wong
. '.jpg')){ print pdone/p; }else{ print pnot done/p; } } [snip] You need to change to the permissions of the directory in which you want to copy the file to, so that it's writable by the 'user' running the webserver. -- Jason Wong - Gremlins Associates

Re: [PHP] upload permission denied!

2002-01-28 Thread Jason Wong
to it which means it should be OK. The only thing is whether you have set the *correct* directory? According to your code, I believe the file will be copied to: /home/gruesome/public_html/valeriemacwilliam/includes/content/ Is this correct? -- Jason Wong - Gremlins Associates - www.gremlins.com.hk

Re: [PHP] Session updates ok first time only.

2002-01-28 Thread Jason Wong
On Tuesday 29 January 2002 06:36, Floyd Baker wrote: Yes I have a c:\tmp directory and I see the session being created in it. And the page_view value of 1 after the first increment. The editor wants to reload each time I hit the submit button after that but the value does not increase

Re: [PHP] Mysql Connection

2002-01-28 Thread Jason Wong
. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Hard reality has a way of cramping your style. -- Daniel Dennett */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact

Re: [PHP] question the function begin with @

2002-01-28 Thread Jason Wong
Control Operators -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Half a mind is a terrible thing to waste! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list

Re: [PHP] Possible to measure CPU and Ram used with PHP?

2002-01-29 Thread Jason Wong
. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Practical politics consists in ignoring facts. -- Henry Adams */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact

Re: [PHP] Editing uploaded file

2002-01-29 Thread Jason Wong
it probably wouldn't work in NN. 2) You *need* to define a form specifying the enctype if you're going to be uploading stuff: form name=upload enctype=multipart/form-data method=post 3) You don't have any input boxes, all you have is a submit button. What are people supposed to be editing? -- Jason

Re: [PHP] How to get the URL into a var?

2002-01-30 Thread Jason Wong
Is this possible?? Have a look at $HTTP_SERVER_VARS[SCRIPT_FILENAME] $HTTP_SERVER_VARS[PATH_TRANSLATED] -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Thus mathematics may be defined as the subject in which we never know what we are talking about, nor whether what we

Re: [PHP] Editing uploaded file

2002-01-30 Thread Jason Wong
and, in particular, the uploading of the image file? -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Summit meetings tend to be like panda matings. The expectations are always high, and the results usually disappointing. -- Robert Orben */ -- PHP General Mailing List (http://www.php.net

Re: [PHP] kill assoc array entry?

2002-01-30 Thread Jason Wong
On Wednesday 30 January 2002 19:24, marc beyerlin wrote: hi, is it possible to kill an enrtry in an assoziative array, like: array[first]=räuber hotzenblotz; array[second]=schneewitchen; array[third]=rapunzel; kill array[second]; Use unset(). Eg: unset($array['second']); -- Jason

Re: [PHP] Tables Loading Slow

2002-01-30 Thread Jason Wong
anyone have any ideas on how to show the results as the come from the query? It is function of the browser. The only browser that I know of which doesn't wait for the /table before rendering the table is Konqueror. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Anybody can win

Re: [PHP] Images and Mysql

2002-01-30 Thread Jason Wong
. This has been discussed so many times before that you're bound to find something. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones. -- Albert Einstein

Re: [PHP] Editing uploaded file

2002-01-30 Thread Jason Wong
.$new_pic_name; copy($picture,$path . $new_pic_name); } IIRC we've been through this before. Please read the manual. You *need* to understand how to handle uploaded files (by reading the manual). The above code simply would not work. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Would

Re: [PHP] Redirect problem.... UGH!!

2002-01-30 Thread Jason Wong
a # before Header, is that a typo or is it actually in your code? -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Some people around here wouldn't recognize subtlety if it hit them on the head. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

Re: [PHP] Testing Hyperlinks on in a database.

2002-01-30 Thread Jason Wong
On Thursday 31 January 2002 10:04, Philip J. Newman wrote: Is there anyway using PHP to send a command to a server to get the get eather a 404 or 200 reply? fsockopen() -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Anyone who goes to a psychiatrist ought to have his head

Re: [PHP] preg_replace() 'space' the final frontier

2002-01-30 Thread Jason Wong
this *every* 19 words or just the first 19 words? What you could do is 1) explode() the line of text into an array 2) array_shift() and print the first 19 elements 3) print line break 4) repeat from (2) if necessary -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Do not use the blue

Re: [PHP] Editing uploaded file

2002-01-30 Thread Jason Wong
into /home/xxx/xxx/php/new_pic_name? -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Newlan's Truism: An acceptable level of unemployment means that the government economist to whom it is acceptable still has a job. */ -- PHP General Mailing List (http://www.php.net

Re: [PHP] mysql

2002-01-30 Thread Jason Wong
it out for 2 long. echo $query; to see whether the query looks ok. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* * UNIX is a Trademark of Bell Laboratories. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e

Re: [PHP] Recompile PHP not recognizing new Install

2002-01-31 Thread Jason Wong
-- libphp4.so do a: find / -name libphp4.so to see what turns up. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Modesty: The gentle art of enhancing your charm by pretending not to be aware of it. -- Oliver Herford */ -- PHP General Mailing

Re: [PHP] Pregenerating Script Again

2002-01-31 Thread Jason Wong
, then cat will do. Do they contain php that needs to be interpreted? If so, then does the user need to see the results, or just a simple SUCCESS/FAILED? Etc. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* The moving cursor writes, and having written, blinks on. */ -- PHP General

Re: [PHP] sorry, your input was invalid. please re-enter the asterisked fields

2002-01-31 Thread Jason Wong
of people use because its effectiveness has been proven time and again. If not, no worries, I look forward to writing it as best I can. There are a number of classes on www.phpclasses.upperdesign.com which does what you want. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* I dote

Re: [PHP] Re: [PHP General] RE: Problems with MySQL-Link [3:14370:14592]

2002-01-31 Thread Jason Wong
to mysql_connect($host, $user, $password). Again, proper use of die() would have quickly helped you track down where the real problem was. Instead of trying to figure out what is wrong with line 4! hth -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Congratulations! You

Re: [PHP] Re: [PHP General] RE: Problems with MySQL-Link [3:14370:14592]

2002-02-01 Thread Jason Wong
On Friday 01 February 2002 16:23, Berthold wrote: Hi again! If it would be so simple I would not ask... OK, once more: #!/usr/local/bin/php -q 1) Has the mysql functions ever worked for you on that system? 2) Are you only get this problem when using php from the command line? -- Jason

Re: [PHP] getting a list of all php functions

2002-02-01 Thread Jason Wong
about the other ones? Is there a place somewhere that has a text file that I can just read line-by-line or perhaps comma separated? Or maybe a version of PHP I can download which has all extensions built in? Have you tried the function index in the manual? -- Jason Wong - Gremlins Associates

Re: [PHP] ereg_replace help

2002-02-03 Thread Jason Wong
On Monday 04 February 2002 13:31, John P. Donaldson wrote: I'm not actually replacing \n with br, I just used that as an example. When I tried Martin's solution, I got a parse error on this line: $content = implode($lines, \n,); You've got a trailing comma. -- Jason Wong - Gremlins

Re: [PHP] PHP's include_path

2002-02-04 Thread Jason Wong
this file - how do you use different include paths for different web sites??? I believe you can also use init_set() to set the include path. hth -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Please remain calm, it's no use both of us being hysterical at the same time. */ -- PHP

Re: [PHP] Easy Question -- Show/ Hide text based on output of query

2002-02-05 Thread Jason Wong
is not displayed regardless whether memberNotes has any output. ?php If ($memberNotes =='1') { What is $memberNotes supposed to contain? If it is supposed to contain notes on members then surely it can't be '1' all the time? I think you probably want: if ($memberNotes) { ... hth -- Jason Wong

Re: [PHP] Problem...header already sent by

2002-02-05 Thread Jason Wong
the setting as such. On a Linux system you would've have to recompile PHP and possibly Apache as well. On a Windows system you would probably just download the relevant files and install. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* linux: because a PC is a terrible thing to waste

Re: [PHP] Easy Question -- Show/ Hide text based on output of query

2002-02-05 Thread Jason Wong
{ $notes = div align=\/left\/font size=\/-1\/b/b/font/div; } ? What are those forward slashes (/) doing in $notes? Try getting rid of them, they don't look very HTML to me :) Also try echo($notes) OUTSIDE of a table construct to see what it contains. hth -- Jason Wong - Gremlins

Re: [PHP] Easy Question -- Show/ Hide text based on output of query

2002-02-05 Thread Jason Wong
data. Is their some way to invoke $notes only if $memberNotes returns any data? Please post your full code. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* I go on working for the same reason a hen goes on laying eggs. - H. L. Mencken */ -- PHP General Mailing List (http

Re: [PHP] Easy Question -- Show/ Hide text based on output of query

2002-02-05 Thread Jason Wong
* script -- never mind, have you tried echo($memberNotes) to see what that contains? Are you sure it doesn't contain spaces or other non-visible characters? -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* All language designers are arrogant. Goes with the territory... (By Larry

Re: [PHP] Previous n Articles

2002-02-05 Thread Jason Wong
= $offset - $limit; if ($previous 0) { $previous = 0; } then incorporate $previous into your previous link in a similar fashion to the next link. hth -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Random, n.: As in number, predictable. As in memory access

Re: [PHP] Previous n Articles

2002-02-05 Thread Jason Wong
; if ($previous 0) { $previous = 0; } then incorporate $previous into your previous link in a similar fashion to the next link. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* A fail-safe circuit will destroy others. -- Klipstein */ -- PHP General Mailing List

Re: [PHP] GetImageSize and iptcparse problems

2002-02-06 Thread Jason Wong
, then you probably have to change your php.ini as per error message. For more info on pass-by-reference see the chapter References Explained Passing by Reference. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* We gave you an atomic bomb, what do you want, mermaids

Re: [PHP] Get file download time.

2002-02-06 Thread Jason Wong
the appropriate HTTP headers; read and output the contents of file; stop timer; calculate elapsed time; ? -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* I'd love to go out with you, but I've been scheduled for a karma transplant. */ -- PHP General Mailing List (http://www.php.net

Re: [PHP] help with PHP global array

2002-02-07 Thread Jason Wong
. You cannot declare a variable as global (as such). To use a global variable: ? $doodah = 10; test_global(); function test_global() { global $doodah; echo(Doodah should be ten: $doodah); } ? See manual for details. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk

Re: [PHP] mysql_insert_id() vs LAST_INSERT_ID()

2002-02-07 Thread Jason Wong
together? I don't think MySQL is able to handle multiple queries in one statement. IOW you would have to perform each separately. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* When childhood dies, its corpses are called adults. -- Brian Aldiss */ -- PHP General

  1   2   3   4   5   6   7   8   9   10   >