How To Show An Alert Box In PHP | Edureka Community

91917/how-to-show-an-alert-box-in-php

  • Home
  • Community
  • Categories
  • Web Development
  • PHP
  • How to show an alert box in PHP
How to show an alert box in PHP 0 votes

I want to display an alert box showing a message with PHP.

Here is my PHP code:

<?php header("Location:form.php"); echo '<script language="javascript">'; echo 'alert(message successfully sent)'; //not showing an alert box. echo '</script>'; exit; ?>

But it is not working.

  • html
  • css
  • javascript
  • laravel
  • php
Nov 4, 2020 in PHP by kartik 37,520 points 5,656 views answer comment
  • flag

Your comment on this question:

Your name to display (optional):
Email me at this address if a comment is added after mine:
Privacy: Your email address will only be used for sending these notifications.
Add comment Cancel

1 answer to this question.

Your answer

Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Privacy: Your email address will only be used for sending these notifications.
Add answer Cancel
0 votes

Hello,

use this code

echo '<script language="javascript">'; echo 'alert("message successfully sent")'; echo '</script>';

The problem was:

  1. you missed "
  2. It should be alert not alery
Hope it helps!! answered Nov 4, 2020 by Niroj 82,800 points comment
  • flag
  • ask related question

Your comment on this answer:

Your name to display (optional):
Email me at this address if a comment is added after mine:
Privacy: Your email address will only be used for sending these notifications.
Add comment Cancel

Related Questions In PHP

0 votes 0 answers

How to pop an alert message box using PHP?

How to pop an alert message box ...READ MORE

Jun 3, 2022 in PHP by Kichu 19,040 points 967 views
  • javascript
  • php
  • messagebox
0 votes 1 answer

How to check an IP address is within a range of two IPs in PHP?

Hello @kartik, With ip2long() it's easy to convert your addresses ...READ MORE

answered Nov 3, 2020 in PHP by Niroj 82,800 points 4,451 views
  • html
  • css
  • laravel
  • javascript
  • php
0 votes 1 answer

How to matching an IP to a CIDR mask in PHP 5?

Hello @kartik, If only using IPv4: use ip2long() to convert the ...READ MORE

answered Nov 6, 2020 in PHP by Niroj 82,800 points 3,994 views
  • html
  • css
  • javascript
  • laravel
  • php
0 votes 1 answer

How to pass an array via $_GET in php?

Hii, You can pass an associative array to http_build_query() and ...READ MORE

answered Nov 22, 2020 in PHP by Niroj 82,800 points 5,549 views
  • html
  • css
  • javascript
  • laravel
  • php
+1 vote 1 answer

How to make anchor tag with routing using Laravel?

Hey @kartik, First you have to go to ...READ MORE

answered Mar 18, 2020 in Laravel by Niroj 82,800 points 25,146 views
  • html
  • css
  • javascript
  • laravel
  • angularjs
  • php
0 votes 1 answer

What is redirection in Laravel?

Named route is used to give specific ...READ MORE

answered Mar 18, 2020 in Laravel by Niroj 82,800 points 4,152 views
  • html
  • css
  • javascript
  • laravel
  • php
0 votes 1 answer

How to install Laravel via composer?

Hello, This is simple you just need to ...READ MORE

answered Mar 23, 2020 in Laravel by Niroj 82,800 points 4,474 views
  • html
  • css
  • javascript
  • laravel
  • php
+1 vote 1 answer

What are named routes in Laravel and How can specify route names for controller actions?

Hey @kartik, Named routing is another amazing feature of ...READ MORE

answered Mar 23, 2020 in Laravel by Niroj 82,800 points 48,136 views
  • html
  • css
  • javascript
  • laravel
  • php
0 votes 1 answer

How to remove duplicate values from an array in PHP?

Hello @kartik, Use array_unique(): Example: $array = array(1, 2, 2, 3); $array ...READ MORE

answered Sep 15, 2020 in PHP by Niroj 82,800 points 3,308 views
  • html
  • css
  • javascript
  • laravel
  • php
0 votes 1 answer

How to check if a string is an email address in PHP?

Hello, Try this without regular expressions: <?php ...READ MORE

answered Nov 3, 2020 in PHP by Niroj 82,800 points 4,826 views
  • html
  • css
  • javascript
  • laravel
  • php

Recent in Data Analytics

  • How do I show "0" values in a filtered pivot table? Jul 2, 2024
  • While deploying the application to CloudHub using Mule Runtime Version 4.3.0-20210319, I encountered an error. However, the same application works fine with Mule Runtime Version 4.3.0. Jul 18, 2023
  • Apache Flume is not proceeding to retrieve Twitter data Nov 27, 2022
  • How to calculate the mean/sd of a vector without using the in-built R function? Jul 25, 2022
  • How to run the Kruskal-Wallis or Mann-Whitney Test in R? Jul 25, 2022
  • All categories
  • Generative AI Generative AI (1,454)
  • Power BI Power BI (1,316)
  • DevOps & Agile DevOps & Agile (4,138)
  • Data Science Data Science (100)
  • ChatGPT ChatGPT (30)
  • Cyber Security & Ethical Hacking Cyber Security & Ethical Hacking (1,057)
  • Data Analytics Data Analytics (1,266)
  • Cloud Computing Cloud Computing (4,053)
  • Machine Learning Machine Learning (337)
  • PMP PMP (1,069)
  • Python Python (3,488)
  • SalesForce SalesForce (201)
  • Selenium Selenium (1,624)
  • Software Testing Software Testing (58)
  • Tableau Tableau (608)
  • Web Development Web Development (3,972)
  • UI UX Design UI UX Design (24)
  • Java Java (1,358)
  • Azure Azure (157)
  • Database Database (858)
  • Big Data Hadoop Big Data Hadoop (1,907)
  • Blockchain Blockchain (1,673)
  • Digital Marketing Digital Marketing (121)
  • C# C# (141)
  • C++ C++ (272)
  • IoT (Internet of Things) IoT (Internet of Things) (390)
  • Kotlin Kotlin (8)
  • Linux Administration Linux Administration (389)
  • MicroStrategy MicroStrategy (7)
  • Mobile Development Mobile Development (395)
  • Others Others (2,386)
  • RPA RPA (653)
  • Talend Talend (73)
  • TypeSript TypeSript (124)
  • Apache Kafka Apache Kafka (84)
  • Apache Spark Apache Spark (596)
  • Career Counselling Career Counselling (1,091)
  • Events & Trending Topics Events & Trending Topics (28)
  • Ask us Anything! Ask us Anything! (71)

Join the world's most active Tech Community!

Welcome back to the World's most active Tech Community!

Sign up with Gmail Sign up with Facebook

OR

Password must have

At least 1 upper-case and 1 lower-case letter

Minimum 8 characters and Maximum 50 characters

SIGN UP Already have an Edureka Account? Login Forgot Password? LOGIN Don’t have edureka account? Sign Up resend ? Password must have

At least 1 upper-case and 1 lower-case letter

Minimum 8 characters and Maximum 50 characters

reset password Don’t have edureka account? Sign Up reset password Don’t have edureka account? Sign Up Send Code Don’t have edureka account? Sign Up

Subscribe to our Newsletter, and get personalized recommendations.

Google Sign up with Google facebook Signup with Facebook

Already have an account? Sign in.

webinar REGISTER FOR FREE WEBINAR X Years of Experience* Student 0-2 Years 2-5 Years 5-10 Years 10+ Years REGISTER NOW webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP "PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.

Từ khóa » Echo Msgbox Php