[PHP-DB] Turning off Save Password

2004-07-01 Thread Gary Every
I'm trying to turn off the save password function so that I can do an
auth page that refuses to save passwords on the client side. I've tried
some JS but it works only in IE, not Netscape.
So, I'm looking for a server-side solution to this.

Any ideas?



Gary Every
Sr. UNIX Administrator
Ingram Entertainment Inc.
2 Ingram Blvd, La Vergne, TN 37089
Pay It Forward!

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Turning off Save Password

2004-07-01 Thread Gary Every
Fixed my own problem.

Within the tag, you can use autocomplete=off
To turn off the prompting or the autocompletion of any field. Apologize
for this off-topic post, but I was searching for a non-javascript
server-side solution


Gary Every
Sr. UNIX Administrator
Ingram Entertainment Inc.
2 Ingram Blvd, La Vergne, TN 37089
Pay It Forward!


-Original Message-
From: Gary Every 
Sent: Thursday, July 01, 2004 8:46 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Turning off Save Password


I'm trying to turn off the save password function so that I can do an
auth page that refuses to save passwords on the client side. I've tried
some JS but it works only in IE, not Netscape. So, I'm looking for a
server-side solution to this.

Any ideas?



Gary Every
Sr. UNIX Administrator
Ingram Entertainment Inc.
2 Ingram Blvd, La Vergne, TN 37089
Pay It Forward!

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Turning off Save Password

2004-07-01 Thread dpgirago
I'd bet I'm in the minority here, but I don't mind at all the occasional, 
OT post. Hell, most of life seems OT, doesn't it?
BTW, your solution provides me with very helpful information. Thanks much.

dave 


 Fixed my own problem.

 Within the tag, you can use autocomplete=off
 To turn off the prompting or the autocompletion of any field. Apologize
 for this off-topic post, but I was searching for a non-javascript
 server-side solution

 I'm trying to turn off the save password function so that I can do an
 auth page that refuses to save passwords on the client side. I've tried
 some JS but it works only in IE, not Netscape. So, I'm looking for a
 server-side solution to this.

 Any ideas?

 Gary Every
 Sr. UNIX Administrator
 Ingram Entertainment Inc.
 2 Ingram Blvd, La Vergne, TN 37089
 Pay It Forward!

[PHP-DB] More problems with searching

2004-07-01 Thread Shiloh Madsen
After the very kind help i was given last night I have the query being built
right, however the query does not work. Just to refresh, the gentlemen who
had helped me suggested creation of a query that looks like:

SELECT * FROM table1 where 1 or cat or dog...and so forth. Now, this query
is building fine, but the where 1 is causing it to return rows even if it
has none of the search terms. When i run it in sql without the where 1 it
works as it should, but with that, i get all rows returned. Is there a way i
can reword this query or am I doing something wrong?

this was Mr Holmes's solution (in part):
$query = SELECT * FROM keyword WHERE 1 
$words = explode(' ',$_GET['search_text']);
foreach($words as $word)
{ $query .=  AND keyword = '$word' ; }

Ideas?

Shiloh

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] More problems with searching

2004-07-01 Thread Justin Patrin
On Thu, 1 Jul 2004 12:28:46 -0500, Shiloh Madsen
[EMAIL PROTECTED] wrote:
 
 After the very kind help i was given last night I have the query being built
 right, however the query does not work. Just to refresh, the gentlemen who
 had helped me suggested creation of a query that looks like:
 
 SELECT * FROM table1 where 1 or cat or dog...and so forth. Now, this query
 is building fine, but the where 1 is causing it to return rows even if it
 has none of the search terms. When i run it in sql without the where 1 it
 works as it should, but with that, i get all rows returned. Is there a way i
 can reword this query or am I doing something wrong?
 
 this was Mr Holmes's solution (in part):
 $query = SELECT * FROM keyword WHERE 1 
 $words = explode(' ',$_GET['search_text']);
 foreach($words as $word)
 { $query .=  AND keyword = '$word' ; }

