Re: [PHP] smarty

2004-04-06 Thread Richard Harb
Tuesday, April 6, 2004, 5:33:03 PM, you wrote: > hi all has anyone used smarty before? what do you think of it? I think it's > pretty nice to seperate your script (code) from your design. > i would like to hear your comments and if you have any alternatives let me > know. Hi, I've used it on a

Re: [PHP] Re: Reusing MySQL Connections - Can it be done?

2004-04-06 Thread Justin Patrin
Red Wingate wrote: [...] I tried this, but, same results. If I store the Resource ID from a mysql_pconnect() in $GLOBALS['_CONNECT_DB'] and then call... mysql_query($query, $GLOBALS['_CONNECT_DB']); [...] How are you setting the global? [...] I guess he said he is using $GLOBALS['_CONNECT_D

RE: [PHP] Keyword Search

2004-04-06 Thread Jay Blanchard
[snip] Thanx for the advice. I'll give it a try. BTW, I know that some of my questions belong on a SQL list. Can you recommend any? I haven't found any as active or helpful as this PHP one. [/snip] Some of them depend on the database in question. For MySql [EMAIL PROTECTED] is a good one. Many not

Re: [PHP] Keyword Search

2004-04-06 Thread Robb Kerr
On Tue, 6 Apr 2004 11:25:09 -0500, Jay Blanchard wrote: > [snip] > I've inherited a database so must live with a less than elegant > structure. > The table contains one "keyword" field into which the author has entered > things like... > > Record 1 = Apples > Record 2 = Apples, Bananas > Record 3

RE: [PHP] Array_keys problem

2004-04-06 Thread Ford, Mike [LSS]
On 04 April 2004 01:13, Robin 'Sparky' Kopetzky wrote: > function key_exists($ps_key) > { > if ( in_array($ps_key, > array_keys($this->ma_arguments)) ) { > return true; > } else { > return false; > } > } Ummm -- functio

Re: [PHP] Keyword Search

2004-04-06 Thread Richard Davey
Hello Robb, Tuesday, April 6, 2004, 5:24:55 PM, you wrote: RK> I need to do a search on this field to return all of the records containing RK> "Figs". What's the search syntax? RK> I've tried... RK> SELECT * from dbname.tablename MATCH (dbname.fieldname) AGAINST 'Figs' RK> It doesnt' work. Does

RE: [PHP] Keyword Search

2004-04-06 Thread Jay Blanchard
[snip] I've inherited a database so must live with a less than elegant structure. The table contains one "keyword" field into which the author has entered things like... Record 1 = Apples Record 2 = Apples, Bananas Record 3 = Apples, Figs Record 4 = Bananas, Figs, Dates I need to do a search on t

[PHP] Keyword Search

2004-04-06 Thread Robb Kerr
I've inherited a database so must live with a less than elegant structure. The table contains one "keyword" field into which the author has entered things like... Record 1 = Apples Record 2 = Apples, Bananas Record 3 = Apples, Figs Record 4 = Bananas, Figs, Dates I need to do a search on this fie

Re: [PHP] smarty

2004-04-06 Thread Kelly Hallman
Apr 6 at 5:33pm, Angelo Zanetti wrote: > hi all has anyone used smarty before? what do you think of it? I think > it's pretty nice to seperate your script (code) from your design. > i would like to hear your comments and if you have any alternatives There are a lot of templating systems for PHP, b

Re: [PHP] Regular Expressions

2004-04-06 Thread Curt Zirzow
* Thus wrote Matt Palermo ([EMAIL PROTECTED]): > What exactly does this do: > Your original expression: /< (?!p|br) [^>]* >/x Find '<' not followed by 'p|br' until the first '>' we find. - matches < > - matches Its a bit confusing as why the matches, perhaps the docu

Re: [PHP] Connecting to Databases

2004-04-06 Thread Robb Kerr
On Tue, 6 Apr 2004 10:24:29 -0500, Robb Kerr wrote: > On Tue, 6 Apr 2004 11:18:11 -0400, John W. Holmes wrote: > >> From: "Robb Kerr" <[EMAIL PROTECTED]> >> >>> I have found that it is not uncommon when trying to connect to a database >>> on an Apache server to get a return similar to "Access de

[PHP] function CreateDate i made doesnt work?

2004-04-06 Thread Andy B
> > Replace the above two lines with > > $time = date('YmdHis', mktime(0,0,0,$month,$day,$year); > ok the function works now because when i echo the output of $_SESSION['add']['start_date'] it shows the right 14 digit timestamp for the date i wanted to create... now the problem is getting it to ec

[PHP] smarty

2004-04-06 Thread Angelo Zanetti
hi all has anyone used smarty before? what do you think of it? I think it's pretty nice to seperate your script (code) from your design. i would like to hear your comments and if you have any alternatives let me know. Angelo Di

Re: [PHP] Connecting to Databases

2004-04-06 Thread Robb Kerr
On Tue, 6 Apr 2004 11:18:11 -0400, John W. Holmes wrote: > From: "Robb Kerr" <[EMAIL PROTECTED]> > >> I have found that it is not uncommon when trying to connect to a database >> on an Apache server to get a return similar to "Access denied for user: >> [EMAIL PROTECTED]". I just ran into this pr

Re: [PHP] Help importing a text file via phpmyadmin

2004-04-06 Thread John W. Holmes
From: "Brian Dunning" <[EMAIL PROTECTED]> > I'm trying to use phpmyadmin's "Insert data from a textfile into table" > function. I've done this before many times, exactly the same way, and > never had a problem. But today I'm getting: > >#1148 - The used command is not allowed with this MySQL v

Re: [PHP] Connecting to Databases

2004-04-06 Thread John W. Holmes
From: "Robb Kerr" <[EMAIL PROTECTED]> > I have found that it is not uncommon when trying to connect to a database > on an Apache server to get a return similar to "Access denied for user: > [EMAIL PROTECTED]". I just ran into this problem because I wanted to use > SQLyog to manipulate a table that

[PHP] Help importing a text file via phpmyadmin

2004-04-06 Thread Brian Dunning
Hi all - I'm trying to use phpmyadmin's "Insert data from a textfile into table" function. I've done this before many times, exactly the same way, and never had a problem. But today I'm getting: #1148 - The used command is not allowed with this MySQL version Is there a common cause for this

[PHP] Connecting to Databases

2004-04-06 Thread Robb Kerr
I know that this message is more related to MySQL than PHP but I don't know of a good MySQL board. This board is VERY active and useful. As most of us, I use a variety of programs to produce my HTML/PHP/MySQL. I have run into this problem several times on a variety of programs so thought I'd po

RE: [PHP] Executing PHP shell script in PHP

2004-04-06 Thread jon roig
The shell script is in PHP as well? Presumably, you could either access it as an include or execute it using exec. -- jon --- jon roig web developer email: [EMAIL PROTECTED] phone: 888.230.7557 -Original Message- From: Brent Clark [mailto:[EMAIL PROTECTED] Sent:

RE: [PHP] execute script via email?

2004-04-06 Thread jon roig
Sure... You can write a small php script that uses PHP's imap or pop functions to monitor any email address. (Check out http://us3.php.net/manual/en/ref.imap.php for details.) Once that's written, just schedule it as a task using the windows scheduler or cron in unix/linux. -- jon ---

RE: [PHP] Limiting an array to unique values

2004-04-06 Thread Alex Hogan
I guess I deserved that one... alex hogan > -Original Message- > From: John W. Holmes [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 06, 2004 9:40 AM > To: Alex Hogan; PHP General list > Subject: Re: [PHP] Limiting an array to unique values > > From: "Alex Hogan" <[EMAIL PROTECTED]

Re: [PHP] Limiting an array to unique values

2004-04-06 Thread John W. Holmes
From: "Alex Hogan" <[EMAIL PROTECTED]> > I have an array that I am using as a parameter for a query in a where > clause. > > The array has values that are like this. > > Item 1 > Item 2 > Item 3 > Item 1 > Item 3 > Item 3 > Item 1 > > What I need to have is unique values only. > > Item 1 > Item

RE: [PHP] Limiting an array to unique values

2004-04-06 Thread Alex Hogan
Thanks... Exactly what I needed. alex hogan > -Original Message- > From: joel boonstra [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 06, 2004 9:30 AM > To: PHP General list > Subject: Re: [PHP] Limiting an array to unique values > > On Tue, Apr 06, 2004 at 09:27:31AM -0500, Alex H

Re: [PHP] Limiting an array to unique values

2004-04-06 Thread joel boonstra
On Tue, Apr 06, 2004 at 09:27:31AM -0500, Alex Hogan wrote: > Hi All, > > I have an array that I am using as a parameter for a query in a where > clause. > > The array has values that are like this. > > Item 1 > Item 2 > Item 3 > Item 1 > Item 3 > Item 3 > Item 1 > > What I need to have is uniq

[PHP] Limiting an array to unique values

2004-04-06 Thread Alex Hogan
Hi All, I have an array that I am using as a parameter for a query in a where clause. The array has values that are like this. Item 1 Item 2 Item 3 Item 1 Item 3 Item 3 Item 1 What I need to have is unique values only. Item 1 Item 2 Item 3 How can I sort out the redundant values in that array

Re: [PHP] Re: Reusing MySQL Connections - Can it be done?

2004-04-06 Thread William Lovaton
This is weird, it works for me, I use Oracle though. The real application uses ADODB but it should work with the PHP native resources. I do this: 1. Define a singleton function, for example: getDBConnection() function &getDBConnection() { $db =& GLOBALS['APP_DB_CONNECTION']; if

Re[2]: [PHP] function CreateDate i made doesnt work?

2004-04-06 Thread Richard Davey
Hello Red, Tuesday, April 6, 2004, 3:40:07 PM, you wrote: RW> I've seen this type of creating a timestamp quite often now and was even so RW> often shaking my head about it. Guess i've seen it somewhere in the PHP RW> Documentation's user contributed notes on day. Just google for the term and RW>

Re: [PHP] function CreateDate i made doesnt work?

2004-04-06 Thread Red Wingate
I've seen this type of creating a timestamp quite often now and was even so often shaking my head about it. Guess i've seen it somewhere in the PHP Documentation's user contributed notes on day. Just google for the term and you will find many hits like this: http://www.mail-archive.com/[EMAIL P

[PHP] For your reference, how to validate dynamic form fields.

2004-04-06 Thread Hawkes, Richard
Just spent far too long trying to figure out how to do this, so I thought I'd pass it on to you great guys, in case you need it for the future. I used PHP to create multiple form rows, each one numbered: "); } ?> This creates a number of rows, each with a unique form value name. The problem

[PHP] GD installation

2004-04-06 Thread Shimi
im having a problem installing the GD library OS - Windows XP Pro PHP - 4.3.5 i tried in the PHP.INI get the ";" of the line with the GD extension and im getting an error that the file not found "./php_gd2.dll" i tried to copy the file to main PHP folder and WINDOWS\SYSTEM32 nothing seems to be wor

Re: [PHP] php + lynx + grep

2004-04-06 Thread Red Wingate
Functions like system, exec etc aren't supported by most ISP ( at least over here in germany ). But you might give file_get_contents(); file(); ... a look as they can read the output of HTTP request which might be easier: $var = file ( 'http://weather.noaa.gov/weather/current/KTOL.html' ); fore

Re: [PHP] function CreateDate i made doesnt work?

2004-04-06 Thread Shimi
by the way change ur if alittle.. change the && to || "John W. Holmes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > From: "Andy B" <[EMAIL PROTECTED]> > > > i have the function i made: > > function CreateDate($day, $month, $year) { > > if(!empty($day) && !empty($month) && !empty($y

[PHP] execute script via email?

2004-04-06 Thread BigMark
Is there a way for me to email this script so it executes the close of a round instead of doing it from the website administration . (it is a football tipping script) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] function CreateDate i made doesnt work?

2004-04-06 Thread Richard Davey
Hello Andy, Tuesday, April 6, 2004, 2:18:45 PM, you wrote: AB> i have the function i made: AB> function CreateDate($day, $month, $year) { AB> if(!empty($day) && !empty($month) && !empty($year)){ AB> //convert $day, $month, and $year into a valid timestamp AB> $time= strtotime($day, mktime(0,0,0,

Re: [PHP] function CreateDate i made doesnt work?

2004-04-06 Thread John W. Holmes
From: "Andy B" <[EMAIL PROTECTED]> > i have the function i made: > function CreateDate($day, $month, $year) { > if(!empty($day) && !empty($month) && !empty($year)){ > //convert $day, $month, and $year into a valid timestamp > $time= strtotime($day, mktime(0,0,0,$month,1,$year)); > $time=date("Ymd

[PHP] function CreateDate i made doesnt work?

2004-04-06 Thread Andy B
i have the function i made: function CreateDate($day, $month, $year) { if(!empty($day) && !empty($month) && !empty($year)){ //convert $day, $month, and $year into a valid timestamp $time= strtotime($day, mktime(0,0,0,$month,1,$year)); $time=date("YmdHis", $time); return $time; } else { return false

Re: [PHP] php + lynx + grep

2004-04-06 Thread Burhan Khalid
Brian L. Ollom wrote: lynx --source http://weather.noaa.gov/weather/current/KTOL.html |grep -v '41-35-19N' |grep TOL | head -n 1 I need to get the output of the above command for a web site I'm working on. I've tried exec(), system() and neither seems to work. You know, it might be easier if you

Re: [PHP] php + lynx + grep

2004-04-06 Thread John Nichel
Brian L. Ollom wrote: lynx --source http://weather.noaa.gov/weather/current/KTOL.html |grep -v '41-35-19N' |grep TOL | head -n 1 I need to get the output of the above command for a web site I'm working on. I've tried exec(), system() and neither seems to work. It's output should be something like

[PHP] php + lynx + grep

2004-04-06 Thread Brian L. Ollom
lynx --source http://weather.noaa.gov/weather/current/KTOL.html |grep -v '41-35-19N' |grep TOL | head -n 1 I need to get the output of the above command for a web site I'm working on. I've tried exec(), system() and neither seems to work. It's output should be something like this(it changes hour

[PHP] Re: php + lynx + grep

2004-04-06 Thread Brian L. Ollom
> lynx --source > http://weather.noaa.gov/weather/current/KTOL.html | grep -v > '41-35-19N' |grep TOL | head -n 1 > > I need to get the output of the above command for a web site > I'm working on. I've tried exec(), system() and neither seems > to work. > > It's output should be something like thi

[PHP] php + lynx + grep

2004-04-06 Thread Brian L. Ollom
lynx --source http://weather.noaa.gov/weather/current/KTOL.html |grep -v '41-35-19N' |grep TOL | head -n 1 I need to get the output of the above command for a web site I'm working on. I've tried exec(), system() and neither seems to work. It's output should be something like this(it changes hour

[PHP] Max Filesize for PHP copy

2004-04-06 Thread Ashley
I posted this in the Netware PHP newsgroup, but have not gotten a response. Hopefully I will get something here. I was using a script to copy a file from one location to another. It was working great (but was only testing with small files under 1MB) and then when I tried uploading a file that

Re: [PHP] assigning NULL to a variable

2004-04-06 Thread Marek Kilimajer
Andy B wrote: how would you assign NULL to a variable if its original value is ""? otherwise leave it with its value... if($var === '') $var = NULL; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] php + lynx + grep

2004-04-06 Thread Brian L. Ollom
lynx --source http://weather.noaa.gov/weather/current/KTOL.html |grep -v '41-35-19N' |grep TOL | head -n 1 I need to get the output of the above command for a web site I'm working on. I've tried exec(), system() and neither seems to work. It's output should be something like this(it changes hour

Re: [PHP] PHP has a bug...?

2004-04-06 Thread John W. Holmes
From: "Stephen Craton" <[EMAIL PROTECTED]> > I was making a parabola grapher and I was testing out some values. Part of > the script is to take the variable b and multiply it was negative one, then > multiply by 2 times a. I entered a test value where a equals 1, b equals 0, > and c equals 0. The

Re: [PHP] How to...

2004-04-06 Thread Pavel Jartsev
Vicente Werner wrote: El Martes, 6 de Abril de 2004 10:13, Burhan Khalid escribió: You cannot close the window from within PHP. You have to use client side scripting (Javascript). I've already tried sending : window.close() Just after echoing the file, but with 0 success. Try "onLoad"-event o

Re: [PHP] How to...

2004-04-06 Thread Vicente Werner
El Martes, 6 de Abril de 2004 10:13, Burhan Khalid escribió: > You cannot close the window from within PHP. You have to use client side > scripting (Javascript). I've already tried sending : window.close() Just after echoing the file, but with 0 success. -- PHP General Mailing List (http://www

Re: [PHP] How to...

2004-04-06 Thread Burhan Khalid
Vicente Werner wrote: I've already a php function that outputs a file from a folder outside the www path to a page, but I can't find a way to do this and then close the window where it was outed. Any 1 can point me in the right direction? You cannot close the window from within PHP. You have to u

[PHP] Re: Executing PHP shell script in PHP

2004-04-06 Thread pete M
Brent Clark wrote: Hi Does anyone know of how to execute a php shell script in a php file. Kind Regards Brent Clark assuming *nix php myscript.php or stick at the beginning of the file #!/bin/php and then run ./myscript.php hope it helps pete -- PHP General Mailing List (http://www.php.net

Re: [PHP] register_globals

2004-04-06 Thread Richard Davey
Hello, Sunday, April 4, 2004, 1:17:53 AM, you wrote: n> Why i cann't change register_globals value with ini_set()? Because it's a system level configuration value - you cannot change it in your scripts. register_globals supports PHP_INI_PERDIR and PHP_INI_SYSTEM - meaning it can only be chang

[PHP] register_globals

2004-04-06 Thread nullevent
Hello. In my php.ini file register_globals has value Off. I have script Script echo 1. But if i create .htaccess in this dir which contains string php_value register_globals 0, my script return 0. Why i cann't change register_globals value with ini_set()? bye, mailto:[E

[PHP] Executing PHP shell script in PHP

2004-04-06 Thread Brent Clark
Hi Does anyone know of how to execute a php shell script in a php file. Kind Regards Brent Clark

Re: [PHP] How to Request?

2004-04-06 Thread Chris Shiflett
--- Labunski <[EMAIL PROTECTED]> wrote: > But for example I have a link "index.php?fd=car&c=green".. > How to Request more then one variable if I want to get something like > this: > > if(isset($_REQUEST['fd','c'])){ // incorrect form. How to write this > correctly? > $vehicle = ($_REQUEST['fd']

[PHP] Re: How to Request?

2004-04-06 Thread Pavel Jartsev
Labunski wrote: ... But for example I have a link "index.php?fd=car&c=green".. How to Request more then one variable if I want to get something like this: if(isset($_REQUEST['fd','c'])){ // incorrect form. How to write this correctly? $vehicle = ($_REQUEST['fd']); $color = ($_REQUEST['c']); } i

Re: [PHP] Re: Reusing MySQL Connections - Can it be done?

2004-04-06 Thread Red Wingate
[...] > > I tried this, but, same results. If I store the Resource ID from a > > mysql_pconnect() in $GLOBALS['_CONNECT_DB'] and then call... > > > > mysql_query($query, $GLOBALS['_CONNECT_DB']); [...] > > How are you setting the global? > [...] I guess he said he is using $GLOBALS['_CONNECT_

<    1   2