RE: [PHP] OnUNload Scripts

2001-10-24 Thread Martin Towell
From what I can tell, the only way you can execute a PHP script is to have the browser request it. This means using the same window that the document is being unloaded in, or opening a new window. You could open a new window, give focus to the current window, and in the new window, have it close

[PHP] Enabling php in only certain hosts and directories

2001-10-24 Thread Joseph Blythe
Hello all, I am just configuring up a new web server, and I want to be able to run php only in the web servers main document root and in specified virtual hosts, I have a fair understanding on how to go about this, but would really like some feedback before I get to far into it. Basically the

[PHP] redirecting the browser

2001-10-24 Thread Ozgur Demirtas
Hi all, I have a PHP script and at one point of the script I am trying to redirect my browser to a certaion page. I can't seem to find an easy way of doing this. header() call is so much of a problem. There is no such function like redirect(...) as in ASP? PS: I am using PHP version 3.09 as an

Re: [PHP] redirecting the browser

2001-10-24 Thread Mak
Hi, you can use Javascript as follows: ?php // your code here... print(scriptdocument.location.href='somepage.php';/script); //continue yr code... ? Hope it helps. - Mak - Original Message - From: Ozgur Demirtas [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, October

Re: [PHP] redirecting the browser

2001-10-24 Thread Valentin V. Petruchek
Use this: ?php Header(Location: anypage.php); exit(); //stopping the script ? - Original Message - From: Ozgur Demirtas [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, October 24, 2001 9:47 AM Subject: [PHP] redirecting the browser Hi all, I have a PHP script and at one

Re: [PHP] INPUT tag with default value

2001-10-24 Thread Silvia Mahiques
Dear Philip, Thank you very much, I have lost long time proving different alternatives that it's better not to implement. I prefer a safe code. Thanks again!. Cheers Silvia Mahiques Philip Olson [EMAIL PROTECTED] escribió en el mensaje

[PHP] Check mail user

2001-10-24 Thread Rosen
Hi, can someone give me script for syntax check of username for mail server ? Thanks, Rosen -- 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

RE: [PHP] OnUNload Scripts

2001-10-24 Thread Jason G.
It may be possible to do something of the following: I know that on rollovers, Javascript can preload the images needed to rollover to... Hmm... Maybe you could have javascript load an image during the unload event with the image's src pointing to a php script... -Jason Garber At 04:51

Re: [PHP] OnUNload Scripts

2001-10-24 Thread Mak
It may also be possible to use document.location.href (in Javascript) to change the location to the desired PHP file which you want to run, and then at the end of that PHP file, go to the page which the user originally wanted to go (if any)... I'm not very sure if that works though. Hope it

Re: [PHP] Check mail user

2001-10-24 Thread Valentin V. Petruchek
If I understand you properly you need smth like this function checkmail ($email) { return (eregi(^[_\.0-9a-z-]+@([0-9a-z][-0-9a-z\.]+)\.([a-z]{2,3}$), $email, $check)); } - Original Message - From: Rosen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, October 24, 2001 10:24 AM

[PHP] Looking for a high usage PHP host

2001-10-24 Thread Ben Quinn
Hi all I'm looking for a web host with the following requirments * PHP (would prefer version 4) with GD support - the most important thing is the version of GD must be 1.6 or lower because we have to work with GIF files on the fly * High data transfer - somewhere in the range of 20gig+ per

Re: [PHP] redirecting the browser

2001-10-24 Thread Kodrik
?php Header(Location: anypage.php); exit(); //stopping the script ? No, he wants to launch a script after Javascript has processed. PHP is run on the server, Javascript on the client so Javascript has to run after PHp is finished. For him to launch a Javascript code, he can only do it by

Re: [PHP] problem pattern matching a url with question mark

2001-10-24 Thread Neil Freeman
Why does your URL contain .asp? [EMAIL PROTECTED] wrote: I found the following code currently used on our website to match a url expression. Unfortunately, when I added a question mark, the webpage that contained the url with the question mark just hung and would not load into my browser at

RE: [PHP] Using A Query Results Multiple Times

