-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdisplay.php
51 lines (48 loc) · 1.52 KB
/
display.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
<?php
include __DIR__ . '/html_private/head.php';
include __DIR__ . '/html_private/lgc.php';
// var_dump($_SESSION['song']);
$valString = "";
$count = 0;
if (is_array($_SESSION['song'])) {
foreach ($_SESSION['song'] as $value) {
$valString = $valString . $value[0] . " - " . $value[1] . "\n";
$count++;
}
}
$_SESSION['song'] = "";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>details</title>
<?php include __DIR__ . '/partials/header.php'; ?>
<div class="container-fluid">
<textarea id="copyt" style="width:0px;height: 0px;" name="s" id="" cols="1"
rows="1"><?php echo $valString ?></textarea>
<h2 id="copyt">
<?php echo $valString ?>
</h2>
<button class="btn btn-warning" onclick="copytext()">Click here Copy For Whatsapp</button>
</div>
<script>
function copytext() {
/* Get the text field */
var copyText = document.getElementById("copyt");
/* Select the text field */
copyText.select();
copyText.setSelectionRange(0, 99999); /*For mobile devices*/
/* Copy the text inside the text field */
document.execCommand("copy");
/* Alert the copied text */
alert("Songs Copied To clip board");
}
function outFunc() {
var tooltip = document.getElementById("myTooltip");
tooltip.innerHTML = "Copy to clipboard";
}
</script>
</body>
</html>