uisneach Posted February 22, 2009 Share Posted February 22, 2009 Hello. I need som advice to complete the creation of a photogallery realized in javascript but with php that increase everytime by one the number of images uploaded on the server. e.g. thisis the js <script type="text/javascript" language="JavaScript"> var photos=new Array() var which=0 /*Change the below variables to reference your own images. You may have as many images in the slider as you wish*/ photos[0]="photo/1.jpg" photos[1]="photo/2.jpg" photos[2]="photo/3.jpg" photos[3]="photo/4.jpg" photos[4]="photo/5.jpg" function backward(){ if (which>0){ window.status='' which-- document.images.photoslider.src=photos[which] } } function forward(){ if (which<photos.length-1){ which++ document.images.photoslider.src=photos[which] } else window.status='End of gallery' } </script> The list of pics is dynamic. Php moves the pics in the directory photo". $path="public/photos/"; $newname=$path.$las_id.".jpg"; move_uploaded_file($file_temp,$newname); header("Location:pics.php"); How to use php in this case? or is more a js issue? ??? I need just to add the new pic uploaded using php to the gallery in JS. (Is it called ajax?) thanks for advices Quote Link to comment Share on other sites More sharing options...
uisneach Posted February 23, 2009 Author Share Posted February 23, 2009 Hello Another question: accordin to my point of view, i think should be better including js in php page instead of using ajax xhttp rquest anyone has a clue about how to make dyinamic this gallery using javsacript in a php page? the code is posted above thanks in advancce Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.