faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

3 of 10 people (30%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

How can I put URL &variables= into php generated javascript?

Mar 20th, 2008 17:27
ha mo, Henrik Hansen, Chris Palmer,


You can use the following method:
<?php
echo "<script type=\"text/javascript\">";
echo "alert(" . $_GET["variable"] . ");"
echo "</script>";
?>
This will alert the get variable called variable (?variable=value).
http://www.tantofa.com
http://www.fantofa.com
http://www.mantofa.com
http://www.tanpola.com
http://www.tampola.com
http://www.yamot.com
http://www.mozmar.com
http://www.templatestemp.com