convert coding (from php to java)
Posted: Sun Apr 10, 2011 3:41 am
i have problem to change the php coding to java script.
i want change this php coding to <script language='javascript'>. How? Below is my php code sentence:
echo "<a href='view_topic.php?id=".$id."'></a>";
then, how to change it to javascript?
change it like sample below:
echo "<script language='javascript'>
alert('Submitted!')
</script><script>window.location='view_topic.php'
</script>";
my problem is i dono how to put ?id=".$id." into javascript. have someone know how to insert ?id=".$id." into my javascript?
or else, change it to another format:
header("Location:view_topic.php");
i want change this php coding to <script language='javascript'>. How? Below is my php code sentence:
echo "<a href='view_topic.php?id=".$id."'></a>";
then, how to change it to javascript?
change it like sample below:
echo "<script language='javascript'>
alert('Submitted!')
</script><script>window.location='view_topic.php'
</script>";
my problem is i dono how to put ?id=".$id." into javascript. have someone know how to insert ?id=".$id." into my javascript?
or else, change it to another format:
header("Location:view_topic.php");