Re: 2 requests: validate 2 password fields as equal and rewrite data

From: Date: Mon, 28 Jun 2004 11:19:10 +0000
Subject: Re: 2 requests: validate 2 password fields as equal and rewrite data
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-35015@lists.php.net to get a copy of this message
>"Vincent Jordan" <vjordan@extendedpop.com> wrote in message news:002c01c45ca9$cffcdbe0$fe00000a@extendeddwc7l0... >Could someone instruct me or point me in the right direction. I would like to have a <input type=password name=password> ><input type=password name=password2> when submit it will check to se if password and password2 are = ( i do not want >password2 to end up in POST on submit.) > >also i am trying to rewrite data from a tinyint. the tinyint will return 1 or 0, I have tried but can not seem to get it >right. pretty much if it returns 1 i want display active where if 0 display not active. I have tried the following: > >$act = mysql_query("select isactive from acl where isactive '1'") I think you missed the = on the above line. This should be the correct syntax: $act = mysql_query("select isactive from acl where isactive = 1"); >if ($act) >{ >while ($isact = mysql_fetch_array($act)) >{ >echo "Active"; >} >} >else >{ >echo "Not Active"; >} > >i have also tried: > >if $row[isactive] = '1' The above should be: if ($row['isactive'] == 1) >{ >echo "active"; >} >else >{ >echo "Not Active"; >} > >im suue i have screwed up the syntax somewhere. I have looked on google and picked thru several scripts i have found >online but have been unsuccessful. aly help appriciated. > >Vinny

« previous php.db (#35015) next »