Posted by Norman Peelman on 01/20/07 11:23
vinci wrote:
> hi to all,
> i have one doubt. my mysql table name student..
> Fields name: StudName:nvarchar(20); Password: nvarchar(20);
> $sname=$_Post['StudName'];
> $pwd=$_Post['Password'];
> i try to this query.
>
> mysql query
>
> $result=mysql_query("select * from users where StudName=".$sname. "and
> password=".$pwd) or die(mysql_error());
>
>
> but this line not disply correct answer anybody pls help this.
>
>
> Regards,
> Vincent
>
$result=mysql_query("select * from users where StudName='$sname' and
password='$pwd'") or die(mysql_error());
Norm
Navigation:
[Reply to this message]
|