Hi, good day every one please i am working on a social site on a member's page he or she can select a picture from any of his or her uploaded image and it will replace the timeline banner or page profile picture . pleas how can i achieve this using jQuery with Php
How choose profile image from gallery
Collapse
X
-
Tags: None
-
what am saying is these images are in the database which is fetch and display on the member page onclick on any of the images fetch to page will now be move to a timeline folder which now replaces the timeline image.Comment
-
this is the move code
my question is how to add an onclick action on the initial image so the above code runCode:$srcPath = '../uploadDir/'; $destPath = '../timelineDir/'; $srcDir = opendir($srcPath); while($readFile = readdir($srcDir)) { if($readFile != '.' && $readFile != '..') { /* this check doesn't really make sense to me, you might want !file_exists($destPath . $readFile) */ if (!file_exists($readFile)) { if(copy($srcPath . $readFile, $destPath . $readFile)) { echo "Copy file"; } else { echo "Canot Copy file"; } } } } closedir($srcDir);Comment
Comment