Jump to content

[SOLVED] php and js copy to clipboard


Lodius2000

Recommended Posts

Hi, I know zero js but heres what i got, I wanna copy $id to the clipboard and this isnt working, what am i doing wrong, and is this only for 1 browser, do i need a different method for other browsers?

 

<?php

$id = "6228";

print "<script type=\"text/javascript\">\n";
print "var id;\n";
print "id=$id;\n";
print "id.execCommand(\"Copy\");";
print "</script>";


?>

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/127936-solved-php-and-js-copy-to-clipboard/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.