How to open multiple buffers in JEdit like in GEdit or Mousepad

Many of us use a text editor to edit program code. The simplest and clean edit is GEdit on the Gnome desktop. However, if you are not on the Gnome desktop, you may miss it. You can use JEdit which is much more powerful, however, by default, it does not open multiple programs alongside each . . . → Read More: How to open multiple buffers in JEdit like in GEdit or Mousepad

RIPS – Free source code security analyzer for PHP

If you are a PHP programmer and want to scan your source code to identify any security threats, you can use the RIPS PHP source code analyzer. It is available at this link http://rips-scanner.sourceforge.net

Sessions in PHP

php1.php <?php session_start(); session_register(“count”); $count++; ?>

php2.php <?php session_start(); $vu = HTTP_SESSION_VARS(“count”); echo “\n$vu\n”; session_destroy(); ?>

You have to put session_start() at start of every program that is within that session. HTTP_SESSION_VARS() will read value of session variable within brackets. When using $count variable in a function, you must specify: global $count; else the variable . . . → Read More: Sessions in PHP

PHP: Read MySQL Database with cookie validation

list ($username, $pwd) = split(“ “, $validation); if (empty($username) || empty($pwd)) die (“You are not authorized user”); $connection = @mysql_connect($host, $username, $pwd) or die (“Could not connect to database”); $db = mysql_select_db(“address”, $connection) or die (“Could not select database”);

$sql = “select * from table”; $res = mysql_query($sql); if (! $res) die (“Could not . . . → Read More: PHP: Read MySQL Database with cookie validation

PHP: Connect to a database in MySQL

$link = mysql_connect($host, $user, $password); if ($link && mysql_select_db($db)) {}

$sql = “select * from table”; $res = mysql_query($sql); if (! $res) die (“Could not run query”); $no_recs = mysql_num_rows($res); i = 0; while ($row = mysql_fetch_array($res)) { $i++; $first = $row[“FirstName”]; $last = $row[“LastName”]; }

mysql_free_result($res); mysql_close($link);

. . . → Read More: PHP: Connect to a database in MySQL

PHP: Read data from a delimited file

$fin = fopen(“address.txt”, “rb”);

$row = 0;

while ($data = fgetcsv($fin, 2000, “,”);

{

$mm = count($data);

$row++;

. . . → Read More: PHP: Read data from a delimited file

PHP: Put all fields metadata in array

$connection = mysql_connect($host, $user, $password);

$db = mysql_select_db(“address”, $connection);

$fieldname = array();

$result = mysql_list_fields(“address”, “address”);

$no_fields = mysql_num_fields($result);

for . . . → Read More: PHP: Put all fields metadata in array

May 2017
M T W T F S S
« Mar    
1234567
891011121314
15161718192021
22232425262728
293031