Shouldn't that be OR?

 
 Ideas?
 
 Shiloh
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 !DSPAM:40e4480b265025655517531!
 
 


-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] More problems with searching

2004-07-01 Thread Pablo M. Rivas
Hello Shiloh,

Ideas?... forget the  1 

$query = Select * from keyword where ;
$words = explode(' ',$_GET['search_text']);
foreach($words as $word)
  { $query .=  keyword = '$word' and ; }
$query=substr($query,-4);

or...

$query = Select * from keyword where ;
$words = explode(' ',$_GET['search_text']);
$andconde=0;
foreach($words as $word)
  { $query .= ($andcode++) ?  and keyword = '$word' :  keyword = '$word'; }

or...

$words = explode(' ',$_GET['search_text']);
$query = Select * from keyword where keyword = ' . array_shift($words) . ';
foreach($words as $word)
  { $query .=  and keyword = '$word'; }


SM After the very kind help i was given last night I have the query being built
SM right, however the query does not work. Just to refresh, the gentlemen who
SM had helped me suggested creation of a query that looks like:

SM SELECT * FROM table1 where 1 or cat or dog...and so forth. Now, this query
SM is building fine, but the where 1 is causing it to return rows even if it
SM has none of the search terms. When i run it in sql without the where 1 it
SM works as it should, but with that, i get all rows returned. Is there a way i
SM can reword this query or am I doing something wrong?

SM this was Mr Holmes's solution (in part):
SM $query = SELECT * FROM keyword WHERE 1 
SM $words = explode(' ',$_GET['search_text']);
SM foreach($words as $word)
SM { $query .=  AND keyword = '$word' ; }

SM Ideas?

SM Shiloh




-- 
Best regards,
 Pablo

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] More problems with searching

2004-07-01 Thread Ford, Mike [LSS]
On 01 July 2004 18:36, Justin Patrin wrote:

 On Thu, 1 Jul 2004 12:28:46 -0500, Shiloh Madsen
 [EMAIL PROTECTED] wrote:
  
  After the very kind help i was given last night I have the query
  being built right, however the query does not work. Just to
  refresh, the gentlemen who had helped me suggested creation of a
  query that looks like: 
  
  SELECT * FROM table1 where 1 or cat or dog...and so forth. Now,
  this query is building fine, but the where 1 is causing it to
  return rows even if it has none of the search terms. When i run it
  in sql without the where 1 it works as it should, but with that, i
  get all rows returned. Is there a way i can reword this query or am
  I doing something wrong? 
  
  this was Mr Holmes's solution (in part):
  $query = SELECT * FROM keyword WHERE 1 
  $words = explode(' ',$_GET['search_text']);
  foreach($words as $word)
  { $query .=  AND keyword = '$word' ; }
 
 Shouldn't that be OR?

... and, if it should, that should be a 0 instead of a 1 (although I'm not a huge fan 
of this technique!).

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Conditional explode?

2004-07-01 Thread Shiloh Madsen
Can I use explode in a conditional manner? I.E., can i have it explode on a space, but 
only if the space is not encased in double quotes?

Re: [PHP-DB] Conditional explode?

2004-07-01 Thread Matt M.
On Thu, 1 Jul 2004 14:05:49 -0500, Shiloh Madsen
[EMAIL PROTECTED] wrote:
 
 Can I use explode in a conditional manner? I.E., can i have it explode on a space, 
 but only if the space is not encased in double quotes?

I would use http://www.php.net/preg_split

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Conditional explode?

2004-07-01 Thread Justin Patrin
On Thu, 1 Jul 2004 15:09:38 -0500, Matt M. [EMAIL PROTECTED] wrote:
 
 On Thu, 1 Jul 2004 14:05:49 -0500, Shiloh Madsen
 [EMAIL PROTECTED] wrote:
 
  Can I use explode in a conditional manner? I.E., can i have it explode on a space, 
  but only if the space is not encased in double quotes?
 
 I would use http://www.php.net/preg_split
 

