<p>Untitled Document <!--
.style1 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
}
.style3 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; }
.style2 {font-size: 12px}
.style4 {font-family: Verdana, Arial, Helvetica, sans-serif}
-->
<script type="text/javascript"></script>
</p>
<p class="style1"><strong>MCR3 - How to create a method receiving parameter<span class="style2"><span class="style4"><strong> </strong></span></span><br /></strong><br /><strong>Application Name:</strong> parameter_login<br /><strong>Description:</strong>Control Application effecting login in the system with validation method receiving parameter and return values<br /><strong><span class="style1"><span class="style2"><span class="style4"><span class="style2"><strong>Fields that will be shown in the control</strong></span></span></span></span>:</strong><br />login, password<br /><span class="style1"><span class="style2"><span class="style4"><span class="style2"><strong>Table width:</strong> 0<br /></span><span class="style7"><strong>Table width unit: </strong>Automatic</span><span class="style2"><br /><strong>Header -&gt; Application Title:</strong></span></span></span></span> Method receiving parameter and returning value Name of the method used: userValidate</p>
<table style="height: 234px;" border="1" cellspacing="0" width="458" bordercolor="#666666">
<tbody>
<tr>
<td class="style1" width="188"><strong>New Method:</strong></td>
<td class="style1" width="434">userValidate</td>
</tr>
<tr>
<td class="style1">
<p><strong>Code:</strong></p>
</td>
<td class="style1"><em>sc_lookup(ds,"Select login, password from seg_users where login='$log'");<br />if(empty({ds}))<br />{<br />return 'Inexistent User!';<br />}<br />else<br />{<br />if({ds[0][1]}!=$sen){<br />return 'Invalid Password!';<br />}<br />}<br />return 'ok';</em></td>
</tr>
</tbody>
</table>
<p class="style3">&nbsp;</p>
<p class="style3">&nbsp;</p>