You are here: Re: Passwording a PHP page « All PHP « IT news, forums, messages
Re: Passwording a PHP page

Posted by cover on 07/10/07 13:48

On Tue, 10 Jul 2007 07:34:35 +0200, "J.O. Aho" <user@example.net>
wrote:

>Yes, in the case you want that the user will be using both a login name and
>password, if you only want a password, you have to see that the password is
>unique, otherwise the users can be mixed up (while using login+pass the
>likelihood is a lot less that you have two persons with the same login and
>password, of course you should see to have only one user for each
>username/login you use).

Would something like this work where there might be two tables, one
with the data you're trying to update and the second only holding the
user name and password where conditions had to be met at update.

mysql_query("UPDATE actions_tbl SET date='$ud_date',
targmonth='$ud_targmonth', targyear='$ud_targyear',
assignedto='$ud_assignedto', datecomp='$ud_datecomp',
status='$ud_status', referenceno='$ud_referenceno'
WHERE id='$ud_id' AND WHERE password_tbl
updater_column='$updater' AND password_column='$password'") or
die("Update Error: ".mysql_error());

echo "Record Updated";
mysql_close();

The tricky part appears to be in adding AND WHERE so when 'id'
conditions have been met in the actions_tbl, updater and password
conditions must also be met in password_tbl - I dunno - still have a
syntax issue associated w/ the AND WHERE portion. ;-)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация