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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.