Well, you're followed the steps and so it should theoretically work. Debugging is never fun. My guess:
Target needs to match website EXACTLY.
You show 2 versions:
Double quote
<input type="hidden" name="total_rate" value="$
Single quote
<input type='hidden' name='total_rate' value='$
Also check unexpected differences in spaces, etc.
You might need to search for both.
OR
Strip all quotes, double and single,
Strip all spaces
search for "total_ratevalue=$"
Another possibility:
You haven't actually read the file.
For debugging, After the read, echo the file or strlen of the string to prove you have actually read the file.