-
Notifications
You must be signed in to change notification settings - Fork 0
/
addledger.php
32 lines (27 loc) · 980 Bytes
/
addledger.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
function createRandomPassword() {
$chars = "003232303232023232023456789";
srand((double)microtime()*1000000);
$i = 0;
$pass = '' ;
while ($i <= 7) {
$num = rand() % 33;
$tmp = substr($chars, $num, 1);
$pass = $pass . $tmp;
$i++;
}
return $pass;
}
$finalcode='IN-'.createRandomPassword();
?>
<link href="../style.css" media="screen" rel="stylesheet" type="text/css" />
<form action="saveledger.php" method="post">
<input type="hidden" name="name" value="<?php echo $_GET['invoice']; ?>" />
<input type="hidden" name="invoice" value="<?php echo $finalcode; ?>" />
<input type="hidden" name="tot" value="<?php echo $_GET['amount']; ?>" />
<div id="ac">
<span>Amount : </span><input type="text" style="width:265px; height:30px;" name="amount" /><br>
<span>Remarks : </span><input type="text" style="width:265px; height:30px;" name="remarks" /><br>
<span> </span><input id="btn" type="submit" value="save" />
</div>
</form>