HAN! Posted October 24, 2007 Share Posted October 24, 2007 do u know the alert box in javascript? when u write alert("somthing"); well i need that in php what is the alternative function for that in php? thanxs. Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted October 24, 2007 Share Posted October 24, 2007 there are no functions the same as Javascript in PHP, but you can use javascript within PHP, for an alert you simply do this: <?php echo "<script language=\"javascript\"> alert('this is an alert box') </script>"; ?> Regards ACE Quote Link to comment Share on other sites More sharing options...
Toshiba23 Posted October 24, 2007 Share Posted October 24, 2007 There is none, javascript is a client-side language, that's why it can bring up a windows dialog box. PHP on the other hand, is a server-side scripting language, that can only do server-side functionality. (with the exception of headers) You can use PHP to output an alert() in javascript in a .php file, but other than that... PHP can't make a alert box (like javascript) come up by its self. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.