Jump to content

[SOLVED] copy() on submit. Not when page loads


A2xA

Recommended Posts

I'm copying an html file with a different name for my script and it works fine.  I just need it to copy when I press submit instead of when the page loads.

 

The copy code:

<?php
$file = './x/x.html';
$newfile = "./x/x/".$rnd_id. "" .".html";

if (!copy($file, $newfile)) {
    echo "failed to copy $file...\n";
}
?>

 

My current submit button:

		<input type="submit" value="Post" />

I just need it to copy when I press submit instead of when the page loads.

 

From reading that my first thought is "Oh so the OP want's to do it without reloading the page. Meaning client-side, not server-side."

 

Isn't that what the OP was asking? ???

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.