jquery with php loading file
<p>I'm trying to use jquery with a simple php code:</p>

<pre><code>$('#some').click(function() {
    &lt;?php
    require_once('some1.php?name="some' + index + '"');
    ?&gt;
});
</code></pre>

<p>It shows no error, so I don't know what is wrong.</p>

<p>In some1 I have:</p>

<pre><code>&lt;?php
    //Start session
    session_start();

    //Include database connection details
    require_once('../sql/config.php');

    //Connect to mysql server
    $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
    if(!$link) {
        die('Failed to connect to server: ' . mysql_error());
    }

    //Select database
    $db = mysql_select_db(DB_DATABASE);
    if(!$db) {
        die("Unable to select database");
    }

    //Function to sanitize values received from the form. Prevents SQL injection
    function clean($str) {
        $str = @trim($str);
        if(get_magic_quotes_gpc()) {
            $str = stripslashes($str);
        }
        return mysql_real_escape_string($str);
    }

    //Sanitize the POST values
    $name = clean($_GET['name']);
?&gt;
</code></pre>

<p>It's not complete because I want to make a sql command (insert).</p>

<p>I want when I click in #some to execute that file (create a entry in the table that isn't define yet).</p>
