What is LAMP?

LAMP means combination of Linux, Apache, MySQL and PHP.

How get the value of current session id?

Session_id() returns the session id for the current session.

How register the variables into a session?

session_register ($session_var) function.

What are the different tables present in mysql?

Total 5 types of tables we can create

1. MyISAM

2. Heap

3. Merge

4. InnoDB

5. ISAM

6. BDB

MyISAM is the default storage engine

JavaScript Security

Downloading and running programs written by unknown parties is a dangerous proposition. A program available on the Web could work as advertised, but then again it could also install spyware, a backdoor into your system, or a virus, or exhibit even worse behavior such as stealing or deleting your data. The decision to take the risk of running executable programs is typically explicit; you have to download the program and assert your desire to run it by confirming a dialog box or double-clicking the program’s icon. But most people don’t think about the fact that nearly every time they load a Web page, they’re doing something very similar: inviting code—in this case, JavaScript—written by an unknown party to execute on their computer. Since it would be phenomenally annoying to have to confirm your wish to run JavaScript each time you loaded a new Web page, the browser implements a security policy designed to reduce the risk such code poses to you.

Reserved Words in JavaScript

Reserved Words in JavaScript 1.5
>abstract
else
instanceof
switch
>boolean
enum
int
synchronized
>break
export
interface
this
byte
extends
long
throw
case
false
native
throws
catch
final
new
transient
char
finally
null
true
class
float
package
try
const
for
private
typeof
continue
function
protected
val
debugger
goto
public
var
default
if
return
void
delete
implements
short
volatile
do
import
static
while
double
in
super
with

php exec

The exec() function is one of several functions you can use to pass commands to
the shell. The exec() function requires a string representing the path to the command
you want to run, and optionally accepts an array variable that will contain
the output of the command and a scalar variable that will contain the return value


mod_rewrite?

Rewrites the requested URL on-the-fly based on configuration directives and rules.
You are using system paths. Apache mod_rewrite only works with URLs,
 
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI}  !^(favicon\.ico|assets)  [NC]
RewriteRule  ^(.*)/?$    DestinationFolder/$1        [L]

php file_get_contents


This function is the preferred way to read the contents of a file into a string.
The function itself does nothing but puts the source of the web page you
supply it into a string available for use throughout your script.

<?php
echo file_get_contents("dtd.txt");
?> 

You can use either the curl or the http library. You send a http request, and can use the library to get the information from the http response.


$dat = @file_get_contents( "http://www.bbc.co.uk/" );
if( $dat ) echo htmlentities( $dat );

Cannot modify header information

Check that <?php is at the very start of the functions.php file (before any whitespace)
and remove ?> at the end of that file.

header or setcookie or anything else that sends HTTP headers has
 to be done before 
any other output, or you'll get that warning/error.
 
Remember... anything not inluded in <?php ... ?> 

Use a better text editor to remove what's invisible now before the opening <?php.