| 0 comments ]

20. How can we encrypt and decrypt a data present in a mysql table using mysql?
Ans:-
AES_ENCRYPT() and AES_DECRYPT() ---to encrypt string

21. How can we encrypt the username and password using PHP?
Ans:-
You can encrypt a password with the following
Mysql>SET PASSWORD=PASSWORD("Password");

26. What are the different types of errors in PHP?
Ans:-
Notices: These are trivial, non-critical errors that PHP encounters while executing a script - for example, accessing a variable that has not yet been defined. By default, such errors are not displayed to the user at all - although, as you will see, you can change this default behaviour.

Warnings: These are more serious errors - for example, attempting to include() a file which does not exist. By default, these errors are displayed to the user, but they do not result in script termination.

Fatal errors: These are critical errors - for example, instantiating an object of a non-existent class, or calling a non-existent function. These errors cause the immediate termination of the script, and PHP's default behaviour is to display them to the user when they take place.
27. What is the functionality of the function strstr and stristr?
Ans:-
string strstr ( string str1, string str2) this function search the string str1 for the first occurrence of the string str2 and returns the part of the string str1 from the first occurrence of the string str2. This function is case-sensitive and for case-insensitive search use stristr() function.

28. What are the differences between PHP 3 and PHP 4 and PHP 5?
Ans:-
for this ans goto http://php.net and check the version changes

29. How can we convert asp pages to PHP pages?
Ans:-
You can download asp2php front end application from the site http://asp2php.naken.cc.

30. What is meant by urlencode and urldecode?
Ans:-
string urlencode(str)
where str contains a string like this "hello world" and the return value will be URL encoded and can be use to append with URLs, normaly used to appned data for GET like someurl.com?var=hello%world
string urldocode(str)
this will simple decode the GET variable’s value
Like it echo (urldecode($_GET_VARS[var])) will output "Hello world"

34. What is the difference between the functions unlink and unset?
Ans:-
unlink is a function for file system handling. It will simply delete the file in context
unset will set UNSET the variable. e.g

35. How can we register the variables into a session?
Ans:-
Yes we can
session_register($ur_session_var);

0 comments

Post a Comment

Please put your comments here. your questions, your suggestions, also what went wrong with me.