. Guidelines for Secure Password Input
Use the "password" input type
Instead of <input type="text"> you should always use
<input type="password"> as this lets the browser (and
the user) know that the contents of that field need to be secured. Your
password won't appear on the screen as you type and most browsers also
won't 'remember' the values entered in password fields as they
do with other form elements.
Confirm password...
Thursday, April 18, 2013
Passing variables to JavaScript usin php
7:29 PM
No comments
1. Escaping Quotes and Line Breaks
Suppose you start with a PHP variable that needs to be displayed in a
JavaScript alert or confirmation dialog:
$message = "a short piece of text
spanning more than one line
and containing \"double\" & 'single' quotes";
The obvious way to turn this into an alert is:
<script type="text/javascript">
alert("<?PHP echo $message ?>");
</script>
but that...
Exporting Data to Excel usin php
7:04 PM
11 comments
1. Preparing the data
The following examples use the dataset created for Sorting Arrays of Arrays which is defined as
follows:
<?PHP
$data = array(
array("firstname" => "Mary", "lastname" => "Johnson", "age" => 25),
array("firstname" => "Amanda", "lastname" => "Miller", "age" => 18),
array("firstname" => "James", "lastname" => "Brown", "age" => 31),
array("firstname" => "Patricia", "lastname"...
Subscribe to:
Posts (Atom)