PHP Contact Form, mt-rand(), problem Validating 1 input [message #181596] |
Thu, 23 May 2013 16:43 |
bill
Messages: 310 Registered: October 2010
Karma:
|
Senior Member |
|
|
Hi, Newviw here;
Win 7 Home Premium, XAMPP 1.7.3, PHP 5.3,
Two pages: Form.php, check.php (& thanks.html).
They work fine; sends e-mail, formatted, and readable.
Form.php:
$d=($a.$b.$c);
echo "Your code is : " .$d." Enter it in the box below, including
dashes : <br />";
<form action="Check.php" method="post">
<b>Your Code: </b><input type="text" name="code" size="10
maxlength="14" /><br /><br /> ...
BUT: When I begin to add some security, things quit working.
1st, I add to form.php an mt-rand() build of a random code assigned to $d.
$d=($a.$b.$c);
echo "Your code is : " .$d." Enter it in the box below, including
dashes : <br />";
Works OK.
Check.php:
Now, when I try to validate the 'code' in check.php, things stop working.
$code = check_input($_POST['code'], "Enter Your Code");
stops everything in its tracks.
Any comments, advice, leads much appreiated.
TIA.
Twayne`
|
|
|