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
Re: PHP Contact Form, mt-rand(), problem Validating 1 input [message #181669 is a reply to message #181648] Fri, 24 May 2013 22:31 Go to previous messageGo to previous message
Scott Johnson is currently offline  Scott Johnson
Messages: 196
Registered: January 2012
Karma:
Senior Member
On 5/24/2013 8:21 AM, Twayne wrote:
> On 5/23/2013 6:37 PM, Scott Johnson wrote:
>> On 5/23/2013 1:25 PM, Twayne wrote:
<snip>
>>
>> WOW, not a good way to get help. PE was correct.
>>
>> Supply the code to the failing function and someone may be able to help.
>>
>> But I would first check the attitude at the door.
>>
>> Scotty
>
> I did, Scottie. I posted relevant code and also offered to provide full
> code if it was necessary. Our "friend" simply decided to remove same in
> his response. Not good treatment of an admitted newbie.
>
> Twayne`

OK here is your Original Post:

************************
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`
**********************

1. where is the relevant code of check_input(), the function that you
said is failing?

2. Where did you say that you will provide full code?

3. Best advice here, IMHO, if you don't like a reply then just ignore
it. If you bite back then you lose.

It is not that people do not want to help, but their time is very
valuable to them and like to get to the straight skinny. This is
probably why PE pointed you to how to ask good questions in here.

Will await the code.

Scotty
[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: Sun Nov 24 15:13:18 GMT 2024

Total time taken to generate the page: 0.06458 seconds