Or shorten your code: put the Javascript into a separate file, then use
if ($err) { include("/javascript/file/path/here"); } Use it over and over again via this method. "Fatih Ustundag" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > But you can write javascript code with php > like this: > > if ($err) > { > echo "<html><body>" > echo "<script>\n"; > echo "alert('ERRORR');\n"; > echo "</script>\n"; > echo "</body></html>\n"; > exit(); > } > > -----Original Message----- > From: _lallous [mailto:[EMAIL PROTECTED]] > Sent: Monday, October 22, 2001 3:20 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Re: MessageBox in PHP? > > > you can use JavaScript to do that... > <script> > alert('your message goes here'); > </script> > > embed this in your HTML source code. > > it is not possible to do so in PHP since it is server side. > > "Silvia Mahiques" <[EMAIL PROTECTED]> wrote in message > 005101c15aec$9ccac280$1a9cd29b@tscpc6">news:005101c15aec$9ccac280$1a9cd29b@tscpc6... > Hi!, > How can I make a messagebox in PHP to print errors or warning (such as in VB > or VC++)?. Is it possible? > > Silvia Mahiques > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]