I have been trying to figure this out for a long time now and I cannot seem to get it. These scripts that I am starting out on are very simple, so can somebody please tell me what I am doing wrong. CODE BELOW
Validate Credit Card
<?php if(!isset($_GET['ccnumber'])) { echo "
Enter your credit card number
<?php else { //need to get the credit card number and validate it $number = $_GET['ccnumber']; // remove spaces $numberWithoutSpaces = str_replace(" ","",$number); echo $numberWithoutSpaces //removedashes $validNumber = str_replace ("-","",$numberWithoutSpaces;) if(is_Numeric($validNumber)) echo "$validNumber"; else echo "Invalid credit card number<"; } ?> <form action="ValidateCreditCard.php" method="GET"<input type=“text” name=“ccnumber”
value=<?php if(!empty($_GET[‘ccnumber’]) echo’"$_GET
[‘ccnumber’]"’;?>