FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » PHP Contact Form, mt-rand(), problem Validating 1 input
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
PHP Contact Form, mt-rand(), problem Validating 1 input [message #181596] Thu, 23 May 2013 16:43 Go to previous message
bill is currently offline  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`
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to judge the best Best Framework ?
Next Topic: why php echo does not show up in HTML?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 18:21:45 GMT 2024

Total time taken to generate the page: 0.07862 seconds