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. Link to comment https://forums.phpfreaks.com/topic/74550-solved-alert-boxes/ 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 Link to comment https://forums.phpfreaks.com/topic/74550-solved-alert-boxes/#findComment-376819 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. Link to comment https://forums.phpfreaks.com/topic/74550-solved-alert-boxes/#findComment-376820 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.