-
Notifications
You must be signed in to change notification settings - Fork 0
/
s1.php
54 lines (42 loc) · 1.17 KB
/
s1.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/*
* DCE TOOLS - Copy dce
* - STEP 1 - get source and target database
*/
require_once('settings.php');
require_once('db.php');
require_once('htmlheader.php');
//Get Connection
$mysqlconn=getconn($username, $password,'mysql');
//Get DB List
$sql ="Show Databases;";
$mysqlres=getresult($mysqlconn,$sql);
echo "<form action='s2.php' method='post'>\n";
//Source DB
echo "<h2>Select Source DB:</h2>\n";
if ($mysqlres->num_rows > 0) {
echo " <select name='sourcedb'size='1' '>\n";
while($row =$mysqlres->fetch_assoc())
{
echo " <option value='" .$row["Database"]. "'>".$row["Database"]."</option> \n";
}
echo " </select>\n";
}
//Target DB
echo "<h2>Select Target DB:</h2>\n";
$sql ="Show Databases;";
$mysqlres=getresult($mysqlconn,$sql);
if ($mysqlres->num_rows > 0) {
echo " <select name='targetdb'size='1' '>\n";
while($row =$mysqlres->fetch_assoc())
{
echo " <option value='" .$row["Database"]. "'>".$row["Database"]."</option> \n";
}
echo " </select><br><br>\n";
}
echo " <button type='submit'>Weiter zu Schritt 2</button>\n";
echo "</form>\n";
//Close Connection
closeconn($mysqlconn);
require_once('htmlfooter.php');
?>