add this code on the checkout page just before the doctype tag:
<?php
if (!session_id()) session_start();
if((((isset($_POST["txtpromocode"]))?$_POST["txtpromocode"]:"") != "")) {
$_SESSION["promocode"] = "".((isset($_POST["txtpromocode"]))?$_POST["txtpromocode"]:"") ."";
}
?>