Go Back   CP Web Hosting - reseller hosting > Server Scripting > PHP
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-29-2007, 12:15 PM
Senior Member
 
Join Date: Apr 2007
Posts: 347
Default how create a msgbox with php ?

Is it possible to create a msgbox with php ???

I want to check the matching of two password fields and display a msgbox with "password not match" !!!
Reply With Quote
  #2 (permalink)  
Old 06-29-2007, 12:41 PM
Senior Member
 
Join Date: Mar 2007
Posts: 193
Default

Try this in php:

if($pass1 != $pass2){
echo "<script>alert(\"The two password did not match.\");</script>";
}
Reply With Quote
  #3 (permalink)  
Old 06-29-2007, 12:45 PM
Senior Member
 
Join Date: Apr 2007
Posts: 311
Default

Yes, you can do it by printing out javascript code. A google search will give you some great examples. javascript:alert('text here');
Reply With Quote
  #4 (permalink)  
Old 06-29-2007, 12:46 PM
Senior Member
 
Join Date: May 2007
Posts: 217
Default

If you want to do it within the page you can modify the innerHTML of a div or use a text input field set to readonly which displays the alert.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:31 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0