note_addAdd Question
mode_editWrite Article
notificationsNotifications
0
Mainak gnpds profile

Mainak gnpds Member Profile

Total Posted Questions: 3

Total Posted Answers: 2

Total Posted Articles: 0

Profession: SHUTTLE FIXER

Skills: Financial Management, Counsel, Training

City: Portsmouth

State:

Country: South East, England

Facebook: -

Youtube: -

Linkedin: -

Website: -



Questions

Following are the list of questions contributed by this member.

Answers

Following are the list of answers contributed by this member.

How to php hash password (PHP Scripting Language)

1
/* Include the database connection script. */
2
include 'pdo.php';
3
/* Login status: false = not authenticated, true = authenticated. */
4
$login = FALSE;
5
/* Username from the login form. */
6
$username = $_POST['username'];
7
/* Password from the login form. */
8
$password = $_POST['password'];
9
/* Remember to validate $username and $password. */
10
/* Look for the username in the database. */
11
$query = 'SELECT * FROM accounts WHERE (account_name = :name)';
12
/* Values array for PDO. */
13
$values = [':name' => $username];
14
/* Execute the query */
15
try
16
{
17
  $res = $pdo->prepare($query);
18
  $res->execute($values);
19
}
20
catch (PDOException $e)
21
{
22
  /* Query error. */
23
  echo 'Query error.';
24
  die();
25
}
26
$row = $res->fetch(PDO::FETCH_ASSOC);
27
/* If there is a result, check if the password matches using password_verify(). */
28
if (is_array($row))
29
{
30
  if (password_verify($password, $row['account_passwd']))
31
  {
32
    /* The password is correct. */
33
    $login = TRUE;
34
  }
35
}

How to iterate through an array python (Python Programing Language)

1
colors = [red, green, blue, purple]
2
i = 0
3
while i < len(colors):
4
    print(colors[i])
5
    i += 1

Would you like to join Ask Sawal!

Why?

  1. Ask Sawal is a fast growing question and answer discussion forum.

  2. 15 lakh+ questions were answered by our Ask Sawal Members.

  3. Each day 1000s of questions asked & 1000s of questions answered.

  4. Ask any question and get answer from 2.5 Lakh+ Ask Sawal Members.

  5. Constant moderation and reporting option makes questions and answers spam free.

  6. And also, we have free blogging platform. Write an article on any topic.

  7. We have 10000+ visitors each day. So a beneficial platform for link building.

  8. We are allowing link sharing. Create backlinks to your blog site or any site.

  9. Gain extra passive income by sharing your affiliate links in articles and answers.