Jump to content
Sign in to follow this  

Display different images on a same spot in site after clicking a button.

Recommended Posts

I want to make a site where it will show one image to users at first. After clicking a button, it will display another image exactly on that same spot of previous image. The image displayed next cannot be the same with before so I dont think I can use 'random' function to call that next image. So, I plan somehow I want to make that site to show image with incrementing ID, like at first the site call the image I named Pic-1, then call image named Pic-2, Pic-3 and so on.


I'm told that I can do that with PHP, but I'm still unclear about what to do.

Thanks for any response btw.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Similar Content

    • By rookie
      I’m very curious about this topic cause the definition of web designer is different from country to country, for example some countries define a web designer as a person who knows design and programing (Javascript and php etc).
      I wanna know where you are from and which language you need to be web designer like the following.
      Country   :  Japan
      Language:   HTML,CSS,*JavaScript, *wordpress 
      *As to JavaScript, you don’t have to know everything about it but at least how it works. 
        Plus you basically just need to know how to customize jQuery.
       I really wanna know to what extent I should learn JS or php if I need to learn them as web designer in some countries.
      Thanks in advance for your help ! 
    • By Willows
      Hi guys, im working on a small project and need some help with bits and pieces (paid work ofc) if you would like to speak on skype please add me: willows420
      Appreciate this is probably the wrong place to post this but didnt see a paid work thread, so what the heck, move if needed! 
    • By Lyndsey
      Hi guys,
      I thought it would be cool to start a topic for people to share sites they find useful for their design/development processes. Here is a list of sites I find useful and/or use regularly:
      General Stuff:
      http://jsfiddle.net/ - Useful for JavaScript troubleshooting. Test your code and just play around with HTML/CSS and JavaScript. If you're looking for help with a piece of code, save your Fiddle and send it to someone else who can take a look at it You can also save revisions of your Fiddle to track your progress. http://pastebin.com/ - Useful for sharing code online. Useful for when you run in to a bit of trouble with some server-side code. Instead of pasting masses of lines inside a topic, paste your code in to pastebin and get someone to have a look at it for you http://jsonlint.com/ - JSON Validator http://paletton.com/ - Color Scheme Designer. See what colours complement each other etc. Useful stuff. http://www.lipsum.com/ - Lorem Ipsum - Useful for inserting dummy text in to your web pages. http://net.tutsplus.com/category/tutorials/php/ - PHP tutorials, quizzes etc. They also do the same for JavaScript, HTML, CSS, WordPress, ASP.NET to name a few. Really good site.  
      You Don't Know JavaScript - https://github.com/getify/You-Dont-Know-JS JavaScript scene https://medium.com/javascript-scene Webpack Asset bundler https://webpack.js.org/ Jest, Automated tests for JavaScript https://facebook.github.io/jest/  
      http://css3generator.com/ - Generate CSS3. Box Shadow, Border Radius etc. http://border-radius.com/ - Generate border radius quickly! http://www.javascripter.net/faq/hextorgb.htm - HEX to RGB conversion. http://meyerweb.com/eric/tools/css/reset/ - CSS Reset Stylesheet. Resolve browser inconsistencies such as varying margins/padding. http://www.cssplay.co.uk - Lots of experiments with CSS, menus and layouts. CSS Wizardry: https://csswizardry.com/ Sass Guidelines https://sass-guidelin.es/  
      Responsive Design:
      http://www.getskeleton.com/ - Responsive Grid. Nebula - a framework built by WDF member, rbrtsmith: https://nebulaui.github.io/nebula/  
      Server-Side Coding:
      http://net.tutsplus.com/tutorials/php/php-database-access-are-you-doing-it-correctly/ - How to connect to a database using PDO http://www.php.net/manual/en/index.php - PHP manual for everything PHP!  
      Form Validation (Client-Side):
      https://jqueryvalidation.org/ - (My preferred method) Simple to use. Include the necessary jQuery and Validation.js files. Simple usage example, call the function using $('#myForm').validate(); and add a class="required" to fields you want to validate Also allows you to create custom messages and make the validation more advanced! I hope these are useful! If anyone has any others to share, please do
    • By GrahamUK33
      Is it good to use page extensions in the URL such as .HTML .PHP
      Are there any Pros and Cons using/not using page extensions?
    • By Drummer
      Hi guys
      I've created a website which i would like to "wrap" in a members-only environment. I don't want to re-invest the wheel, but looking for a register page, login page, password reset, and all the links/instructions to hook it up to the remote server the website is currently on.
      Does anyone have any pointers for this type of thing? I've tried googling, but struggling tbh!
  • Recently Browsing

    No registered users viewing this page.

  • Member Statistics

    • Total Members
    • Most Online

    Newest Member
  • Forum Statistics

    • Total Topics
    • Total Posts