I have a question about how I can be passing the value of a textarea to a php function.
I have the following function:
function _dup($cclist) {
for ($i = 0; $i < count($cclist); $i++) {
$ccnum = info($cclist[$i]);
if (is_array($ccnum)) {
$cc = $ccnum['num'];
for ($j = $i + 1; $j < count($cclist); $j++) {
if (inStr(str_replace("-", "", str_replace(" ", "", $cclist[$j])), $cc))
$cclist[$j] = "";
}
}
}
foreach ($cclist as $i => $cc)
if ($cc == "")
unset($cclist[$i]);
$ok = array_values($cclist);
return $ok;
}
And to execute the script I have this other function:
function check($ccnum, $ccmonth, $ccyear, $cccvv) {
$ccline = $ccnum."|".$ccmonth."|".$ccyear."|".$cccvv;
$action = new Run();
$action->addToCart();
$action->CCLINE = $ccline;
return $action->checkOut();
}
The texarea will get the value nome|cpf|mae|data
so that the check
function can validate it.
HTML
<form action="" method=post name=f> <textarea wrap="off" name=cclist cols=90 rows=20> </textarea><br> <br> <input style="width:100px" class="button" type=submit name=submit size=10 value="Valida"> </form>