I'm not sure how you could do that as there could be multiple sets of
quotes. If you have:

1 2 3 4 5 6 7 8 9

How would you write a preg to split only on those *not* encased in quotes?

Here was my solution (posted before for another question):

/**
 * does a regular explode, but also accounts for the deliminator to be
within quoted fields
 *  for example, if called as such:
 *   splitQuoteFriendly(',', '0,1,2,3,I am still 3,4');
 *  it will return:
 *   array(0 = '0',
 * 1 = '1',
 * 2 = '2',
 * 3 = '3,I am still 3',
 * 4 = '4');
 * @param string deliminator to explode by
 * @param string text to explode
 * @param string text which surrounds quoted fields (defaults to )
 * @return array array of fields after explode
 */
function explodeQuoteFriendly($delim, $text, $quote = '') {
  $strictFields = explode($delim, $text);
  for($sl = 0, $l = 0; $sl  sizeof($strictFields); ++$sl) {
$fields[$l] = $strictFields[$sl];
$numQuotes = 0;
while(fmod($numQuotes += substr_count($strictFields[$sl], $quote),
2) == 1) {
  ++$sl;
  $fields[$l] .= $delim.$strictFields[$sl];
}
++$l;
  }

  return $fields;
}

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] SELECT problem between MySQL 3.23 and MySQL 4

2004-07-01 Thread Chris Payne
Hi there everyone,

 

I'm using Booleans in my searches (New to it) but it works perfectly on my
local 3.23 version of MySQL, but on the main server which uses version 4 of
MySQL I get an error so there's an error in my Syntax.  Here's what I
currently use:

 

SELECT id, def, word, 
0.2*( 
LENGTH(word) - 
LENGTH(REPLACE(LOWER(word),LOWER('as'),''))) 
/LENGTH('as') + 0.2*( 
LENGTH(def) - 
LENGTH(REPLACE(LOWER(def),LOWER('as'),''))) 
/LENGTH('as') as relevance 
FROM joyzine.dictionary 
WHERE 
( word LIKE '%as%' OR def LIKE '%as%' ) 
HAVING relevance0 
ORDER BY relevance DESC

 

And here's the error I receive on the remote MySQL 4 server:

 

Warning: Bad arguments to implode() in
/var/www/html/www.planetoxygene.com/htdocs/funcs_mysql_boolean.php on line
45
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 ') -
LENGTH(REPLACE(LOWER(),LOWER('as'),''))) /LENGTH('as'

 

Can anyone see what is wrong which is stopping it being compatible with
MySQL 4?

 

Any help would really be appreciated, as this system is very important.

 

Best Wishes

 

Chris

 



[PHP-DB] cookie issue

2004-07-01 Thread Sukanto Kho
Hi All, 

Do cookie variable has cookie_id and how to call it?

Is Cookie_id same for 1 PC ?? or just in 1 browser??

How to avoid cookie not passed if using redirecting header(location:)...sorry if I 
ask this before...but still havent get any suggestion.

Thanx 
Flame


Re: [PHP-DB] cookie issue

2004-07-01 Thread zareef ahmed
--- Sukanto Kho [EMAIL PROTECTED] wrote:
 Hi All, 
 
 Do cookie variable has cookie_id and how to call it?

How you set the cookie?
It will be available as $_COOKIE['COOKIE_NAME'];

 
 Is Cookie_id same for 1 PC ?? or just in 1 browser??

It is vaid for the pc but expire time applicable.

 
 How to avoid cookie not passed if using redirecting
 header(location:)...sorry if I ask this

Cookies stored on the client machine. If you do not
want to use them simply set them with no value.
See manual of setcookie() for more details.

 before...but still havent get any suggestion.

No Problem. You are welcome.


Zareef Ahmed
 
 Thanx 
 Flame
 


=
Zareef Ahmed :: A PHP Developer in Delhi(India).
Homepage :: http://www.zasaifi.com




__
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] How to take Backup ?