2001-10-24 Thread Niklas Lampén
mysql_data_seek(); Niklas -Original Message- From: Adam Douglas [mailto:[EMAIL PROTECTED]] Sent: 23. lokakuuta 2001 21:48 To: PHP-DB (mailing list) (E-mail); PHP-General (mailing list) (E-mail) Subject: [PHP-DB] Using A Query Results Multiple Times I have an instance where I

Re: [PHP] How to protect MySQL password

2001-10-24 Thread Justin French
All these solutions are depending (mainly) on having a dedicated server, which I believe would not be the case for 90% of the users on here (don't shoot me if i'm wrong). So far, I can't see how the problem can be solved. My host does not allow telnet/ssh at all which sounds like a good thing!

Re: [PHP] Using A Query Results Multiple Times

2001-10-24 Thread Kodrik
Checkout sqltools at: http://zc8.com/zc8/ZC8news/shownews.php?articleid=98 It has many fucntions for mysql within php. They should work with php3. On Wednesday 24 October 2001 04:19 am, Niklas Lampén wrote: mysql_data_seek(); Niklas -Original Message- From: Adam Douglas

Re: [PHP] OnUNload Scripts

2001-10-24 Thread Kodrik
You could open a new window, give focus to the current window, and in the new window, have it close itself after it's finished processing. An invisible frame is the easiest: frame rows=100%, * framset name='main' src='src.php' frameset name='invisibleframe' src='background.php' /frameset

Re: [PHP] Check mail user

2001-10-24 Thread Kodrik
Like this? function checkmail ($email) { if (eregi(^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z][a-z][a-z]?$, $email, $check)) { if (checkdnsrr(substr(strstr($check[0], '@'), 1), ANY)) { return TRUE; } } return FALSE; } On Wednesday 24 October 2001 03:24 am,

Re: [PHP] redirecting the browser

2001-10-24 Thread Kodrik
I got some thread mixed up. Ignore that answer. No, he wants to launch a script after Javascript has processed. PHP is run on the server, Javascript on the client so Javascript has to run after PHp is finished. For him to launch a Javascript code, he can only do it by contacting the server

Re: [PHP] OnUNload Scripts

2001-10-24 Thread Mak
Yes I agree. Flash has great integration with PHP and that makes it much easier for communication between them, eg. passing around variables. - Original Message - From: Kodrik [EMAIL PROTECTED] To: Jason G. [EMAIL PROTECTED]; Martin Towell [EMAIL PROTECTED]; 'Impex Holidays Maldives /

Re: [PHP] Package mechanism

2001-10-24 Thread DL Neil
I have a need for a package mechanism like that provided by TCL. We write a lot of code in reusable libraries and often encounter the situation in which an application uses a particular library but requires at least version X or greater. The require(), require_once(), etc. functionality

Re: [PHP] Enabling php in only certain hosts and directories

2001-10-24 Thread Kodrik
Well, php runs the same as apache, so whatever apache can access, php can access. So any files with the db passwords that need to be accessed by php, can be seen by all users who can upload php scripts to your server. In the case of virtual hosting. So trust people you give access, even

[PHP] libxml

2001-10-24 Thread php
Firstly, thanks to those who replied to me last week about xmldom support with this error: Warning: Unknown list entry type in request shutdown (0) in Unknown on line 0 I've since tried a few combinations of versions of libxml, and expat (dont know if expat would matter), any was wondering if

RE: [PHP] PHP Openlink/Progress Problems

2001-10-24 Thread Grant Walters
On Tue, 23 Oct 2001 16:35, Grant Walters wrote: I'm going nuts trying to work out how to handle errors from data statement with single quotes. PHP 4.0.6 appears to be mangling something somewhere. All statements work with the Openlink odbctest program Any help appreciated ?

[PHP] sorting an array of objects

2001-10-24 Thread L Melville
Hi, Is it possible to sort a class array using array multisort, I have two items in each class that I wish to sort by, one is a text and the other is the first item in an array within within each class. i.e.;- $class[$index]-text; $class[$index]-array[0]; how can I do this? thanks in advance

Re: [PHP] How to protect MySQL password

