INSERT into MySQL database with JavaScript but without Node.js : <p>I want to <code>INSERT</code> data into my MySQL database.</p>

<p>After some research I found out I can use something called <code>Node.js</code> to do this.</p>

<p>But it seems to complicated for this small thing I want to do.</p>

<p>Is there a way to do this only with JavaScript, without <code>Node.js</code>?</p>

<p>Background: In my web-based iOS app I want to integrate a <code>Favorite</code> button. When the user clicks on the <code>Favorite</code> button on any site some data get stored in my MySQL database (user id, favorited webpage, title of webpage) and the <code>Favorite</code> button changes its color to signal it's favorite and put in the favorite section.</p>

<p>Following problem if doing this with PHP and not JavaScript: The user have to click the <code>Back</code> button twice to get out of this page, because reloading for storing in the database created a new entry in browser history.</p>

<p>Or is there another solution to prevent to the user have to click the back button twice to get out of this page?</p>
