source: trunk/cgi-bin/upd-alloc.php@ 6

Last change on this file since 6 was 6, checked in by Kris Deugau, 20 years ago

Add intermediate development files for posterity

File size: 568 bytes
Line 
1<?php
2/* upd-alloc.php
3** Quick hack to allow manual editing of data in postgres:ipdb:allocations table
4** -> add allocation to table
5** 08/18/2004 kdeugau@vianet
6*/
7 $dbh = pg_connect("dbname=ipdb user=ipdb password=ipdbpwd");
8
9 $qu = pg_exec($dbh, "update allocations set custid='$custid',".
10 "type='$alloctype',city='$city',description='$desc',notes='$notes'".
11 " where cidr='$cidr'");
12 if (!$qu) {
13 print "UPDATE failed. Check data and db.";
14 } else {
15 header("Location: http://".$HTTP_SERVER_VARS['HTTP_HOST'].
16 "/ip/cgi-bin/edit-alloc.php");
17 }
18?>
Note: See TracBrowser for help on using the repository browser.