[PHP] Compensating for time zones in PHP

2003-11-17 Thread Dave G
PHP Gurus, I'm building a calendar which does some things like compare dates. For example, if an event is in the past, then the link in the calendar is made inactive. To do this I'm converting everything into UNIX time stamps, so I can do simple "greater than" or "less than" type equations

[PHP] passing second function through a function

2003-11-17 Thread Ian Truelsen
What I want to do is to call a function from within a function, but pass the secondary function name through the first function. Like this: function1(function2) Then call function2 from within function1. Unfortunately, I have been unable to figure out the proper syntax for calling the second func

Re: [PHP] passing second function through a function

2003-11-17 Thread CPT John W. Holmes
From: "Ian Truelsen" <[EMAIL PROTECTED]> > What I want to do is to call a function from within a function, but pass > the secondary function name through the first function. Like this: > > function1(function2) > > Then call function2 from within function1. Unfortunately, I have been > unable to

Re: [PHP] passing second function through a function

2003-11-17 Thread David Otton
On Mon, 17 Nov 2003 11:04:47 -0800, you wrote: >What I want to do is to call a function from within a function, but pass >the secondary function name through the first function. Like this: > >function1(function2) > >Then call function2 from within function1. Unfortunately, I have been >unable to f

Re: [PHP] passing second function through a function

2003-11-17 Thread CPT John W. Holmes
From: "David Otton" <[EMAIL PROTECTED]> > >From: "Ian Truelsen" <[EMAIL PROTECTED]> > > > >> What I want to do is to call a function from within a function, but pass > >> the secondary function name through the first function. Like this: > >> > >> function1(function2) > >> > >> Then call function2

[PHP] passing PHP variables to Javascript ...

2003-11-17 Thread Kenn Murrah
Greetings. I need to be able to pass a PHP variable to a Javascript and can't figure out how to do it. In short, the Javascript win() statement is used open a page as defined in PHP -- i.e., $php_name = "http://www.somewhere.com/something/3.jpg"; , a filename that was generated dynamically in

Re: [PHP] passing PHP variables to Javascript ...

2003-11-17 Thread CPT John W. Holmes
From: "Kenn Murrah" <[EMAIL PROTECTED]> > I need to be able to pass a PHP variable to a Javascript and can't > figure out how to do it. In short, the Javascript win() statement is > used open a page as defined in PHP -- i.e., $php_name = > "http://www.somewhere.com/something/3.jpg"; , a filenam

[PHP] To Loop or Not to Loop?

2003-11-17 Thread Jay Fitzgerald
The code below inserts the same inventory item into the db multiple times - I just need 1 line entry for each inventory item, but multiple photos of each itemHow to do this? I know the code I wrote below is extremely awful, but I am a nebie and that was the only way I could get it to half-w

Re: [PHP] To Loop or Not to Loop?

2003-11-17 Thread Matt Matijevich
The code below inserts the same inventory item into the db multiple times - I just need 1 line entry for each inventory item, but multiple photos of each itemHow to do this? I know the code I wrote below is extremely awful, but I am a nebie and that was the only way I could get it to half-

RE: [PHP] To Loop or Not to Loop?

2003-11-17 Thread Chris W. Parker
Matt Matijevich on Monday, November 17, 2003 12:10 PM said: > The second thing I would do, and this is just at a glance of the code, > I would separate it into 2 tables, inventory(the table you already > have) and inventory_pics (or something like that) and make that

[PHP] explode()

2003-11-17 Thread Adam Williams
I am having a user enter a phrase into a textbox, and then I need to seperate the words he has typed into variables so I can use each one in an sql statement. I know I will use the explode() function to do this, but how will I know how many variables I've created. For instance, if a user type

RE: [PHP] explode()

2003-11-17 Thread Jay Blanchard
[snip] I am having a user enter a phrase into a textbox, and then I need to seperate the words he has typed into variables so I can use each one in an sql statement. I know I will use the explode() function to do this, but how will I know how many variables I've created. For instance, if a us

