Question

php

QUESTION 4 We have an associative array storing passwords of each user write PHP code to check if the password from user by P

QUESTION 5 When defining an identifier in PHP you remember that? Identifier are case sensitive. So Sresult is different from

0 0
Add a comment Improve this question Transcribed image text
Answer #1

4.

$userId = $_POST["userId"];

$pswd = $_POST["password"];

if ($password[$userId] ==  $pswd) {
    echo "Password is same";
} else {

echo "Passwords are not same";

}

5. c) both a and b

Explanation:

Identifiers can be of any length and can consist of letters, numbers, and underscores. Identifiers cannot begin with a digit. In PHP, identifiers are case sensitive.

Add a comment
Know the answer?
Add Answer to:
php QUESTION 4 We have an associative array storing passwords of each user write PHP code...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT