Monday, December 20, 2010

Testing credit card numbers list

List of credit card numbers to test for web developers.

Here is the sample credit card numbers to test

List of Credit Card numbers

Sunday, December 19, 2010

Delete virus from pen drive or computer without antivirus

Remove virus from pen drive or computer. This is nice trick to remove virus from your removable device or computer without anti-virus.

This will feature:
Delete .exe virus file from pen drive or computer.
Delete .ini virus file from pen drive or computer.
Delete desktop.exe virus file from pen drive or computer.
Delete newfolder.exe virus file from pen drive or computer.

Follow the steps below:

Go to virus place.
Create a notepad file and drag and drop all virus files into the notepad.
Now delete the content of the notepad.
Save the notepad.
Now you can able to delete undeletable virus file.

Friday, December 17, 2010

List tables used by stored procedures in mysql

List tables used inside the stored procedures in MySQL


SELECT IT.TABLE_NAME

FROM INFORMATION_SCHEMA.ROUTINES IR

JOIN INFORMATION_SCHEMA.TABLES IT ON

IR.ROUTINE_DEFINITION LIKE BINARY CONCAT("%", IT.TABLE_NAME, "%")

WHERE TABLE_SCHEMA = 'DATABASE_NAME' AND IR.ROUTINE_NAME IN

('PROCEDURE_NAME1', 'PROCEDURE_NAME2')

GROUP BY IT.TABLE_NAME;

Add fields to joomla registration form

Here you can find " How to add fields to joomla registration form "

Adding fields to joomla registration form is very simply. Follow the below steps.
Here steps to joomla registration form add fields:

Step 1:

Explore joomla database in phpMyadmin or in any GUI tool for the RDBMS MySQL
go to table jos_users and add your column in an appropriate place.

Step 2:

go to "libraries -> joomla -> user" from the root directory of joomla

open user.php and find existing variables of jos_users table like $id, $name, $email etc.

and insert the fields that you want to add in an appropriate place between the variables.

and Below find a check() function, add the validation for you filed under that function, if needed.

Step 3:

Now go to
"components -> com_user -> views -> register -> tmpl" from the root directory of joomla

open default.php and add your HTML element like textbox or dropdown whatever under the table.

Now it's done.

Tuesday, December 7, 2010

Learn Mysqli with PHP

Learn PHP - Mysqli


http://www.rvdavid.net/using-stored-procedures-mysqli-in-php-5/

Friday, December 3, 2010

PHP result set to multi select options

PHP Array result set into category wise multi select.


public function FormatEducationOnJobApplicants($Education, $SelectedEducation = '')
{
$EducationCategory = array();
$Select = '';
$OptGroup = '';
foreach($Education as $Row)
{
if(!in_array($Row['EducationCategory'], $EducationCategory))
{
if($OptGroup != '')
{
$Select .= "";
}
array_push($EducationCategory, $Row['EducationCategory']);
$Select .= "";
$OptGroup = $Row['EducationCategory'];
}
if(is_array($SelectedEducation))
{
$Select .= "";
}
else
{
$Select .= "";
}
}
if($OptGroup != '')
{
$Select .= "
";
}
return $Select;
}