Re: Stuck with form validation

2009-10-14 Thread Martin Evans
>> my $sth = $dbh->prepare($sql); >> $sth->execute($name,$pass); >> my $rowref; >> my $column; >> my $val; >> while ($rowref = $sth->fetchrow_hashref()) { >>#not sure if you will have multiple records so you may need to >> exit &g

Re: Stuck with form validation

2009-10-14 Thread David Silva
ltiple records so you may need to > exit >#the loop after %record is filled the first time >while (($column, $val) = each %$rowref) { > $record{$column} = $val; >} > } > If ($record{'pass'} eq $pass) { > #redirect to other page

RE: Stuck with form validation

2009-10-14 Thread Matthew Ramadanovic
($record{'pass'} eq $pass) { #redirect to other page } else { #stay on logon } -M -Original Message- From: David Silva [mailto:david...@gmail.com] Sent: Wednesday, October 14, 2009 6:30 AM To: dbi-users@perl.org Subject: Stuck with form validation Hi everyone,

Re: Stuck with form validation

2009-10-14 Thread Martin Evans
David Silva wrote: > Hi everyone, > > I have a form with username and password, and when the user enter the right > user and pass he/she go to other page. (that is my thought) > > What i did? > > my $dbcon= DBI->connect("dbi:mysql:dbname=dbcontactos","root",""); > my $sql = $dbcon->prepa

Stuck with form validation

2009-10-14 Thread David Silva
Hi everyone, I have a form with username and password, and when the user enter the right user and pass he/she go to other page. (that is my thought) What i did? my $dbcon= DBI->connect("dbi:mysql:dbname=dbcontactos","root",""); my $sql = $dbcon->prepare("select name,pass from Utilizador