source: trunk/cgi-bin/add-route.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: 519 bytes
Line 
1<?php
2/* add-route.php
3** Quick hack to allow manual editing of data in postgres:ipdb:routed table
4** -> add route to table
5** 07/13/2004 kdeugau@vianet
6*/
7 $dbh = pg_connect("dbname=ipdb user=ipdb");
8
9 $qu = pg_exec($dbh, "insert into routed values ('$cidr',$maskbits,'$city')");
10
11 if (!$qu) {
12 include '../header.inc';
13 print "INSERT failed. Check data and db.";
14 include '../footer.inc';
15 } else {
16 header("Location: http://".$HTTP_SERVER_VARS['HTTP_HOST'].
17 "/ip/cgi-bin/edit-route.php");
18 }
19?>
Note: See TracBrowser for help on using the repository browser.