2001-10-24 Thread Christian Reiniger
On Tuesday 23 October 2001 23:33, Kurt Lieber wrote: Sorry -- but you're wrong. If you've got php loaded as an apache module in a shared hosting environment, then any file that apache can read, I can gain access to through a simple FTP account and a well-constructed php file using fopen().

[PHP] Re: Check mail user

2001-10-24 Thread Rosen
Thanks !!! Rosen Rosen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, can someone give me script for syntax check of username for mail server ? Thanks, Rosen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

Re: [PHP] Package mechanism

2001-10-24 Thread DL Neil
Douw, It's kind of eerie the way your reply appears in my email before I can see my intervening post!!!??? Perhaps you're just more important than me (bow, scrape, simper...) Thanks for the feedback and additional ideas. =HTH I had also though that it might be necessary to separate out the

[PHP] Problems with TTF

2001-10-24 Thread Alberto
Warning: Could not find/open font in /sdr/httpd/Prisa/DATA/private/libs/graficos/intradia.php on line 57 Line 57: ImageTTFText ($O_imagen, 11, 0, 10, 20, $O_colorValor, arial.ttf,$s_Valor); arial.ttf is into the same dir. Any ideas? that file has read permissiones for everyone. --

[PHP] Premature end of script headers

2001-10-24 Thread Tshering Norbu
Hi list, What/why this error: [Wed Oct 24 17:03:33 2001] [error] [client 127.0.0.1] Premature end of script headers: c:/php4win/php.exe Thanks, NOBBY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

[PHP] Problem with --with-custom-odbc

2001-10-24 Thread Kraa de Simon
Hello, I configured PHP 4.0.5 with the --with-custom-odbc option. I get no errors but the odbc functions are not available. When I look at phpinfo() I can see that the configure command is: './configure' '--with-mysql' '--with-apache=../apache_1.3.19' '--enable-track-vars' Is

[PHP] talking directly w/ MySql

2001-10-24 Thread _lallous
I think that the MySql's API allow to many queries to be executed w/o having an open connection, example: SELECT 1+1; how can i issue such statments w/o opening a connection? like SELECT NOW() .. whenever I first run mysql_query() it tries to connect w/ default connection settings. --

[PHP] Re: Detect mySql Install

