For a popup javascript is required. Put this in your header:
<script> function myFunction() { alert("I am an alert box!"); // this is the message in "" } </script>
And this in your body:
<input type="button" onclick="myFunction()" value="Show alert box">
When the button is pressed a box pops up with the message set in the header.
This can be put in any html or php file without the php tags.
—–EDIT—–
To display it using php try this:
<?php echo '<script>myfunction()</script>'; ?>
It may not be 100% correct but the principle is the same.
To display different messages you can either create lots of functions or you can pass a variable in to the function when you call it.
Related Posts:
- PHP – exit or return which is better?
- Where to get php_mcrypt.dll for PHP 7.2?
- When do I use the PHP constant “PHP_EOL”?
- Using $this when not in object context in PHP
- How to use PHP’s password_hash to hash and verify passwords
- PHP password_hash(), password_verify()
- PHP &$string – What does this mean?
- PHP – Failed to open stream : No such file or directory
- Simplest way to profile a PHP script
- Subtract 1 day with PHP
- Warning: session_start(): Cannot send session cookie – headers already sent by (output started at [duplicate]
- Popup window in PHP?
- PHP – Indirect modification of overloaded property
- Why is the response on localhost so slow?
- Using prevNext Modx Addon
- Convert hex color to RGB values in PHP
- Calculate business days
- :wq! command in vim
- how to set the background color of the status bar during the launching phase [duplicate]
- api-ms-win-crt-runtime-l1-1-0.dll is missing when opening Microsoft Office file [closed]
- When is K 1024 and when is it 1000?
- What is a MIME type?
- Logitech/LGHUB Lua – Loop with break
- are there dictionaries in javascript like python?
- Replace ' and similar html codes with their correspondent character?
- How can I convert MP3 file to a Base64 encoded string? [closed]
- Understanding The Modulus Operator %
- Understanding the main method of python [duplicate]
- Dial pad to get phone number (with Android button images)
- TypeError: only integer scalar arrays can be converted to a scalar index with 1D numpy indices array
- How is the AND/OR operator represented as in Regular Expressions?
- TypeError: only integer scalar arrays can be converted to a scalar index with 1D numpy indices array
- Google Calendar API event update always return 404 “not found” error
- Istio Ingress resulting in “no healthy upstream”
- How to prevent the “Confirm Form Resubmission” dialog?
- Why is it not possible to fake an IP address?
- How to open a “-” dashed filename using terminal?
- Substring in excel
- What is a LAMP stack?
- What is a sanity test/check
- What is the difference between POST and PUT in HTTP?
- navigate back with PHP form submission
- What is the difference between POST and PUT in HTTP?
- How to find Google’s IP address?
- What exactly is a VBO in OpenGL?
- What and where are the stack and heap?
- ping response “Request timed out.” vs “Destination Host unreachable”
- Authentication versus Authorization
- What is a reverse shell?
- How does npm start work? What all processes are happening in the background?
- What is an instance variable in Java?
- What is the := operator?
- What is tail recursion?
- Discord music bot not working
- What does “:=” mean in Pseudocode? [closed]
- How to set 777 permission on a particular folder? [closed]
- Why am I getting error for apple-touch-icon-precomposed.png
- No results found on kibana -> discover
- What is Xpenology? Is it Linux related thing?
- How do I make a redirect in PHP?
- How to use mysqli_query() in PHP?
- How do I make a redirect in PHP?
- Why do we need virtual functions in C++?
- List of All Locales and Their Short Codes?
- What is a CSRF token? What is its importance and how does it work?
- Difference between “as $key => $value” and “as $value” in PHP foreach
- Create blank image in Imagemagick
- Official definition of CSCI (Computer Software Configuration Item)
- How could I ping @here in Discord.py?
- Python Math – TypeError: ‘NoneType’ object is not subscriptable
- What does %>% mean in R [duplicate]
- How do I get a YouTube video thumbnail from the YouTube API?
- super() in Java
- What is a slug?
- Visual List of iOS Fonts?
- Visual list of all installed fonts with respective pangram phrase?
- How to add elements to an empty array in PHP?
- What is useState() in React?
- TCP vs UDP – What is a TCP connection? [duplicate]
- How do I copy folder with files to another folder in Unix/Linux? [closed]
- ssh : Permission denied (publickey,gssapi-with-mic)
- Eclipse IDE for Java – Full Dark Theme
- Amazon Linux: apt-get: command not found
- Google Calendar API event insert always return 404 “not found” error
- ssh connect Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password)
- What do ++ and *+ mean?
- What’s the syntax for mod in java
- What does the Java assert keyword do, and when should it be used?
- How to avoid Request Entity Too Large 413 error
- How to get rid of the “No bootable medium found!” error in Virtual Box? [closed]
- How to log in to phpMyAdmin with WAMP, what is the username and password?
- How do I fix a “Expected Primary-expression before ‘)’ token” error?
- Array to String PHP?
- Using getline() with file input in C++
- STDERR? What is it? What are its common uses?
- UML Sequence diagram auto-numbering in Visual Paradigm
- Error in “MLSD” command While Connecting FTP to Server [closed]
- Java default constructor
- How do I make a delay in Java?
- How do I get the current date and time in PHP?