Jump to content

Html form and php md5 help


crooksey

Recommended Posts

I have inhertied some code that I have been told to get working. not very happy about it, but think its just some basic php.

 

The form has three inputs two user inputs and one hidden value..

 

    <label for="trans_id">Invoice Number(s): </label>
              <input id="trans_id" type="text" name="trans_id" /><br />
    <label for="amount">Amount Paying: </label>
              <input id="amount" type="text" name="amount" /><br />

<input name="remotepassword" value="password1" type="hidden" />

 

Now before submitting the form (post method) I need to create an md5 has of all of these values called digest. (hidden of course).

 

The code I was thinking of was..

 

<?php
$str = trans_id:amount:remotepassword;

string md5 ( string $str [, bool $raw_output = false ] ) 
?> 

 

Now that code should generate the md5 hash, how do I then assign this to a value called "digest" to be added to the post form?

Link to comment
https://forums.phpfreaks.com/topic/213879-html-form-and-php-md5-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.