[PHP] reg exp for smtp error codes

2004-04-23 Thread Robert Kornfeld
hey professionals out there! does anybody have a script that parses the error-code from a returned email-header (esmtp)? thanx! Robby -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] test

2004-04-23 Thread dfgs
dfstg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] test

2004-04-23 Thread dfgs
dfstg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] insert twice pb

2004-04-23 Thread Ronald Rahal
Why this code is inserting twice in the database ? ?php if ( (isset($_POST['empfullname'])) (isset($_POST['empmidname'])) (isset($_POST['empbdate'])) (isset($_POST['emptitle'])) (isset($_POST['departement'])) ) { $empfullname=$HTTP_POST_VARS['empfullname'];

[PHP] Button ???

2004-04-23 Thread Brent Clark
Hi I a few minutes ago I came across something interesting I subscribed to www.phparch.com and when clicking the final button for Complete Order The button went to to dead state, whereby you could not click on it again. It just sat there Does anyone know how to do that and be so kind as to share

RE: [PHP] Button ???

2004-04-23 Thread Thijs Lensselink
Brent Clark wrote on vrijdag 23 april 2004 10:07: Hi I a few minutes ago I came across something interesting I subscribed to www.phparch.com and when clicking the final button for Complete Order The button went to to dead state, whereby you could not click on it again. It just sat there

Re: [PHP] Button ???

2004-04-23 Thread Brent Clark
Something like this: input type=submit value=submit disabled Hi Yes this is correct But how do you get it from an active to disabled state Kind Regards Brent Clark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Remove white space?

2004-04-23 Thread Craig
trim($YOUR_VARIABLE) = Remove whitespace from beginning and end of string http://ie2.php.net/trim strtolower($YOUR_VARIABLE) = Makes a string lowercase http://ie2.php.net/strtolower Hope that helps Robert Sossomon [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am pulling data

Re: [PHP] Button ???

2004-04-23 Thread Craig
This has nothing to do with PHP. Its javascript, http://www.jguru.com/faq/view.jsp?EID=280434 Please keep to topic. Thanks Brent Clark [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Something like this: input type=submit value=submit disabled Hi Yes this is correct But

Re: [PHP] Escape problems...why?

2004-04-23 Thread Jason Wong
On Friday 23 April 2004 12:21, Ryan A wrote: But then am getting a 500 error... What does the webserver log say? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development *

[PHP] Re: [PHP-WIN] [PHP-NIX] File upload

2004-04-23 Thread Ragnar
Hi Vk, I tried this beforehand, but to no avail. The documentation also states that this form field entry does not overwrite the max_filesize_setting in php.ini, when uploading. so even if I set the hidden form field to 30MB and the .ini setting is 8MB the file will be rejected if it's over 8MB.

[PHP] Re: [PHP-WIN] [PHP-NIX] File upload

2004-04-23 Thread Viraj Kalinga Abayarathna
can you send me the fread() part of your script? and what is the OS you are tring this? any how i like to share my coding which I did few weeksback for one of my Windows buddy. Vk. Ragnar wrote: Hi Vk, I tried this beforehand, but to no avail. The documentation also states that this

[PHP] RE: [PHP-NIX] File upload

2004-04-23 Thread Jattie van der Linde
There is some server level setting that alos limits file size uploads. Can not recall the detail of it thou! -Original Message- From: Ragnar [mailto:[EMAIL PROTECTED] Sent: 23 April 2004 06:01 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP-NIX] File upload Hi guys/girls, I am

[PHP] Re: insert twice pb

2004-04-23 Thread Craig
Try this and see what happens: ?php if(isset($_POST['empfullname']) isset($_POST['empmidname']) isset($_POST['empbdate']) isset($_POST['emptitle']) isset($_POST['departement'])) { $empfullname = $_POST['empfullname']; $empmidname = $_POST['empmidname']; $empbdate =

[PHP] $PATH_INFO not working

2004-04-23 Thread Noel da Costa
Hi, Anyone know what might stop the $PATH_INFO variable from working? I developed a nav system using this which works on the test server, but not on the live server. I'm guessing this is something to do with the way PHP (4.2.2) and Apache (2.0) were compiled on the live server (I've posted that

Re: [PHP] Button ???

2004-04-23 Thread Brent Clark
This has nothing to do with PHP. Its javascript, http://www.jguru.com/faq/view.jsp?EID=280434 Please keep to topic. Your right and I apologies Thanks for the link Much appreciated Kind Regards Brent Clark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Escape problems...why?

2004-04-23 Thread Marek Kilimajer
Ryan A wrote: Hey John, Thanks for replying. I cant use strip slashes because there are a number of scripts doing DB things and searching for all of them and modifying things just for one client can be a royal PITA. I tried to use php_flag magic_quotes_gpc off in the *existing* .htaccess file like

[PHP] Re: $PATH_INFO not working

2004-04-23 Thread Torsten Roehr
Noel Da Costa [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Anyone know what might stop the $PATH_INFO variable from working? I developed a nav system using this which works on the test server, but not on the live server. I'm guessing this is something to do with the way PHP

Re: [PHP] Button ???

2004-04-23 Thread Miguel J. Jiménez
Well, anyway... you can use this script: script type=text/jaavscript document.formName.buttonName.disabled=true; /script -- Miguel J. Jiménez ISOTROL, S.A. (Área de Internet) Avda. Innovación nº1, 3ª - 41020 Sevilla (ESPAÑA) [EMAIL PROTECTED] --- http://www.isotrol.com TLFNO. 955036800

[PHP] How to do type/existence checking in PHP5

2004-04-23 Thread Christian Jul Jensen
Hi In PHP5 the behaviour of illegal string offsets has changed. This is documented in the 'thin changes' file. This gives a problem in checking for existence / types of values, directly into a deeper level of a multidimensional array. I reported this as a bug[1] because I find the behaviour

Re[2]: [PHP] Button ???

2004-04-23 Thread Richard Davey
Hello Craig, Friday, April 23, 2004, 9:41:48 AM, you wrote: C This has nothing to do with PHP. C Its javascript, http://www.jguru.com/faq/view.jsp?EID=280434 C Please keep to topic. Agreed, but he didn't know it was JavaScript causing it (as was obvious from his first post). I'm all for keeping

[PHP] calling php function

2004-04-23 Thread T UmaShankari
Hello, Is it possible to call php function in the onclick event ? REgards, Uma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] calling php function

2004-04-23 Thread John W. Holmes
From: T UmaShankari [EMAIL PROTECTED] Is it possible to call php function in the onclick event ? No. Please do research on the difference between server side and client side code. Report back to us when finished. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To

[PHP] Re: calling php function

2004-04-23 Thread Aidan Lister
No, you are confusing javascript (client side) with PHP (server side). T Umashankari [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, Is it possible to call php function in the onclick event ? REgards, Uma -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] Re: How to do type/existence checking in PHP5

2004-04-23 Thread Aidan Lister
I don't understand the question. One should always check the existence of something before attempting to use it. If (isset($var) gettype($var) == boolean) is one way of type checking. Christian Jul Jensen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi In PHP5 the behaviour

Re: Re[2]: [PHP] Button ???

2004-04-23 Thread Brent Clark
Agreed, but he didn't know it was JavaScript causing it (as was obvious from his first post). I'm all for keeping on topic - but really, you have to cut some people some slack sometimes. Hi Its kewl I should have known better and investigated it more properly. Kind Regards Brent Clark --

[PHP] Re: How to do type/existence checking in PHP5

2004-04-23 Thread Red Wingate
Hi, this is a plain design fault on your side: ?php $a = 'this is not an array'; if( is_array( $a['foo'] ) ) print '1'; [...] ? allright, just set $a to be a string, thats allright, now you check wether an string-offset ( foo ) is an array or not which causes an FATAL

[PHP] Re: $PATH_INFO not working

2004-04-23 Thread Noel da Costa
Thanks for the thought... I was using getenv('PATH_INFO'). I tried $_SERVER['PATH_INFO'], but it didn't help. PATH_INFO is working, ie being filled, but Apache doesn't seem to know what to do with it. So if my link has a URL: index.php/section/login it tries to find a literal folder with that

RE: [PHP] A to Z incremental

2004-04-23 Thread Ford, Mike [LSS]
On 22 April 2004 15:22, Paul wrote: Hi! Got this script: ?php for($i='A';$i='Z';$i++){ echo $i.' | '; } The output is: A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P Q | R | S | T | U | V | W | X | Y | Z | AA | AB | AC | ... YX | YY | YZ | where is should

RE: [PHP] A to Z incremental

2004-04-23 Thread electroteque
use the chr($i) system -Original Message- From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 9:31 PM To: 'Paul'; [EMAIL PROTECTED] Subject: RE: [PHP] A to Z incremental On 22 April 2004 15:22, Paul wrote: Hi! Got this script: ?php

[PHP] Re: $PATH_INFO not working

2004-04-23 Thread Torsten Roehr
Noel Da Costa [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thanks for the thought... I was using getenv('PATH_INFO'). I tried $_SERVER['PATH_INFO'], but it didn't help. PATH_INFO is working, ie being filled, but Apache doesn't seem to know what to do with it. So if my link has

RE: [PHP] Search MySQL and Match Whole Words

2004-04-23 Thread Jay Blanchard
[snip] I was wondering if anyone knows how to do whole word searches in mysql. I have a search textbox that users can enter in multiple words to search for in the database, but things like the mysql LIKE match any part of a word. Is there a way to search for whole word matches only? Please let me

Re: [PHP] Re: $PATH_INFO not working

2004-04-23 Thread Marek Kilimajer
Torsten Roehr wrote: Noel Da Costa [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thanks for the thought... I was using getenv('PATH_INFO'). I tried $_SERVER['PATH_INFO'], but it didn't help. PATH_INFO is working, ie being filled, but Apache doesn't seem to know what to do with it.

[PHP] Re: How to do type/existence checking in PHP5

2004-04-23 Thread Christian Jul Jensen
Hi Thanks for taking time to look into this. [EMAIL PROTECTED] (Red Wingate) writes: this is a plain design fault on your side: I'm sorry, but I don't agree. It is standard in PHP4, and one of the advantages of having a type loose programming language. Now this makes sense as you first

Re: [PHP] A to Z incremental

2004-04-23 Thread Rob Ellis
On Fri, Apr 23, 2004 at 09:41:39PM +1000, electroteque wrote: use the chr($i) system or range()... print implode(' | ', range('A', 'Z')); - rob -Original Message- From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 9:31 PM To: 'Paul'; [EMAIL

Re: [PHP] [PHP-NIX] File upload

2004-04-23 Thread raditha dissanayake
Ragnar wrote: Hi guys/girls, I am having some major pain here with a php script handling file uploads. It's part of an CMS and the file in question takes a PDF, makes a thumbnail of it and then moves it to it's proper location on the server. All this works fine with smaller files ~ 2 MB. I am

[PHP] Counting number of characters without spaces between them?

2004-04-23 Thread Richard Davey
Hi all, It's a warm sunny day and I'm trying to wrap my head around the following: I want to be able to check to see if, in a string, the user has entered too many consecutive characters and not enough spaces. For example they might enter a subject like: hello world! how

[PHP] Call to external function

2004-04-23 Thread Jeff McKeon
Is there a way in PHP to make a call to a javascript funtion? I have a javascript that I want to start when an sql query begins and stop when the php code is done. Is this possible? Thanks, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Call to external function

2004-04-23 Thread Jay Blanchard
[snip] Is this possible? [/snip] Anything is possible! Have you considered echoing the javascript code out via PHP? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Call to external function

2004-04-23 Thread Jeff McKeon
[snip] Is this possible? [/snip] Anything is possible! Have you considered echoing the javascript code out via PHP? Yes, but I can't seem to get the right javascript code figured out. I have the script start when the page loads with an onload=function('go') in the body tag. But I

RE: [PHP] TRUE or true?

2004-04-23 Thread Shaunak Kashyap
lowercase -Original Message- From: Richard Davey [mailto:[EMAIL PROTECTED] Sent: Thursday, April 22, 2004 7:52 PM To: [EMAIL PROTECTED] Subject: [PHP] TRUE or true? Hi all, I know from a code point of view it makes no difference at all (i.e. they both work), but which format

[PHP] Re: Counting number of characters without spaces between them?

2004-04-23 Thread Torsten Roehr
Richard Davey [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all, It's a warm sunny day and I'm trying to wrap my head around the following: I want to be able to check to see if, in a string, the user has entered too many consecutive characters and not enough spaces. For

Re: [PHP] Call to external function

2004-04-23 Thread Torsten Roehr
This is more of a JavaScript than a PHP question. Maybe you could search google for 'stop JavaScript function' or something. Torsten Jeff McKeon [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [snip] Is this possible? [/snip] Anything is possible! Have you considered echoing

Re: [PHP] Counting number of characters without spaces between them?

2004-04-23 Thread Tom Rogers
Hi, Friday, April 23, 2004, 11:50:56 PM, you wrote: RD Hi all, RD It's a warm sunny day and I'm trying to wrap my head around the RD following: RD I want to be able to check to see if, in a string, the user has RD entered too many consecutive characters and not enough spaces. For RD example

Re: [PHP] reg exp for smtp error codes

2004-04-23 Thread Curt Zirzow
* Thus wrote Robert Kornfeld ([EMAIL PROTECTED]): hey professionals out there! does anybody have a script that parses the error-code from a returned email-header (esmtp)? You dont need a regex, just a simple explode will work: list($code, $message) = explode( , $result_string, 2); Curt

Re[2]: [PHP] Counting number of characters without spaces between them?

2004-04-23 Thread Tom Rogers
Hi, Saturday, April 24, 2004, 12:42:57 AM, you wrote: TR Hi, TR Friday, April 23, 2004, 11:50:56 PM, you wrote: TR You could try something like this TR $string = hello world! how arrre you today?!!; TR

Re[2]: [PHP] Counting number of characters without spaces between them?

2004-04-23 Thread Richard Davey
Hello Tom, Friday, April 23, 2004, 3:42:57 PM, you wrote: TR $string = hello world! how arrre you today?!!; TR if(preg_match_all('/(\w)\1{4,}|(\W)\2{4,}/',$string,$match)){ TR echo too many repeated charactersbr; TR print_r($match); TR } TR That will catch

[PHP] OK SQL experts...

2004-04-23 Thread Brian Dunning
I STFW and RTFM and I still can't figure out why this returns a 1064 parse error: SELECT * FROM 'my_table' WHERE ('field_1' LIKE '%$keyword%' OR 'field_2' LIKE '%$keyword%' OR 'field_3' LIKE '%$keyword%') AND 'status' = 'active'; Anyone? TIA! - B1ff Lamer -- PHP General Mailing List

RE: [PHP] OK SQL experts...

2004-04-23 Thread Edward Peloke
why are the table and field names surrounded by single quotes? -Original Message- From: Brian Dunning [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 11:19 AM To: [EMAIL PROTECTED] Subject: [PHP] OK SQL experts... I STFW and RTFM and I still can't figure out why this returns a

Re: [PHP] OK SQL experts...

2004-04-23 Thread Brian Dunning
I tried it both ways - didn't make any difference (phpmyadmin adds the single quotes when I was trying to use its sql function to debug, so I figured what the hell)... On Apr 23, 2004, at 8:27 AM, Edward Peloke wrote: why are the table and field names surrounded by single quotes?

Re: [PHP] Re: How to do type/existence checking in PHP5

2004-04-23 Thread Curt Zirzow
* Thus wrote Christian Jul Jensen ([EMAIL PROTECTED]): Hi Thanks for taking time to look into this. [EMAIL PROTECTED] (Red Wingate) writes: this is a plain design fault on your side: I'm sorry, but I don't agree. It is standard in PHP4, and one of the advantages of having a

RE: [PHP] OK SQL experts...

2004-04-23 Thread Jay Blanchard
[snip] I tried it both ways - didn't make any difference (phpmyadmin adds the single quotes when I was trying to use its sql function to debug, so I figured what the hell)... [/snip] Those aren't single quotes it adds to table and column names...those are back tics (on the same key as the

RE: [PHP] OK SQL experts...

2004-04-23 Thread Edward Peloke
does it just return the error when running in the php page? If you pull it out can you run it in mysql without errors? -Original Message- From: Brian Dunning [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 11:23 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] OK SQL experts... I

Re: [PHP] OK SQL experts...

2004-04-23 Thread Brian Dunning
It gives the same error when I run it in phpmyadmin. On Apr 23, 2004, at 8:34 AM, Edward Peloke wrote: does it just return the error when running in the php page? If you pull it out can you run it in mysql without errors? -Original Message- From: Brian Dunning [mailto:[EMAIL

Re: [PHP] OK SQL experts...

2004-04-23 Thread Richard Harb
AFAIK phpMyAdmin uses backticks for table/field names, not single quotes ... Friday, April 23, 2004, 5:22:35 PM, thus was written: I tried it both ways - didn't make any difference (phpmyadmin adds the single quotes when I was trying to use its sql function to debug, so I figured what the

Re: [PHP] OK SQL experts...

2004-04-23 Thread John W. Holmes
From: Brian Dunning [EMAIL PROTECTED] I STFW and RTFM and I still can't figure out why this returns a 1064 parse error: SELECT * FROM 'my_table' WHERE ('field_1' LIKE '%$keyword%' OR 'field_2' LIKE '%$keyword%' OR 'field_3' LIKE '%$keyword%') AND 'status' = 'active'; Use backticks

Re: [PHP] OK SQL experts...

2004-04-23 Thread Brian Dunning
Backticks, single quotes, or nothing at all makes no difference. I believe the parsing error is due to my parentheses or AND/OR structure. Any thoughts on that? On Apr 23, 2004, at 8:32 AM, John W. Holmes wrote: From: Brian Dunning [EMAIL PROTECTED] I STFW and RTFM and I still can't figure

RE: [PHP] OK SQL experts...

2004-04-23 Thread Jeff McKeon
SELECT * FROM 'my_table' WHERE ('field_1' LIKE '%$keyword%' OR 'field_2' LIKE '%$keyword%' OR 'field_3' LIKE '%$keyword%') AND 'status' = 'active'; Longshot but try to remove the ' ' from around the field names in the where statement.. Or SELECT * FROM My_Table WHERE field_1 like

RE: [PHP] OK SQL experts...

2004-04-23 Thread Jay Blanchard
[snip] SELECT * FROM 'my_table' WHERE ('field_1' LIKE '%$keyword%' OR 'field_2' LIKE '%$keyword%' OR 'field_3' LIKE '%$keyword%') AND 'status' = 'active'; [/snip] How about this? SELECT * FROM my_table WHERE (field_1 LIKE '%$keyword%' OR field_2 LIKE '%$keyword%' OR field_3 LIKE '%$keyword%')

RE: [PHP] OK SQL experts...

2004-04-23 Thread Edward Peloke
what value is being put in the $keyword variable? You are sure all these columns exist? -Original Message- From: Brian Dunning [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 11:36 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] OK SQL experts... Backticks, single quotes, or nothing

RE: [PHP] OK SQL experts...

2004-04-23 Thread Edward Peloke
if you echo out the query..what is the output? -Original Message- From: Brian Dunning [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 11:36 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] OK SQL experts... Backticks, single quotes, or nothing at all makes no difference. I believe

Re: [PHP] OK SQL experts...

2004-04-23 Thread Brian Dunning
Yes, I've checked and rechecked the spelling on everything. I've been testing with a word that I know appears in at least one of the fields. On Apr 23, 2004, at 8:54 AM, Edward Peloke wrote: what value is being put in the $keyword variable? You are sure all these columns exist? -Original

Re: [PHP] OK SQL experts...

2004-04-23 Thread Brian Dunning
phpmyadmin echoes it out exactly as I copied pasted into my first post. On Apr 23, 2004, at 8:56 AM, Edward Peloke wrote: if you echo out the query..what is the output? -Original Message- From: Brian Dunning [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 11:36 AM To: [EMAIL

Re: [PHP] OK SQL experts...

2004-04-23 Thread Mark
--- Brian Dunning [EMAIL PROTECTED] wrote: Yes, I've checked and rechecked the spelling on everything. I've been testing with a word that I know appears in at least one of the fields. I'm coming in a bit late, but have you tried echoing out the query variable contents and copying and

RE: [PHP] OK SQL experts...

2004-04-23 Thread Daniel Purdy
I STFW and RTFM and I still can't figure out why this returns a 1064 parse error: SELECT * FROM 'my_table' WHERE ('field_1' LIKE '%$keyword%' OR 'field_2' LIKE '%$keyword%' OR 'field_3' LIKE '%$keyword%') AND 'status' = 'active'; Why don't you try rebuilding the query. I mean go into

RE: [PHP] OK SQL experts...

2004-04-23 Thread Jay Blanchard
[snip] SELECT * FROM 'my_table' WHERE ('field_1' LIKE '%$keyword%' OR 'field_2' LIKE '%$keyword%' OR 'field_3' LIKE '%$keyword%') AND 'status' = 'active'; [/snip] *slaps forehead* SELECT * FROM my_table WHERE (field_1 LIKE '% . $keyword . %' OR field_2 LIKE '% . $keyword . %' OR field_3 LIKE

Re: [PHP] OK SQL experts...

2004-04-23 Thread Brian Dunning
I don't have access to the MySQL command line; it's hosted at my ISP. :( On Apr 23, 2004, at 8:54 AM, Mark wrote: --- Brian Dunning [EMAIL PROTECTED] wrote: Yes, I've checked and rechecked the spelling on everything. I've been testing with a word that I know appears in at least one of the

RE: [PHP] OK SQL experts...

2004-04-23 Thread Chris W. Parker
Brian Dunning mailto:[EMAIL PROTECTED] on Friday, April 23, 2004 8:19 AM said: SELECT * FROM 'my_table' WHERE ('field_1' LIKE '%$keyword%' OR 'field_2' LIKE '%$keyword%' OR 'field_3' LIKE '%$keyword%') AND 'status' = 'active'; have you tried simply: SELECT * FROM my_table WHERE status =

RE: [PHP] OK SQL experts...

2004-04-23 Thread Jay Blanchard
[snip] SELECT * FROM my_table WHERE (field_1 LIKE '%$keyword%') AND status = 'active'; if that works continue until you get an error. [/snip] That'll give you an error right there. That old single quoted variable will get you every time. :) WHERE (field_1 LIKE '%$keyword%') WHERE (field_1

Re[2]: [PHP] OK SQL experts...

2004-04-23 Thread Tom Rogers
Hi, Saturday, April 24, 2004, 1:55:36 AM, you wrote: JB [snip] JB SELECT * FROM 'my_table' WHERE ('field_1' LIKE '%$keyword%' OR JB 'field_2' LIKE '%$keyword%' OR 'field_3' LIKE '%$keyword%') AND JB 'status' = 'active'; JB [/snip] JB *slaps forehead* JB SELECT * FROM my_table WHERE (field_1

Re: [PHP] OK SQL experts...

2004-04-23 Thread Brian Dunning
if that works move up into: SELECT * FROM my_table WHERE (field_1 LIKE '%$keyword%') AND status = 'active'; Yes, I actually did exactly that. Everything works until I have more than one statement inside the (x LIKE x OR x LIKE x) parens. That's why I figured there has to be something wrong with

RE: Re[2]: [PHP] OK SQL experts...

2004-04-23 Thread Jay Blanchard
[snip] They do if they are themselves inside double quotes :) echo '$var'; will get parsed ok [/snip] I know, but since I saw no double quotes I had to go for the obvious. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[4]: [PHP] OK SQL experts...

2004-04-23 Thread Tom Rogers
Hi, Saturday, April 24, 2004, 2:03:36 AM, you wrote: JB [snip] JB They do if they are themselves inside double quotes :) JB echo '$var'; will get parsed ok JB [/snip] JB I know, but since I saw no double quotes I had to go for the obvious. :) Yes I would like to see the whole truth as well :)

Re[2]: [PHP] OK SQL experts...

2004-04-23 Thread Richard Davey
Hello Brian, Friday, April 23, 2004, 5:02:00 PM, you wrote: BD Yes, I actually did exactly that. Everything works until I have more BD than one statement inside the (x LIKE x OR x LIKE x) parens. That's why BD I figured there has to be something wrong with my paren structure. When BD I RTFM I

Re: [PHP] OK SQL experts...

2004-04-23 Thread William Lovaton
How are you manipulating the whole SQL string?? $sql = SELECT...; ??? or $sql = 'SELECT...'; ??? In this case you will have to use double quotes because PHP won't parse single quote strings for searching embedded PHP variables. May be this is the problem. -William El vie, 23-04-2004 a

Re: [PHP] Call to external function

2004-04-23 Thread William Lovaton
No... PHP and JavaScript are executing at different time and at different place. Besides, they are executed by different programs. Are you trying to measure execution time of a query?? Look at: http://www.php.net/microtime -William El vie, 23-04-2004 a las 09:09, Jeff McKeon escribió: Is

Re: [PHP] OK SQL experts...

2004-04-23 Thread Curt Zirzow
* Thus wrote Brian Dunning ([EMAIL PROTECTED]): I STFW and RTFM and I still can't figure out why this returns a 1064 parse error: SELECT * FROM 'my_table' WHERE ('field_1' LIKE '%$keyword%' OR 'field_2' LIKE '%$keyword%' OR 'field_3' LIKE '%$keyword%') AND 'status' = 'active'; You might

Re: [PHP] Counting number of characters without spaces between them?

2004-04-23 Thread Chris Shiflett
--- Richard Davey [EMAIL PROTECTED] wrote: I want to be able to check to see if, in a string, the user has entered too many consecutive characters and not enough spaces. For example they might enter a subject like: hello world! how arrre you today?!! Does

Re: [PHP] Call to external function

2004-04-23 Thread Curt Zirzow
* Thus wrote Torsten Roehr ([EMAIL PROTECTED]): I have the script start when the page loads with an onload=function('go') in the body tag. But I need someway to turn it off... A simple: Echo scriptfunction('stop')/script; at the end of the page OnLoad is probably occuring after your

Re[2]: [PHP] Counting number of characters without spaces between them?

2004-04-23 Thread Richard Davey
Hello Chris, Friday, April 23, 2004, 5:41:59 PM, you wrote: CS You can explode on a space and loop through the resulting array, checking CS strlen() as you go. In the end I used a regexp to strip out all non alpha-numeric characters from the string - and then compared the length of this to what

[PHP] Reristration form

2004-04-23 Thread Erik Gjertsen
I shall made a registration schema to user log on. But when I fill in everything I still com up messages that you must go back and try again. Or can someone help me to find a script I can use?? I have set 1 Where I think it is problem. The following code is form action=?php echo

Re: [PHP] Reristration form

2004-04-23 Thread Richard Davey
Hello Erik, Friday, April 23, 2004, 6:00:42 PM, you wrote: EG 1..if ($name $email $username $password) Look carefully at the spelling of $username above and here: EG if (strlen($_POST[usermame]) 0) { EG $usermame = TRUE; EG } else { EG $usermame = FALSE; EG } $username

RE: [PHP] Reristration form

2004-04-23 Thread Edward Peloke
you are looking for $username but your id is $usermame. -Original Message- From: Erik Gjertsen [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 1:01 PM To: [EMAIL PROTECTED] Subject: [PHP] Reristration form I shall made a registration schema to user log on. But when I fill in

Re: [PHP] OK SQL experts...

2004-04-23 Thread John Nichel
Brian Dunning wrote: I STFW and RTFM and I still can't figure out why this returns a 1064 parse error: SELECT * FROM 'my_table' WHERE ('field_1' LIKE '%$keyword%' OR 'field_2' LIKE '%$keyword%' OR 'field_3' LIKE '%$keyword%') AND 'status' = 'active'; Anyone? TIA! - B1ff Lamer What does

Re: [PHP] OK SQL experts...

2004-04-23 Thread Brian Dunning
On Apr 23, 2004, at 10:13 AM, John Nichel wrote: Brian Dunning wrote: I STFW and RTFM and I still can't figure out why this returns a 1064 parse error: SELECT * FROM 'my_table' WHERE ('field_1' LIKE '%$keyword%' OR 'field_2' LIKE '%$keyword%' OR 'field_3' LIKE '%$keyword%') AND 'status' =

RE: [PHP] OK SQL experts...

2004-04-23 Thread Edward Peloke
doesn't look like your $keyword value contains anything. -Original Message- From: Brian Dunning [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 1:19 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] OK SQL experts... On Apr 23, 2004, at 10:13 AM, John Nichel wrote: Brian Dunning

Re: [PHP] OK SQL experts...

2004-04-23 Thread Brian Dunning
On Apr 23, 2004, at 10:27 AM, Edward Peloke wrote: doesn't look like your $keyword value contains anything. My error. Here is the actual return: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''my_table'

Re: [PHP] OK SQL experts...

2004-04-23 Thread Curt Zirzow
* Thus wrote Brian Dunning ([EMAIL PROTECTED]): On Apr 23, 2004, at 10:13 AM, John Nichel wrote: Brian Dunning wrote: I STFW and RTFM and I still can't figure out why this returns a 1064 parse error: SELECT * FROM 'my_table' WHERE ('field_1' LIKE '%$keyword%' OR 'field_2' LIKE

Re[2]: [PHP] OK SQL experts...

2004-04-23 Thread Richard Davey
Hello Brian, Friday, April 23, 2004, 6:18:43 PM, you wrote: BD You have an error in your SQL syntax. Check the manual that corresponds BD to your MySQL server version for the right syntax to use near BD ''my_table' WHERE ('field_1' LIKE '%%' OR 'field2' my_table should NOT be quoted in this

Re: [PHP] OK SQL experts...

2004-04-23 Thread Brian Dunning
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''my_table' WHERE ('field_1' LIKE '%%' OR 'field2' Because you are using a single quotes around your table/field names. Remove them or use ` (back tick). As

RE: [PHP] Call to external function

2004-04-23 Thread Jeff McKeon
No... PHP and JavaScript are executing at different time and at different place. Besides, they are executed by different programs. Are you trying to measure execution time of a query?? Look at: http://www.php.net/microtime No, I'm trying to get a little animation on the left frame to

Re: [PHP] OK SQL experts...

2004-04-23 Thread John W. Holmes
From: Brian Dunning [EMAIL PROTECTED] My error. Here is the actual return: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''my_table' WHERE ('field_1' LIKE '%custom%' OR 'field_ I am searching for the

Re: [PHP] OK SQL experts...

2004-04-23 Thread Brian Dunning
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''my_table' WHERE ('field_1' LIKE '%%' OR 'field2' Because you are using a single quotes around your table/field names. Remove them or use ` (back tick). As

Re: [PHP] OK SQL experts...

2004-04-23 Thread John Nichel
Brian Dunning wrote: On Apr 23, 2004, at 10:13 AM, John Nichel wrote: Brian Dunning wrote: I STFW and RTFM and I still can't figure out why this returns a 1064 parse error: SELECT * FROM 'my_table' WHERE ('field_1' LIKE '%$keyword%' OR 'field_2' LIKE '%$keyword%' OR 'field_3' LIKE

RE: [PHP] Call to external function

2004-04-23 Thread Mark
--- Jeff McKeon [EMAIL PROTECTED] wrote: No... PHP and JavaScript are executing at different time and at different place. Besides, they are executed by different programs. Are you trying to measure execution time of a query?? Look at: http://www.php.net/microtime No, I'm

RE: [PHP] Call to external function

2004-04-23 Thread Jeff McKeon
OnLoad is probably occuring after your you're 'stop' call. Onload generally will be called when the document gets fully loaded. Instead put the 'go' call in the head of your document. head script ... function('go'); /script ... script ... function('stop') /script /body /html

[PHP] PHP modifying data from DB?

2004-04-23 Thread Gabe
I have a field in a DB that contains a date. The format of the date is: 04/08/2004 However, when I retrieve the date from DB using PHP, it displays the following: 2004-04-08 00:00:00 Is PHP tacking on the zero's? I've tried using the date() function to reformat it back to how I want it,

[PHP] Re: PHP modifying data from DB?

2004-04-23 Thread Gabe
I should also probably mention that I'm using ADOdb as well. Gabe wrote: I have a field in a DB that contains a date. The format of the date is: 04/08/2004 However, when I retrieve the date from DB using PHP, it displays the following: 2004-04-08 00:00:00 Is PHP tacking on the zero's?

Re: [PHP] PHP modifying data from DB?

2004-04-23 Thread Richard Davey
Hello Gabe, Friday, April 23, 2004, 7:20:14 PM, you wrote: G However, when I retrieve the date from DB using PHP, it displays the G following: G 2004-04-08 00:00:00 G Is PHP tacking on the zero's? I've tried using the date() function to G reformat it back to how I want it, but haven't gotten

Re: [PHP] PHP modifying data from DB?

2004-04-23 Thread Gabe
Hi Richard, I checked the field type in access and it is a date/time field (it's the only option). However, in access I told it to do a short date format mm/dd/. Unfortunately it still gives me those extra zero's. Let's say that getting those zero's is ok. Is this the code that I

  1   2   >