2004-07-01 Thread Rinku
I want to take backup for Mysql database.
 
Can any of you tell me how to take Backup and how to Restore it ?
 
Rinku

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: [PHP-DB] How to take Backup ?

2004-07-01 Thread zareef ahmed
Hi,
  If you have phpmyadmin on your system you can export
all your data in sql format which can be restore again
by running that sql script. make sure to check
complete insert checkbox at time of export operations.

Revert Back with any comment or problem.
Zareef Ahmed

--- Rinku [EMAIL PROTECTED] wrote:
 I want to take backup for Mysql database.
  
 Can any of you tell me how to take Backup and how to
 Restore it ?
  
 Rinku
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam
 protection around 
 http://mail.yahoo.com 


=
Zareef Ahmed :: A PHP Developer in Delhi(India).
Homepage :: http://www.zasaifi.com



__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] How to take Backup ?

2004-07-01 Thread Cole S. Ashcraft
Try the mysqldump command
zareef ahmed wrote:
Hi,
 If you have phpmyadmin on your system you can export
all your data in sql format which can be restore again
by running that sql script. make sure to check
complete insert checkbox at time of export operations.
Revert Back with any comment or problem.
Zareef Ahmed
--- Rinku [EMAIL PROTECTED] wrote:
 

I want to take backup for Mysql database.
Can any of you tell me how to take Backup and how to
Restore it ?
Rinku
__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam
protection around 
http://mail.yahoo.com 
   


=
Zareef Ahmed :: A PHP Developer in Delhi(India).
Homepage :: http://www.zasaifi.com
		
__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

 


--
This message has been scanned for viruses and
dangerous content by MailScanner on mail.ashcraftfamily.net, and is believed
to be clean.
Please report any deviance from this condition immediately to the AFN
Administrator at [EMAIL PROTECTED]
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] cookie issue

2004-07-01 Thread Sukanto Kho
Hi Mr. Zareef,

I got issue from others that :
With some browsers, setting a cookie and then redirecting with header()
will not make the cookies available on the next page
I want to know how to solve that issue..

I set cookie like this : setcookie (name,$user_name, $time+3600);
but all I want is cookie_id (just like session variable has session_id)...

Thanx
Flame

- Original Message -
From: zareef ahmed [EMAIL PROTECTED]
To: Sukanto Kho [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, July 02, 2004 10:58 AM
Subject: Re: [PHP-DB] cookie issue


 --- Sukanto Kho [EMAIL PROTECTED] wrote:
  Hi All,
 
  Do cookie variable has cookie_id and how to call it?

 How you set the cookie?
 It will be available as $_COOKIE['COOKIE_NAME'];

 
  Is Cookie_id same for 1 PC ?? or just in 1 browser??

 It is vaid for the pc but expire time applicable.

 
  How to avoid cookie not passed if using redirecting
  header(location:)...sorry if I ask this

 Cookies stored on the client machine. If you do not
 want to use them simply set them with no value.
 See manual of setcookie() for more details.

  before...but still havent get any suggestion.

 No Problem. You are welcome.


 Zareef Ahmed
 
  Thanx
  Flame
 


 =
 Zareef Ahmed :: A PHP Developer in Delhi(India).
 Homepage :: http://www.zasaifi.com




 __
 Do you Yahoo!?
 New and Improved Yahoo! Mail - 100MB free storage!
 http://promotions.yahoo.com/new_mail


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] How to take Backup ?

2004-07-01 Thread David Orlovich
Hi Rinku
To dump (backup), I do the following:
/usr/local/mysql/bin/mysqldump -uroot -pyourpassword --opt 
--all-databases  ~/backup.sql

