A PHP session variable is used to store information about, or change settings for a user session. Session variables hold information about one single user, and are available to all pages in one application. Here the above example will store the session named colors and display it in the output using the implode() function.
There are two types of arrays we deal with in PHP. Numeric Arrays <?php $employee_names = “Raj”; $employee_names = “Thomas”; $employee_names = “Anil”; echo “The first employee’s name is “.$employee_names; echo “<br>”; echo “The second employee’s name is “.$employee_names; echo “<br>”; echo “The third employee’s name is “.$employee_names; ?> Associative Array <?php $employee_names = array(“arun” [...]
Conditional comments works only with Internet Explorer version 5 onwards.Their basic structure is HTML. The other browsers ignore them entirely since it starts with <!– and ends with –>. They are only recognized by internet explorer. Lets take an example of an html code which has 2 buttons to be displayed. The requirement here is [...]
Very simple and working method of reading values from a Java property file and display it on a webpage using JSP. This will be very handy for developers who need a quick and easy fix for their long search on the internet on how to load values from a property file using JSP and cannot [...]
Simple php code for reading lines Using the below PHP code you can easily read a txt file
Replace a string in a text or php file and save it using php. A very simple example.Here test_file.php is the php file i am using to replace ip address inside that.
Hello guys, In my previous post i have highlighted the security issues for wordpress and how to resolve those bugs.See the post here . Now i will update you with another fix that you guys can do to protect your /wp-admin/* directory.It should be password protected or restricted to IP address. This will reduce attacks [...]
There are requirements for the web developers to scroll the webpage to the top once a registration form or a form of any kind is being submitted by the user. This can also be a link or a button. It all depends on the design of the webpage. This can be solved easily with the [...]