Link to home
Create AccountLog in
PHP

PHP

--

Questions

--

Followers

Top Experts

Avatar of Suneet Pant
Suneet Pant🇮🇳

How to show a pop-up box in php
hi there ,

How to create a popup box using in php. This box should appear on button click and hides automatically after a few seconds. Example is shown below . Please help :
User generated image

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of FarWestFarWest

I believe this is HTML5, jQuery Related function
if you want to change the message from server side then you can use AJAX
check this url
http://jqueryfordesigners.com/coda-popup-bubbles.1.html

SOLUTION
Avatar of kaufmedkaufmed🇺🇸

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

ASKER CERTIFIED SOLUTION
Avatar of Chris StanyonChris Stanyon🇬🇧

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

Avatar of Suneet PantSuneet Pant🇮🇳

ASKER

hi I want to use this popup - when a user adds a new item in the cart. Here page will not be directed to a cart page instead on the same page a box on the upper side will appear which will say - 1 more item has added along with the small added text that will show total number of items in the cart.
This popup will hide automatically after a few seconds, allowing the user to add more item into the cart or check out.

Avatar of Suneet PantSuneet Pant🇮🇳

ASKER

can anyone please help

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of Chris StanyonChris Stanyon🇬🇧

Hey Suneet - I've already answered how to do it.

I assuming you add to your cart with an AJAX call. In the script that you call, you'll need PHP to output the information you want in the message (1 more item added and total number of items in the cart). You then need to put the code I posted into the success() or done() function of the AJAX call.

If you want to post your PHP script that adds to the cart and the jQuery code for adding to a cart, then I can take another look.

Avatar of Suneet PantSuneet Pant🇮🇳

ASKER

I've requested that this question be deleted for the following reason:

My Subscription has ended so I removing my question

Avatar of Chris StanyonChris Stanyon🇬🇧

Suneet,

Please don't just delete question, particularly when Experts have spent the time helping. Either continue to engage with them or accept an answer.

I've offered you the code to solve your problem.

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.

PHP

PHP

--

Questions

--

Followers

Top Experts

PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.