Monday, May 18, 2009

Pass PHP Variable in Javascript Link to do Redirecting

If we using PHP GET Method, sometime we we use the URL to pass the variable. In some kind of application maybe we need a redirecting.

Below is a dynamic redirecting using PHP and Javascript. See The Source Code below



echo '<script type="text/javascript">
<!--
window.location = "barang.php
?cbogudang='.$data1[kdgudang].'&pilih=pilih"
//-->
</script>';



This kind of redirecting can be use after insert delete or update a master data. After the insert, delete, or update the data, we can direcly view the table.

This source code from dynamicdrive.com

0 comments:

Post a Comment

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Sweet Tomatoes Printable Coupons