2001-10-24 Thread _lallous
$mysql_installed = function_exists('mysql_query'); as for the version, you can then do: $r = mysql_query(SELECT VERSION()); $r = mysql_fetch_array($r); $ver = $r[0]; Chris [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Is there a way to detect, using PHP, if

[PHP] Re: running scripts onunload

2001-10-24 Thread _lallous
I'm afraid there is no way to do so! Impex Holidays Maldives / Hasan [EMAIL PROTECTED] wrote in message 0beb01c15bcb$f0becf50$c6c801ca@hasan">news:0beb01c15bcb$f0becf50$c6c801ca@hasan... Hi everyone, I can use javascripts onunload to run PHP file with a new window. Is there anyway i can run

[PHP] Linux news group

2001-10-24 Thread Rehuel Lobato de Mesquita
Hey guys, where can i find a linux news group? I thought one, (comp.os.linux.setup) but my reader seems to think it's not a valid news server... (is it?) Rehuel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

[PHP] Object sharing

2001-10-24 Thread Victor Hugo Oliveira
Does anyone know a way to share an object with all sessions ? The idea is to access the same database connection poll. Thanks, Victor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: [PHP] Object sharing

2001-10-24 Thread Andrey Hristov
sharedMemory on *nix -- Andrey Hristov Web Developer Icygen Corporation BUILDING SOLUTIONS http://www.icygen.com On Wednesday 24 October 2001 09:35 am, you wrote: Does anyone know a way to share an object with all sessions ? The idea is to access the same database connection poll.

[PHP] Re: Help converting ASP-PHP

2001-10-24 Thread MrBaseball34
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... datCurrent, intCurrentMonthDays and intWorkDays are local This didn't totaly help. This line I can't figure out: intCurrentMonthDays= Day[DateAdd[d,-1, DateAdd[m,1, datCurrent]]]; Basically it gets the number of days in the

RE: [PHP] Object sharing

2001-10-24 Thread Victor Hugo Oliveira
Is there an easy way to save an object in this section ? The object will have something like an open file or a database connection... Thanks, Victor -Original Message- From: Andrey Hristov [mailto:[EMAIL PROTECTED]] Sent: quarta-feira, 24 de outubro de 2001 16:43 To: [EMAIL PROTECTED]

[PHP] I NEED HELP WITH PWS AND W98

2001-10-24 Thread Nicolas Llamosas
My name is Nicolás Llamosas, I`m from Río Cuarto, Argentina and sorry for my poor english. I need informacion about how configure Personal Web Server under W98 to use with PHP 3.0 I downloaded the BIN code of PHP version 3.0.17 for W32 and I followed the instructions on the manual #8220;PHP

Re: [PHP] Enabling php in only certain hosts and directories

2001-10-24 Thread Tamas Arpad
On Wednesday 24 October 2001 08:19, you wrote: Well, php runs the same as apache, so whatever apache can access, php can access. So any files with the db passwords that need to be accessed by php, can be seen by all users who can upload php scripts to your server. That's not completely true.

Re: [PHP] PHP with XML

2001-10-24 Thread Tamas Arpad
On Tuesday 23 October 2001 21:17, Vinicius Tavares wrote: What I have to do to make the PHP4 run the DOM XML??? Download the libxml library (the development packages too, if you download the packaged distrib). And compile php with it (--with-dom switch for configure). http://www.xmlsoft.org

[PHP] Opening a new page when done

2001-10-24 Thread Roy W
I have several scripts that when you complete a form it executes a PHP script. At the end of each script I have a simple statement saying it's done and then a place to hyperlink back to a given page: PRINT Process complete. a href=\index.html\Click here/a to continue; But what I really wanna

Re: [PHP] libxml

2001-10-24 Thread Tamas Arpad
On Wednesday 24 October 2001 11:38, php wrote: Firstly, I use php 4.0.5 and libxml 2.3.9 on several machines without any problem. Older php and libxml combinations however caused many segmentation faults, especially with not well-formatted xmls. Are you sure that you warning message is

Re: [PHP] OnUNload Scripts

2001-10-24 Thread _lallous
This can be done...but what if the user closes the whole browser? the frame won't work cause it will also be closed i guess! The popup window will assure that in all cases it will be poped up. Kodrik [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... You could

[PHP] Re: I NEED HELP WITH PWS AND W98

2001-10-24 Thread _lallous
1)Install PHP w/ the installer or manually 2)In PWS add a new virtual directory and give it Script+Execute rights. 3)Create a simple script there (where the virtual directory points) and write ?phpinfo();? just to see if everything is fine. you may want to try to ask in php.install group too.

RE: [PHP] Opening a new page when done

2001-10-24 Thread james . fairbairn
just print the following at the point where you decide you want to redirect: script language=JavaScript !-- location.href=whereveryouwannago.php; //-- /script a better alternative is to send a redirection header with the response, but this depends on you not sending any HTML output to

Re: [PHP] Problems with TTF

2001-10-24 Thread Michael A. Peters
On Wed, 24 Oct 2001 12:37:16 +0200 Alberto alberto arround [EMAIL PROTECTED] wrote: Warning: Could not find/open font in /sdr/httpd/Prisa/DATA/private/libs/graficos/intradia.php on line 57 Line 57: ImageTTFText ($O_imagen, 11, 0, 10, 20, $O_colorValor, arial.ttf,$s_Valor);

[PHP] Application servers / job priorities ?

2001-10-24 Thread Lee
Hi, I am developing a portal that will allow users to perform various calculations on their data sets. These calculations (handled by C / Fortran programs) will be run as external processes (and may take up to a few hours to complete). I am wondering if there is something that I can use (either

Re: [PHP] Opening a new page when done

2001-10-24 Thread Richard S. Crawford
Assuming you don't output anything else to a web page: header (Location: index.html); should do the trick if you put it at the end of the program. Be warned, though, that if you output anything to the browser at all, the header function will not work. Good luck! At 06:39 AM 10/24/2001,

[PHP] Re: Application servers / job priorities ?

2001-10-24 Thread Hugh Bothwell
Lee [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am developing a portal that will allow users to perform various calculations on their data sets. These calculations (handled by C / Fortran programs) will be run as external processes (and may take up to a

Re: [PHP] How to protect MySQL password

2001-10-24 Thread Kurt Lieber
On Wednesday 24 October 2001 00:30, you wrote: What we really need is an expert here to give us the low-down on the best way to accomplish the best security given regular tools. There isn't a way to solve it within the constraints you've mentioned (shared server at a hosting provider,

[PHP] Error: 1 is not a valid mysql link resource

2001-10-24 Thread Rafael Steil
Hi all. With php version 4.0.1, I made a database class. I use a function called connect() to open database connection to mysql, and the link resource is stored in $GLOBALS[CONNETION_ID] global variable. All of code work perfectly, with no any problems.. But when I upgraded

[PHP] file system question

2001-10-24 Thread Jay Paulson
Hello- I'm trying to write a php script that creates a directory and then copies uploaded files to that directory. That isn't hard but what is hard is the fact that the script tells me that i do not have permission to do any of these actions. I'm running red hat 7.1 and I have heard things

[PHP] XML newbie

2001-10-24 Thread Srinivasan Ranganathan
Hi Its me again (for those who know me ;-)). ive been working with php and mysql for a while and am curious about xml. what do i have to do to get started? thanks in advance Srinivasan Ranganathan Do You Yahoo!? Send a newsletter,

Re: [PHP] I NEED HELP WITH PWS AND W98

2001-10-24 Thread Chris Hayes
poor english. I need informacion about how configure Personal Web Server under W98 to use with PHP 3.0 I downloaded the BIN code of PHP version 3.0.17 for W32 and I followed the instructions on the manual #8220;PHP Manual#8221; (I downloaded it in php.net page, and I configured the

RE: [PHP] XML newbie

2001-10-24 Thread Jon Haworth
Start your document with ?xml version=1.0? Sorry, couldn't resist it :-) http://www.w3.org/XML/ isn't a bad place to find out about it, but if you find them a bit dry or you're in need of a nice tutorial then you'd better get yourself over to http://hotwired.lycos.com/webmonkey/authoring/xml/

Re: [PHP] I NEED HELP WITH PWS AND W98

2001-10-24 Thread Richard S. Crawford
Getting PHP to work with Apache is pretty simple. The documentation is easy to read. I would agree with trying Apache on your Win98 box; but be warned that the current Apache release is only supposed to be stable on NT platforms. Since I have win2k it's not an issue for me, but it might now

Re: [PHP] file system question

2001-10-24 Thread Rafael Steil
Well, this is a problem.. with perl, you can use suidperl, but not with php.. the most easyest way is to give write permission to apache user to the directory you want to upload the files... Rafael Steil On Wednesday 24 October 2001 11:43, you wrote: Hello- I'm trying to write a

RE: [PHP] Re: Annotated PHP Manual

2001-10-24 Thread V
try to use webzip, or teleport, or such kind of software Salu2, V -Mensaje original- De: DL Neil [mailto:[EMAIL PROTECTED]] Enviado el: sábado 20 de octubre de 2001 17:08 Para: [EMAIL PROTECTED]; Yasuo Ohgaki Asunto: Re: [PHP] Re: Annotated PHP Manual Khalid Hazmi wrote:

RE: [PHP] I NEED HELP WITH PWS AND W98

2001-10-24 Thread Dana Holt
I use Apache on Win ME (don't ask!), and it works fine. Never tried it on 98 though. -- Dana Holt / [EMAIL PROTECTED] Xenos Online http://www.xenosonline.com/ --- This is my sig. There are many like it, but this one is mine. I must master my sig as I must master my life.

[PHP] Re: redirecting the browser

2001-10-24 Thread John A. Grant
Ozgur Demirtas [EMAIL PROTECTED] wrote in message 001a01c15c57$ce6fad20$ea0d198a@Jackhammer">news:001a01c15c57$ce6fad20$ea0d198a@Jackhammer... Hi all, I have a PHP script and at one point of the script I am trying to redirect my browser to a certaion page. I can't seem to find an easy way of

Re: [PHP] Problems with TTF

2001-10-24 Thread Oliver Heinisch
At 24.10.01 12:37, you wrote: Warning: Could not find/open font in /sdr/httpd/Prisa/DATA/private/libs/graficos/intradia.php on line 57 Line 57: ImageTTFText ($O_imagen, 11, 0, 10, 20, $O_colorValor, arial.ttf,$s_Valor); arial.ttf is into the same dir. Any ideas? I had the same

RE: [PHP] I NEED HELP WITH PWS AND W98

2001-10-24 Thread Srinivasan Ranganathan
Hi Oh yes, run apache+php on win 98. works like a wonder. try the php-win32 site for win98 specific distro. regards Srinivasan Ranganathan *NEW* Yahoo! Messenger for SMS *NEW* Now on your ORANGE phone Visit

Re: [PHP] aaaaaaaaaaaaaaa

2001-10-24 Thread Douglas Winslow
Franco Breciano wrote: a for($i=0;$i13;$i++){echo chr(97+($i?3:0));} drw -- 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

[PHP] how do i give optional arguments to functions??

2001-10-24 Thread sunny AT wde
hi all!! i'm writing functions like - --- function top () { echo blah blah blah;} --- what i want to do is make it so that i can do - --- function top($image) { echo blah blah $image blah; } --- but also make the $image parameter in the top() as optional. so if its not

Re: [PHP] How to protect MySQL password

2001-10-24 Thread Arpad Tamas
On Wednesday 24 October 2001 16:42, Kurt Lieber wrote: On Wednesday 24 October 2001 00:30, you wrote: What we really need is an expert here to give us the low-down on the best way to accomplish the best security given regular tools. There isn't a way to solve it within the constraints

Re: [PHP] how do i give optional arguments to functions??

2001-10-24 Thread Richard S. Crawford
function top ($image) { if ($image) echo blah blah blah; else echo blah blah $image blah; } There's probably a more efficient way to do it. At 09:57 AM 10/24/2001, sunny AT wde wrote: hi all!! i'm writing functions like - --- function top () { echo blah blah blah;}

[PHP] File sharing

2001-10-24 Thread Victor
I'm trying to access an object as a Singleton. Here is the source code I'm using. The problem is that the member objFile from the $test variable is set to an open file in the class constructor. It works fine, but when I recover it from the memory, the file handler gets lost in starts being

Re: [PHP] how do i give optional arguments to functions??

2001-10-24 Thread Arpad Tamas
On Wednesday 24 October 2001 19:14, Richard S. Crawford wrote: The default value for $image parameter was missing: function top ($image=defaultvalue) { if ($image==defaultvalue) echo blah blah blah; else echo blah blah $image blah; } Arpi -- PHP General Mailing

[PHP] Toronto Tutorial on Monday Oct.29 7PM

2001-10-24 Thread Rasmus Lerdorf
Turned out there was enough interest. Details at http://www.php.net/~rasmus/toronto.txt Will be another one in Ottawa on Thursday Nov.1, but I don't have details on that one yet. Watch the PHP calendar at www.php.net for it. -Rasmus -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] how do i give optional arguments to functions??

2001-10-24 Thread Richard S. Crawford
Hm, is the default attribute necessary? I've used this sort of approach without the default attribute just fine in the past. Though I admit that the default attribute would make me feel more secure. At 10:30 AM 10/24/2001, Arpad Tamas wrote: On Wednesday 24 October 2001 19:14, Richard S.

Re: [PHP] how do i give optional arguments to functions??

2001-10-24 Thread Tamas Arpad
On Wednesday 24 October 2001 19:26, Richard S. Crawford wrote: Hm, is the default attribute necessary? I've used this sort of approach without the default attribute just fine in the past. Though I admit that the default attribute would make me feel more secure. Not really necessary, but I

RE: [PHP] how do i give optional arguments to functions??

2001-10-24 Thread Chris Bailey
Check out the manual section on default parameters... But the basics are: function top($image = null) { if ($image) ... else ... } Or maybe: That will set image to be null, so that you can call top either as: top(); or

Re: [PHP] how do i give optional arguments to functions??

2001-10-24 Thread Richard S. Crawford
Ahh, good point. Thanks for the tip. :) At 10:45 AM 10/24/2001, Tamas Arpad wrote: Not really necessary, but I like to make code without any warning message (it also makes the code more cleaner as you said), and you'll get a warning message if there's no parameter given at the function call

Re: [PHP] how do i give optional arguments to functions??

2001-10-24 Thread DL Neil
On Wednesday 24 October 2001 19:14, Richard S. Crawford wrote: The default value for $image parameter was missing: function top ($image=defaultvalue) { if ($image==defaultvalue) echo blah blah blah; else echo blah blah $image blah; } If the default value can be

Re: [PHP] COPY TO SENT FOLDER

2001-10-24 Thread richard phynga
use imap_append. That is what that function is for... it is also how to handle drafts... check out www.tijuana.com, it is a commercial web based mail service I wrote entirely in php with IMAP support. It also handles multiple attachments, multiple attachment forwarding, and sign up 'on-the-fly'

RE: [PHP] how do i give optional arguments to functions??

2001-10-24 Thread Chris Bailey
It could be, but then you would have two spaces in between the 2nd and 3rd blah, instead of just the one space. But, depending on your actual application, this may work out. -Original Message- From: DL Neil [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 24, 2001 10:41 AM To: Arpad

[PHP] phplib, pear db, metabase, adodb, and native mysql benchmarks

2001-10-24 Thread John Lim
Someone asked me to benchmark PHPLib also. Here is the revised benchmarks, with some minor speedups for PEAR DB and Metabase. Benchmark was to select 82 rows from the products table 200 times. The tests were repeated 5 times. Connection times were excluded from the benchmark. Lower values are

[PHP] Can PHP do what this javascript does...

2001-10-24 Thread chip . wiegand
iTo print/i: a href=javascript:if (window.print != null) { window.print(); } else { alert('Unfortunately, your browser does not support this shortcut. Please select Print from the File menu.'); } bClick here/b/a ior/i Select bFile/b and then bPrint/b from your browser's menu. Is there an

Re: [PHP] Can PHP do what this javascript does...

2001-10-24 Thread Duncan Hill
On Wed, 24 Oct 2001 [EMAIL PROTECTED] wrote: iTo print/i: a href=javascript:if (window.print != null) { window.print(); } else { alert('Unfortunately, your browser does not support this shortcut. Please select Print from the File menu.'); } bClick here/b/a ior/i Select bFile/b and then

[PHP] use of system/exec

2001-10-24 Thread John Gurley
Hello, Could someone please show me an example of code using system or exec. Would be great if the string was a unix command. Cheers John _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp --

Re: [PHP] Can PHP do what this javascript does...

2001-10-24 Thread Richard S. Crawford
Unfortunately, since PHP lives on the server and JavaScript lives on the browser, there really is no way to get PHP to do what you want. Stick with JavaScript. There's really no reason not to when you're doing client-side programming. At 11:14 AM 10/24/2001, [EMAIL PROTECTED] wrote: iTo

Re: [PHP] use of system/exec

2001-10-24 Thread Mark
On Wed, 24 Oct 2001 18:19:19 +, John Gurley wrote: Hello, Could someone please show me an example of code using system or exec. Would be great if the string was a unix command. Cheers John I like backticks the best because they're easiest to deal with. ? $output=`ls | wc`; echo $output;

[PHP] is_int() and is_double

2001-10-24 Thread Michael George
I am having trouble with the is_int() and is_double() functions. The relevant parts of the function I'm using are: --- function lookupProduct( $partNum, $serial ) { print( lookupProduct( $partNum, $serial )BR\n );

[PHP] Re: Redirecting to a new php file

2001-10-24 Thread Mike Frazer
Use the header() function in conjunction with the Location HTTP header: header(Location: http://host.domain.tld/path/to/file.php;); This MUST be sent to the browser before ANY other output. You can execute as many commands as you like but this must come before any output (and before the html

[PHP] FORMs (HELP) --- PHP Gurus (Please HELP)

2001-10-24 Thread Miguel Ribeiro
Hi, How can be possible to call other functions (that have a html pages) from a first function that also have a html with a form and pass all html variables without losing them? I've a problem that from a html form I'm losing all html variables and this is happening because this form is located

Re: [PHP] Can PHP do what this javascript does...

2001-10-24 Thread Mike Frazer
Javascript can be embedded in PHP files anyway. I do a lot of database management interfaces in PHP and one thing I want to do is protect items from being accidentally deleted. I use Javascript to verify that they intended to click on the link to delete the information. Remember, PHP files are

Re: [PHP] sorting an array of objects

2001-10-24 Thread Matt McClanahan
On Wed, Oct 24, 2001 at 10:43:53AM +0100, L Melville wrote: Is it possible to sort a class array using array multisort, I have two items in each class that I wish to sort by, one is a text and the other is the first item in an array within within each class. i.e.;- $class[$index]-text;

[PHP] URL variables

2001-10-24 Thread Clint Tredway
How do I reference URL variables..? -- 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 do i give optional arguments to functions??

2001-10-24 Thread Mike Frazer
Don't forget: if a function has multiple arguments the optional ones must be to the RIGHT of the required ones: function testing123($one, $two=2, $three=3)// Good function testing123($one=1, $two, $three=3)// Bad function testing123($one=1, $two=2, $three)// Bad Mike

[PHP] Re: [PHP-DB] array-problems

2001-10-24 Thread Jim Lucas
Try this: BEGIN:PHP-CODE $result = mysql_query (SELECT DISTINCT date FROM linktracker WHERE name LIKE '$PHP_AUTH_USER' GROUP BY date ORDER BY date); if (mysql_num_rows($result)) { for($i=0;$icount($row);$i++) { $date = array( begin = array($i = $row[date]),

[PHP] Removing an Array Element

2001-10-24 Thread Jason Caldwell
How can I remove an Array Element from my Array? For example: $myArray = array('100'='jibberjabber','200'='morejibberjabber','0'=''); if(isset($myArray[0])) // here is where I want to purge Key[0] from the Array all together ; I check for the presence of Key[0], which may not be

[PHP] Trying to subtract...no luck. (Long Code)

2001-10-24 Thread Michael O'Neal
Hi. I'm trying to figure out how to subtract 1 variable from another, but I'm not having any luck. It works on this page: ?php $db_name = comanche; $table_name = ProjectTasks; $connection = @mysql_connect($db,$user,$pass) or die(Couldn't Connect.); $db = @mysql_select_db($db_name,

[PHP] slow mcrypt_create_iv()

2001-10-24 Thread Chuck Theobald
Hi, I have a system of programs that use mcyrpt routines. The first few times I run through the routine containing mcrypt_create_iv it returns quite quickly, but afterwards, this function can take from 5 to 15 seconds to return. The function wrapping the encryption routines is as follows:

Re: [PHP] Trying to subtract...no luck. (Long Code)

2001-10-24 Thread Jim Lucas
one problem on the second script you are trying to use variables that are in an array. if this is where you are talking about you need to specify the array[key] while ($myrow=DB_fetch_array($result)){ $difference = ($budget - $actual); $difference = ($myrow[budget] - $myrow[actual]);

RE: [PHP] problem pattern matching a url with question mark

2001-10-24 Thread sgibbs
ah, sorry about the confusion. The url I provided is just an example of a url containing a question mark for which I'm trying to find a pattern match in my content text. -Original Message- From: Neil Freeman [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 24, 2001 4:16 AM Cc:

Re: [PHP] Opening a new page when done

2001-10-24 Thread Chuck
If you are going to use the javascript solution, be sure to add a noscript container for browsers that do not support javascript or have it disabled: SCRIPT language=JavaScript1.1 !-- location.replace(new-location.html); //-- /SCRIPT NOSCRIPT META http-equiv=Refresh content=0;

Re: [PHP] Can PHP do what this javascript does...

2001-10-24 Thread Mike Eheler
There's a really long method of doing it that would work, but would involve server-side browser detection, and a database containing a list of browsers that support print shortcuts. Stick with the JS. Mike [EMAIL PROTECTED] wrote: iTo print/i: a href=javascript:if (window.print != null) {

Re: [PHP] how do i give optional arguments to functions??

2001-10-24 Thread John A. Grant
Chris Bailey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Check out the manual section on default parameters... But the basics are: function top($image = null) { if ($image) Shouldn't that be: function top($image=null) if ($image) --

  1   2   >