[PHP] From form to an array

2003-11-17 Thread Jeff McKeon
Is it possible to pass the values of a form directly into an array? I have a multi level, dynamic form. The first level (first form actually) askes how many levels there are and gives you a field to enter in that number. Then upon submit of form1 it creates a new form (form2) that contains 2 fie

[PHP] PHP, HTML, CSS and a lot of problems

2003-11-17 Thread Björn Berg
I have written a short script in PHP that parses an HTML template and replaces Blocks (looks-like special HTML Tags) with information fetched from a Mysql database. The problem I have is that the HTML template includes several Javascripts and CSS definitions, looks like that: @import url(default

RE: [PHP] From form to an array

2003-11-17 Thread Jay Blanchard
[snip] Is it possible to pass the values of a form directly into an array? [/snip] Each form is passed to an array already. Dependent upon form method (GET or POST) the form values are in the $_GET or $_POST array (newer versions of PHP). Start here http://us3.php.net/manual/en/language.variable

[PHP] Help with Solaris/iPlanet 4.1 Setup

2003-11-17 Thread Evans, Tim
No luck with this on php-install, so I thought I'd try here. Thanks. > -Original Message- > From: Evans, Tim [mailto:[EMAIL PROTECTED] > Sent: Monday, November 17, 2003 8:30 AM > To: '[EMAIL PROTECTED]' > Subject: [PHP-INSTALL] Help with Solaris/iPlanet 4.1 Setup > > > I've followed t

Re: [PHP] PHP, HTML, CSS and a lot of problems

2003-11-17 Thread David T-G
Björn -- ...and then Björn Berg said... % % I have written a short script in PHP that parses an HTML template and % replaces Blocks (looks-like special HTML Tags) with information fetched % from a Mysql database. Sounds neat. % % The problem I have is that the HTML template includes several

[PHP] Re: From form to an array

2003-11-17 Thread DvDmanDT
Hmm... Intresting... Like... Hmm.. Name the elements of the second form like Then turn on register_globals, then you'll very automaticly have $array1 and $array2.. -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com ## Please, if you are using windows, you

RE: [PHP] From form to an array

2003-11-17 Thread Jeff McKeon
Jay Blanchard wrote: > [snip] > Is it possible to pass the values of a form directly into an array? > [/snip] > > Each form is passed to an array already. Dependent upon form > method (GET or POST) the form values are in the $_GET or > $_POST array (newer versions of PHP). > > Start here > http:

Re: [PHP] PHP, HTML, CSS and a lot of problems

2003-11-17 Thread Björn Berg
David T-G wrote: % through the PHP script. A link relation to a favicon works without problems % and is displayed in the browser URL. % % Does anybody know how to get it running? Not until you show us some code and some before-and-after. We're not mind readers, you know :-) Yes you are righ

RE: [PHP] Re: From form to an array

2003-11-17 Thread Jeff McKeon
DvDmanDT wrote: > Hmm... Intresting... Like... Hmm.. Name the elements of the > second form like name="array2[LINE_NUM]"> > > Then turn on register_globals, then you'll very automaticly > have $array1 and $array2.. Sorry register_globals are off and not getting turned on... e=swen http://secu

[PHP] Re: passing second function through a function

2003-11-17 Thread DvDmanDT
function call_some_function($function,$args=NULL) { eval("$function($args)"); // Or something like that.. $function(); // also works I think.. } -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com ## Please, if you are using windows, you may be infected by Swe

[PHP] escaping ' when inside a " "

2003-11-17 Thread Adam Williams
If I have the SQL statement: $sql = "select subject from subwhile where subject = '*$var[0]*'"; do I need to put a \ before each '? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Microsoft .NET arguement

2003-11-17 Thread John Nichel
Mike R wrote: I have someone here at my desk arguing that Microsoft's .NET is better than PHP - faster to process, easier and quicker to program, etc. I've never coded anything for .NET, so I can't speak to that. However, in all the test my company has ever done, php on Linux/Apache blew the doo

RE: [PHP] Re: From form to an array

2003-11-17 Thread Jay Blanchard
[snip] Ok, now on submit of this second form I want to take field1 from each line and put it into $array1 and field2 from each line and put it into $arrray2. [/snip] Form 1's info would have to be held as hidden fields in Form 2's construction. An example ... /* formOne.php */

Re: [PHP] escaping ' when inside a " "

2003-11-17 Thread David T-G
Adam -- ...and then Adam Williams said... % % If I have the SQL statement: % % $sql = "select subject from subwhile where subject = '*$var[0]*'"; % % do I need to put a \ before each '? 1) You should have just tried it. 2) No. You owe the Newbie Guide a paragraph on quoting and escaping. H

Re: [PHP] escaping ' when inside a " "

2003-11-17 Thread Marek Kilimajer
Adam Williams wrote: If I have the SQL statement: $sql = "select subject from subwhile where subject = '*$var[0]*'"; Don't you want to do: $sql = "select subject from subwhile where subject LIKE '%$var[0]%'"; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.n

RE: [PHP] escaping ' when inside a " "

2003-11-17 Thread Jay Blanchard
[snip] > If I have the SQL statement: > > $sql = "select subject from subwhile where subject = '*$var[0]*'"; Don't you want to do: $sql = "select subject from subwhile where subject LIKE '%$var[0]%'"; [/snip] Not if the variable is exactly what he is looking for. -- PHP General Mailing List (ht

RE: [PHP] Re: From form to an array

2003-11-17 Thread Jeff McKeon
Jay Blanchard wrote: > [snip] > Ok, now on submit of this second form I want to take field1 > from each line and put it into $array1 and field2 from each > line and put it into $arrray2. > [/snip] > > Form 1's info would have to be held as hidden fields in Form > 2's construction. An example ... >

Re: [PHP] escaping ' when inside a " "

2003-11-17 Thread Adam Williams
Yeah thats what I meant to do, my PHP is very rusty if you can't tell (and so is my SQL) :) Jay Blanchard wrote: [snip] If I have the SQL statement: $sql = "select subject from subwhile where subject = '*$var[0]*'"; Don't you want to do: $sql = "select subject from subwhile where subject LIK

[PHP] Communicating with remote server

2003-11-17 Thread Matt Palermo
I am writing a desktop application using PHP-GTK. I would like this program to be able to connect to a remote server, call some functions that I specify, and return the right information (most likely from a MySQL db). I have access to the server, so I can create any and all functions that I want,

RE: [PHP] Communicating with remote server

2003-11-17 Thread Jeff McKeon
Matt Palermo wrote: > I am writing a desktop application using PHP-GTK. I would > like this program to be able to connect to a remote server, > call some functions that I specify, and return the right > information (most likely from a MySQL db). I have access to > the server, so I can create any

RE: [PHP] Communicating with remote server

2003-11-17 Thread Webmaster
Well, I know how to run MySQL queries and connect to the db and things like that. But I would like to be able to connect to a remote site (ex: http://my-site.com/functions.php). Here I would like to run functions from the remote functions.php file and have it connect to it's own server's db. The

Re: [PHP] Communicating with remote server

2003-11-17 Thread Marek Kilimajer
Matt Palermo wrote: I am writing a desktop application using PHP-GTK. I would like this program to be able to connect to a remote server, call some functions that I specify, and return the right information (most likely from a MySQL db). I have access to the server, so I can create any and all fu

RE: [PHP] Communicating with remote server

2003-11-17 Thread Webmaster
Yes, the remote server does have PHP. This sounds like a good idea. Is it relatively easy to do? I have never worked with HTTP protocol functions for this. Do you know of a tutorial I could look through to learn a little of this? Thanks, Matt -Original Message- From: Marek Kilimajer

Re: [PHP] php-xml

2003-11-17 Thread pnp
I think i found it... thank you for trying to help. Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] auto_prepend/append in htaccess....

2003-11-17 Thread Jonathan Villa
Thanks for the info, but I was hoping on getting some information as to why the code configuration I posted is not working. On Fri, 2003-11-14 at 03:06, Eugene Lee wrote: > On Thu, Nov 13, 2003 at 11:32:34AM -0600, Jonathan Villa wrote: > : > : I want to prepend a configuration file which is loca

Re: [PHP] Looking for Spam free php form

2003-11-17 Thread Justin French
On Tuesday, November 18, 2003, at 04:30 AM, David Buchmueller wrote: I am looking for a canned php form which hides the recipient email from prying eyes. Everything I have found uses a hidden field. You couldn't write one yourself? The key is to store the email address' in a server-side array or

Re: [PHP] Microsoft .NET arguement

2003-11-17 Thread Eugene Lee
On Mon, Nov 17, 2003 at 11:06:37AM -0500, Mike R wrote: : : I have someone here at my desk arguing that Microsoft's .NET is better : than PHP - faster to process, easier and quicker to program, etc. : : They also (claim) that Microsoft's SQL is much faster and such vs. MySQL. Without real benchm

Re: [PHP] Communicating with remote server

2003-11-17 Thread Marek Kilimajer
Webmaster wrote: Yes, the remote server does have PHP. This sounds like a good idea. Is it relatively easy to do? I have never worked with HTTP protocol functions for this. Do you know of a tutorial I could look through to learn a little of this? The easiest way is using filesystem functions wi

RE: [PHP] Communicating with remote server

2003-11-17 Thread Vail, Warren
Lot's of options. Will this access be across the internet, or behind a firewall? Are you concerned about securing your information from prying eyes? You seem to be focusing on a script that runs on the remote machine, does this machine have a web server as well, or will you be executing PH

[PHP] file descriptor problem with tcpclient

2003-11-17 Thread Bill Shupp
Hello, I'm trying to use the program execution functions (like exec, system, passthru, etc) with tcpclient (from Dan Bernstein's ucspi-tcp command line tools), but get this error in the apache log with all of them: tcpclient: fatal: unable to set up descriptor 7: file descriptor not open Any

Re: [PHP] Microsoft .NET arguement

2003-11-17 Thread Raditha Dissanayake
I have a friend who is has MCDBA, MCSE and MCSD he had 100% scores for a couple of exams! was a die hard fan of ASP.NET until recently when he discovered PHP. hasn't written any ASP.NET code since. That should tell us something :-) Mike R wrote: I have someone here at my desk arguing that Micr

Re: [PHP] Microsoft .NET arguement

2003-11-17 Thread Raditha Dissanayake
Dan Joseph wrote: Hi, From my experiences, your coworkers are somewhat correct. I found MySQL to be as fast in most cases, however in databases with millions of records, MySQL started slowing down before the MS SQL did. This is true for inserts but retrievals mysql would still be faster.

Re: [PHP] Microsoft .NET arguement

2003-11-17 Thread Raditha Dissanayake
but still keep HTTP open... and that's running the notorius IIS :-) Jason Wong wrote: >On Tuesday 18 November 2003 00:27, Mike R wrote: > > >>Actually, their claim is that Microsoft environments are secure - you just >>need the proper firewall (that, basically, the problems with Windows boxes >

Re: [PHP] Microsoft .NET arguement

2003-11-17 Thread Raditha Dissanayake
you can with myODBC Mike R wrote: You can't interface MySQL with ODBC? -Mike I agree. I've found MS SQL (and MS Access databases) to be extremely fast when well optimised, even with massive databases. As you can interface with them using ODBC I prefer to use MS database backends when my cl

[PHP] Re: Fwd: MMCache segmentation faults

2003-11-17 Thread Manuel Lemos
On 11/17/2003 02:46 PM, Uros Gruber wrote: Subject: MMCache segmentation faults ===8<==Original message text=== Hello! I send this to [EMAIL PROTECTED] but It was returned. So I'll ask here if somebody have any idea. You can always try to mail [EMAIL PROTECTED] . I upgra

RE: [PHP] Communicating with remote server

2003-11-17 Thread Webmaster
Yes, both my server and the remote server have webservers with PHP installed. I have access to both servers to edit/modify/create files etc. I don't have SSH on the server's though. I have FTP access, so I can work with anything that way. I basically just need a relatively easy way to communica

[PHP] [Q] Development Best Practices

2003-11-17 Thread Adam
All, I'm not new to programing or web development but I am new to creating dynamic pages. I've read through a couple books. I've worked through problems and exercises. Installed and configured the software a few different times in Win32 and OS X. At this point, I feel I have a good handle on t

Re: [PHP] auto_prepend/append in htaccess....

2003-11-17 Thread Jason Wong
On Tuesday 18 November 2003 06:46, Jonathan Villa wrote: > Thanks for the info, but I was hoping on getting some information as to > why the code configuration I posted is not working. Because it's incorrect. Try: php_value auto_prepend_file header.inc php_value auto_append_file footer.inc -

Re: [PHP] [Q] Development Best Practices

2003-11-17 Thread Jason Godesky
There's certainly nothing wrong with putting bits of PHP into a primarily HTML document, but for very large, complicated sites (and you mention that yours is), you'll probably want to use templates to separate out presentation and logic. http://smarty.php.net/ http://sourceforge.net/projects/xt

[PHP] PHP process .html extension file

2003-11-17 Thread BennyYim
PHP server will interpret .php extension files (index.php) as default. What should I set if I want the PHP server also interpret .html files (e.g. index.html) before send to client? Thank You ! .---. | Message Posted by NewsgroupXplorer| | http://www.news

Re: [PHP] PHP process .html extension file

2003-11-17 Thread Jason Wong
On Monday 17 November 2003 18:03, BennyYim wrote: > PHP server will interpret .php extension files (index.php) as default. > > What should I set if I want the PHP server also interpret .html files (e.g. > index.html) before send to client? If using apache: AddType application/x-httpd-php .php .

Re: [PHP] file descriptor problem with tcpclient

2003-11-17 Thread Bill Shupp
On Nov 17, 2003, at 4:49 PM, Bill Shupp wrote: Hello, I'm trying to use the program execution functions (like exec, system, passthru, etc) with tcpclient (from Dan Bernstein's ucspi-tcp command line tools), but get this error in the apache log with all of them: tcpclient: fatal: unable to set