To restore, I do this:
cat ~/backup.sql | /usr/local/mysql/bin/mysql -uroot -pyourpassword
If you've dumped your databases in order to install a new version of 
MySQL, then your restore command won't need to include the -p flag, as 
the root password won't be set.  Once you've restored the backup, go 
into MySQL and enter:
flush privileges;
at the prompt to reinstall your root password etc.

Hope that helps.
Cheers, DavidO.
On 2/07/2004, at 4:26 PM, Rinku wrote:
I want to take backup for Mysql database.
Can any of you tell me how to take Backup and how to Restore it ?
Rinku
__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Dr David Orlovich,
Senior Lecturer in Botany.
Department of Botany,
University of Otago,
P.O. Box 56,
(Courier: 464 Great King Street)
Dunedin,
New Zealand.
Phone: (03) 479 9060
Fax: (03) 479 7583
Web: http://www.botany.otago.ac.nz/
Ecology, Conservation and Biodiversity Research Group: 
http://www.otago.ac.nz/erg/

Botanical Society of Otago: http://www.botany.otago.ac.nz/bso/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] How to take Backup ?

2004-07-01 Thread Michael Gale
Hello,

Have a look at mysqldump .. it is used for backing up tables and
database.

Example
mysqldump --add-drop-table -c testdatabase -h 127.0.0.1 -u mysqlbk
--password=mysqlbk  testdatabase.bk


Michael


On Thu, 1 Jul 2004 21:26:27 -0700 (PDT)
Rinku [EMAIL PROTECTED] wrote:

 I want to take backup for Mysql database.
  
 Can any of you tell me how to take Backup and how to Restore it ?
  
 Rinku
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around 
 http://mail.yahoo.com 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] cookie issue

2004-07-01 Thread zareef ahmed

Hi Sukanto,

 Cookies do not have any id like sessions.

Headers in php sent in reverse order to browser,
means the last one will send first, cookies also
set/sent by headers, so This statement can be true.

So, try setcookie function after you write redirection
line like ::

header(location :somewhere);
setcookie(name,$user_name, $time+3600);

I hope this should work.

Please let me know the status as I am also getting
interest in it.

BTW I prefer session to cookies...

Zareef Ahmed


--- Sukanto Kho [EMAIL PROTECTED] wrote:
 Hi Mr. Zareef,
 
 I got issue from others that :
 With some browsers, setting a cookie and then
 redirecting with header()
 will not make the cookies available on the next
 page
 I want to know how to solve that issue..
 
 I set cookie like this : setcookie
 (name,$user_name, $time+3600);
 but all I want is cookie_id (just like session
 variable has session_id)...
 
 Thanx
 Flame
 
 - Original Message -
 From: zareef ahmed [EMAIL PROTECTED]
 To: Sukanto Kho [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Friday, July 02, 2004 10:58 AM
 Subject: Re: [PHP-DB] cookie issue
 
 
  --- Sukanto Kho [EMAIL PROTECTED] wrote:
   Hi All,
  
   Do cookie variable has cookie_id and how to call
 it?
 
  How you set the cookie?
  It will be available as $_COOKIE['COOKIE_NAME'];
 
  
   Is Cookie_id same for 1 PC ?? or just in 1
 browser??
 
  It is vaid for the pc but expire time applicable.
 
  
   How to avoid cookie not passed if using
 redirecting
   header(location:)...sorry if I ask this
 
  Cookies stored on the client machine. If you do
 not
  want to use them simply set them with no value.
  See manual of setcookie() for more details.
 
   before...but still havent get any suggestion.
 
  No Problem. You are welcome.
 
 
  Zareef Ahmed
  
   Thanx
   Flame
  
 
 
  =
  Zareef Ahmed :: A PHP Developer in Delhi(India).
  Homepage :: http://www.zasaifi.com
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


=
Zareef Ahmed :: A PHP Developer in Delhi(India).
Homepage :: http://www.zasaifi.com




__
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php