Friday, November 7, 2008

What is the purpose of the following files having extensions: frm, myd, and myi

What is the purpose of the following files having extensions: frm, myd, and myi? What these files contain? In MySQL, the default table type is MyISAM.Each MyISAM table is stored on disk in three files. The files have names that begin with the table name and have an extension to indicate the file type.The '.frm' file stores the table definition.The data file has a '.MYD' (MYData) extension.The index file has a '.MYI' (MYIndex) extension,

What is the difference between the functions unlink and unset?

What is the difference between the functions unlink and unset?
unlink() is a function for file system handling. It will simply delete the file in context.unset() is a function for variable management. It will make a variable undefined.

How can we register the variables into a session?

How can we register the variables into a session?

session_register($session_var);$_SESSION['var'] = 'value';

How can we submit form without a submit button?

How can we submit form without a submit button?
We can use a simple JavaScript code linked to an event trigger of any form field. In the JavaScript code, we can call the document.form.submit() function to submit the form.

What’s the output of the ucwords function in this example?

What’s the output of the ucwords function in this example?
$formatted = ucwords("CENTER IS COLLECTION OF INTERVIEW QUESTIONS");print $formatted;
What will be printed is CENTER IS COLLECTION OF INTERVIEW QUESTIONS.ucwords() makes every first letter of every word capital, but it does not lower-case anything else. To avoid this, and get a properly formatted string, it’s worth using strtolower() first.

What’s the difference between htmlentities() and htmlspecialchars()?

What’s the difference between htmlentities() and htmlspecialchars()?
htmlspecialchars only takes care of <, >, single quote ‘, double quote " and ampersand. htmlentities translates all occurrences of character sequences that have different meaning in HTML.

How can we destroy the session, how can we unset the variable of a session?

How can we destroy the session, how can we unset the variable of a session?
session_unregister() - Unregister a global variable from the current sessionsession_unset() - Free all session variables

security header validate

  HTTP Security Headers Check Tool - Security Headers Response (serpworx.com)