RE: [PHP] Communicating with remote server

2003-11-17 Thread Vail, Warren
If you don't care who sees your data, or you are operating behind a firewall, then the simplest solution has already been mentioned (described as http). You basically code a script on your GTK app to perform an open (see fopen function) to a url on the server machine like "http://remotedbserver.co

Re: [PHP] [Q] Development Best Practices

2003-11-17 Thread Robert Cummings
On Mon, 2003-11-17 at 20:47, Jason Godesky wrote: > > There's certainly nothing wrong with putting bits of PHP into a primarily > HTML document, but for very large, complicated sites (and you mention that > yours is), you'll probably want to use templates to separate out > presentation and logi

[PHP] rmdir withour rmdir function.

2003-11-17 Thread Vincent M.
Hello, I can't use the function rmdir: Warning: rmdir() has been disabled for security reasons But I do need to delete a directory with php. How can I do ? Is there any way to delete an empty directory without using the rmdir function ? I tried to use the unlink function on the directory, but I

Re: [PHP] Communicating with remote server

2003-11-17 Thread Marek Kilimajer
Vail, Warren wrote: The caviate is that anyone who can come up with the correct url (and can access your database machine), will be able to trigger the extract of data. If this is not acceptable, then you need to consider other options. https connection and some secret string in a get variable or i

