Re: passing a variable value of PHP into the alert of JavaScript.
| From: | Jason Barnett | Date: | Tue, 30 Mar 2004 13:32:38 +0000 |
| Subject: | Re: passing a variable value of PHP into the alert of JavaScript. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-181814@lists.php.net to get a copy of this message | ||
Prabu Subroto wrote:
Dear my friends... I want to make an alert which can display a value from the database. I am meaning : how can I pass a value of a variable from PHP into JavaScript alert ( alert("$Firstname, $LastName and $Address"); Is it possible?Sure. Probably the easiest way I can think to do it would be to create the JavaScript function as a string and insert your variables into that string. Then print() the string.