WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
PHP Web Logs (BLogs)
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Submit Site
Forex Trading Online forex trading platform

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Adds dashes to a CC number. Was from this site, but now it works.
Categories : PHP, Credit Cards Click here to Update Your Picture
Donald Schulze
Date : Jun 07th 2001
Grade : 2 of 5 (graded 1 times)
Viewed : 4450
File : add-dash_CC.inc
Images : No Images for this code example.
Search : More code by Donald Schulze
Action : Grade This Code Example
Tools : My Examples List

  Submit your own code examples 
 

<?php
/*

Example:
$new_cc_num = AddDash("4580458045804580","Visa");
echo "$new_cc_num";

*/

function AddDash ($CC_Num, $CC_Type)
{
if ($CC_Type = "Visa" || "MasterCard") {
$NewCC="";

for ($i=0; $i < 3; $i++) {
$NewCC .= substr($CC_Num, ($i*4), 4) . "-";
}
$NewCC .= substr($CC_Num, 12, 4);

} else {
$NewCC = substr($CC_Num, 0, 19);

}

return ($NewCC);
}



credit card security code
Categories : PHP, Credit Cards, PHP Classes, Credit Cards
an example of the cyberlib payment class
Categories : PHP, PHP Classes, Ecommerce, Credit Cards
Adding dashes to credit card numbers
Categories : Strings, Credit Cards, PHP
ECHOcart - Open Source Shopping Cart
Categories : PHP, Credit Cards, Ecommerce
Validation function for LUHNMod10 and variant. Can discriminate credit card numbers of varying lengths. Uses [Double >> Sum-of-Digits] transform.
Categories : Credit Cards, Authentication, Ecommerce, PHP
Credit Card validation routine. Uses MOD 10 to check if credit card number is valid.
Categories : Ecommerce, Credit Cards, PHP, Complete Programs
After discovering some credit card validation routines didnt work - here is one that I found works with all the numbers I have tried so far
Categories : Credit Cards, Ecommerce, PHP
Query2Report : Generating Html, Pdf and Csv Reports from SQL Query
Categories : PHP, PHP, HTML, PDF, Excel
A set of functions to check the validity of a credit card number.
Categories : Ecommerce, Credit Cards, PHP
Credit Card Identification and Validation Class - The credit_card class provides methods for cleaning, validating and identifying the type of credit card numbers.
Categories : PHP, PHP Classes, Credit Cards, Ecommerce, Algorithms
Retrieve text from table and email to your e- address in pipe delimited format.
Categories : PHP, MySQL
Accepts a database & hostname from a user and then HTTP username and password. Uses this to connect to a MySQL database. Produces a form based on the tables it finds there to allow the user to do SELECTs, INSERTs, and DELETEs.
Categories : Databases, PHP, MySQL, Complete Programs
Check if a file exists on a remote FTP server with PHP
Categories : PHP, FTP, Regexps
Using $PHP_AUTH_USER and $PHP_AUTH_PW to authenticate.
Categories : Authentication, PHP
file class , uploade file , download file already uploaded on another website
Categories : PHP, PHP Classes, Filesystem, Web Services