[PHP] Making a Search Function?

2003-11-17 Thread Dimitri Marshall
Hello... I'm trying to make a search function for my site. This is how it needs to work: First, a user types in a search (ex: niagara falls). All the words then get seperated or stay together, depending on the what the user selects in the form. I can figure this out, all I have to do is use the e

Re: [PHP] rmdir withour rmdir function.

2003-11-17 Thread Marek Kilimajer
ftp_rmdir() Vincent M. wrote: Hello, I can't use the function rmdir: Warning: rmdir() has been disabled for security reasons But I do need to delete a directory with php. How can I do ? Is there any way to delete an empty directory without using the rmdir function ? I tried to use the unlink f

Re: [PHP] [Q] Development Best Practices

2003-11-17 Thread Rob Burris
Adam wrote: My question, how do you guys build your pages? Do your scripts generate all the HTML? I'm looking for tips and resources. Remember for my first site I've embarked on a fairly large site. Code maintenance will be an issue for me as I need to enhance and fix it later on. The practic

Re: [PHP] Making a Search Function?

2003-11-17 Thread Ryan Thompson
To reduce the time it takes to process it all you might want to try using LIKE in your queries. This means your script will only have to process say 50 instead of 10 000 results. (Not saying your DB is this big). For example: SELECT page FROM table_name WHERE description LIKE '%$keyword%'; This

