displays the message box two times in a row
<p>I have a problem with making message box. Here is the code:</p>

<pre><code>&lt;? php
 echo "&lt;script language=\"Javascript\"&gt; \ n";
 echo "Confirmed = window.confirm ('Are you sure you want to store data ?');";

 echo "if (confirmed)";
 echo "{";
 echo "window.confirm ('Do you want to add any more data');";
 echo "document.location.href = 'index.php';";
 echo "}";

 echo "else";
 echo "{";
 echo "window.confirm ('you press the CANCEL button');";
 echo "}";

 echo "&lt;/ script&gt;";
 ?&gt;
</code></pre>

<p>Above code can only link to a page only while that I need links to each page. please help n_n</p>

<p>Translated from original:</p>

<p>saya mempunyai masalah dengan membuat message box.saya mempunyai kode:</p>

<pre><code>enter code here

&lt;?php
echo "&lt;script language=\"Javascript\"&gt;\n";
echo "confirmed = window.confirm('Anda yakin akan menyimpan data ?');";

echo "if (confirmed)";
echo "{";
echo "window.confirm('Apakah anda ingin menambah data lagi');";
echo "document.location.href='index.php';"; 
echo "}";

echo "else ";
echo "{";
echo "window.confirm('Anda menekan tombol CANCEL');";
echo "}";

echo "&lt;/script&gt;";
?&gt;
</code></pre>

<p>kode diatas hanya bisa link ke 1 halaman saja sedangkan yang saya butuhkan link ke setiap halaman. mohon bantuannya n_n</p>
