|
51.) How to get the value of current session id?
session_id() function returns the session id for the current session. 52.) what is sql injection ? SQL injection is a malicious code injection technique.It exploiting SQL vulnerabilities in Web applications |
53.) What are the differences between mysql_fetch_array(), mysql_fetch_object(), mysql_fetch_row()?
Here are three basic types of runtime errors in PHP:
Read/Write. Creates a new file. Returns FALSE and an error if file already exists
- Mysql_fetch_array Fetch a result row as an associative array, a numeric array, or both.
- mysql_fetch_object ( resource result ) Returns an object with properties that correspond to the fetched row and moves the internal data pointer ahead. Returns an object with properties that correspond to the fetched row, or FALSE if there are no more rows
- mysql_fetch_row() fetches one row of data from the result associated with the specified result identifier. The row is returned as an array. Each result column is stored in an array offset, starting at offset 0.
Here are three basic types of runtime errors in PHP:
- 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 you can change this default behavior.
- 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 behavior is to display them to the user when they take place.
Read/Write. Creates a new file. Returns FALSE and an error if file already exists