[PHP] About iMail Help

2003-11-17 Thread D. Jame
Hi, Anyone know about imail.?

[PHP] ereg_replace help

2003-11-17 Thread Martin Towell
Hi All, I have an array of strings in the following format: "abcd - rst" "abcd - uvw" "abcd - xyz" "foobar - rst" "blah - rst" "googol - uvw" What I want to do is strip everything from the " - " bit of the string to the end, _but_ only for the strin

Re: [PHP] rmdir withour rmdir function.

2003-11-17 Thread Vincent M.
I'm not lucky, there is no ftp access to the server. This can sound a little strange, but there is no... :( Marek Kilimajer wrote: ftp_rmdir() Vincent M. wrote: Hello, I can't use the function rmdir: Warning: rmdir() has been disabled for security reasons But I do need to delete a directory w

Re: [PHP] Communicating with remote server

2003-11-17 Thread Burhan Khalid
Matt Palermo wrote: I am writing a desktop application using PHP-GTK. I would like this program to be able to connect to a remote server, call some functions that I specify, and return the right information (most likely from a MySQL db). I have access to the server, so I can create any and all fu

[PHP] PHP and PayFlow Pro Issues

2003-11-17 Thread Henrik Hudson
Hey List- Hoping someone can point me in the right direction :) OS: FreeBSD 4.4, patched OpenSSL: 0.9.7c Apache: 1.3.27 PHP: 4.3.4 PayFlow: 3.06 I've compiled PHP with various flags and the Payflow flag, --with-pfpro=shared,/usr/local and added the extension to the php.ini file. Running phpin

Re: [PHP] Single Session for different websites

2003-11-17 Thread Manisha Sathe
thanks for your soln, I searched the web, and got some readymade soln files too, I have one question regarding this, if my php.ini is giving me 'session.save_handler' as 'files' and as server is a shared server so i may not be able to change it, so what can we do to resolve this ? manisha "Burh

Re: [PHP] rmdir withour rmdir function.

2003-11-17 Thread Eugene Lee
On Mon, Nov 17, 2003 at 09:37:52PM -0500, Vincent M. wrote: : : I can't use the function rmdir: : Warning: rmdir() has been disabled for security reasons : : But I do need to delete a directory with php. How can I do ? Is there : any way to delete an empty directory without using the rmdir func

[PHP] mcrypt libraries?

2003-11-17 Thread Jas
I am not sure if I should post my question here but I will anyways. Ok, I have compiled the mcrypt libraries on a Redhat 9 box running apache 2 with php4. And I need to know the next step(s) in getting php to use the libmcrypt libraries. If anyone has set this up in the past or has some point

<    1   2