Session_id() returns the session id for the current session.
Home »
Ajax
,
PHP
,
Php Interview Questions
,
php-interview-questions-answers
» How get the value of current session id?
How get the value of current session id?
PMA04:23
Related Posts:
how execute different code depending on the number and type of arguments passed to a method? PHP doesn't support method polymorphism as a built-in feature. However, you can emulate it using various type-checking functions. The following combine( ) function uses is_numeric(), is_string(), is_array(), and is_bool(… Read More
Top PHP Interview Questions with Answers For Job What is PHP? PHP is a server side scripting language used for web development applications. Php is the powerful tool for making dynamic website. Many … Read More
how eliminate an object? Objects are automatically destroyed when a script terminates. To force the destruction of an object, use unset( ): $car = new car; // buy new car ... unset($car); // car wreck … Read More
What is MVC? MVC- Model, View, Controller - is simply Model - contains data access code and all of you business logic code. View - Contains markup/design code, generally html,xml, json. Controller - contains very little… Read More
find the number of parameters passed into function in PHP? func_num_args() function returns the number of parameters/arguments passed to a function in PHP. … Read More
Scope Resolution Operator? :: is the scope operator it is used to call methods of a class that has not been instantiated. … Read More
how create a new instance of an object? Define the class, then use new to create an instance of the class: class user { function load_info($username) { // load profile from database } } $user = new user; $user->load_info($_REQUEST['username'… Read More
what is ob_start? ob_start turns on output buffering, … Read More
php.ini Basics After you have compiled or installed PHP, you can still change its behavior with the php.ini file. On Linux/UNIX systems, the default location for this file is /usr/local/php/lib or the lib subdirectory of the PHP installati… Read More
difference between include and require? Answer: It"s how they handle failures. If the file is not found by require(), it will cause a fatal error and halt theexecution of the script. If the file is not found by include(), a warning will be issued, but execution wi… Read More
What is SQL Injection? SQL Injection is the hacking technique which attempts to pass SQL commands (statements) through a web application for execution by the backend database. it can be prevented by mysql_real_escape_string() function of PHP. … Read More
want to link two objects, so when you update one, you also update the other? Use =& to assign one object to another by reference: $adam = new user; $dave =& $adam; … Read More
How register the variables into a session? session_register ($session_var) function. (adsbygoogle = window.adsbygoogle || []).push({}); … Read More
What are “GET” and “POST”? GET: we are submitting a form to login.php, when we do submit or similar action, values are sent through visible query string (notice ./login.php?username=…&password=… as URL when executing the script login.php) and i… Read More
how access a method in the parent class that's been overridden in the child? Prefix parent:: to the method name: class shape { function draw( ) { // write to screen } } class circle extends shape { function draw($origin, $radius) { // validate data if ($radius > … Read More