-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfill_site_detail.php
48 lines (47 loc) · 1.34 KB
/
fill_site_detail.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
<?php
session_start();
include 'config.php';
echo "<html>";
echo "<body>";
$url=$_POST["1"];
echo "<table><form action='add_site_details.php' method='POST'><tr><td>URL</td>";
echo "<td><input type='text' name='url' placeholder='cannot change from here' value='$url'></td></tr>";
$sql="SELECT * FROM detail WHERE url='$url'";
//$result=$db->query($sql);
$row=mysqli_query($db,$sql);
$row=mysqli_fetch_assoc($row);
if($row["username"]!="")
{
echo "<tr><td>Username</td>";
$userid=$row["username"];
echo "<td><input type='text' name='siteuser' id='siteuser'></td><td id='a'></td>";
}
else if($row["email"]!="")
{
echo "<tr><td>Email</td>";
$userid=$row["email"];
echo "<td><input type='email' name='siteuser' id='siteuser'></td><td id='b'></td>";
}
else
{
echo "<tr><td>Phone No</td>";
$userid=$row["phone"];
echo "<td><input type='text' name='siteuser' id='siteuser'></td><td id='3'></td>";
}
echo "</tr><tr><td>Password</td><td><input type='password' name='sitepass' id='sitepass'></td><td id='4'></td></tr><tr><td></td><td><input type='submit' value='SUBMIT' onclick='myfun()' name='confirm'></td>";
//$u=$_SESSION["Username"];
$variable= <<<eom
<script>
function myfun()
{
var txt=document.getElementById("siteuser");
if(txt="")
{
document.getElementById("a").inner="*Enter UserName";
}
}
</script>
eom;
echo $variable;
echo "</tr></form></html>";
?>