How do I request data from ASP.NET?

Get help using Construct 2

Post » Mon Jan 26, 2015 3:15 am

Hi, I want to do login. On the main page there is only a PHP login tutorial but I don't know PHP and can only use ASP.NET. Can someone help me with a sample script to get login data from a aspx page? Or just convert the tutorial php code into aspx code? Thank you very much.

<?php
02 $username = $_GET['fname'];
03 $password = $_GET['fpass'];
04 $con=mysqli_connect("mysql","database_user","database_password","mydatabase");
05 // Check connection
06 if (mysqli_connect_errno())
07 {
08 echo "Failed to connect to MySQL: " . mysqli_connect_error();
09 }
10 $qz = "SELECT id FROM members where username='".$username."' and password='".$password."'" ;
11 $qz = str_replace("\'","",$qz);
12 $result = mysqli_query($con,$qz);
13 while($row = mysqli_fetch_array($result))
14 {
15 echo $row['id'];
16 }
17 mysqli_close($con);
18 ?>
B
7
Posts: 20
Reputation: 293

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 26 guests