I have a simple python code
path1 = //path1/
path2 = //path2/
write_html = """
<form name="input" action="copy_file.php" method="get">
"""
Outfile.write(write_html)
Now copy_file.php copies files from one folder to another. I want the python path1 and path2 variable values to be passed to php script. How can I do that? Also instead of calling a php script, how can I place the php code in action attribute.
Php code
<?php
$file = $argv[1]
$newfile = $argv[1]
if (!copy($file, $newfile)) {
echo "failed to copy $file...\n";
}
?>