query not working with paypal link
<p>ok i have a form on my website, the code follows</p>

<pre><code>&lt;center&gt;&lt;p&gt;
    &lt;form action="index3.php" method="post"&gt;
    &lt;input type="hidden" name="cmd" value="_cart"&gt;
    &lt;input type="hidden" name="upload" value="1"&gt;
    &lt;input type="hidden" name="business" value="derek.skybc3@gmail.com"&gt;
    &lt;?php paypal_items(); ?&gt;
    &lt;input type="hidden" name="currency_code" value="EUR"&gt;
    &lt;input type="hidden" name="amount" value="&lt;?php echo $total; ?&gt;"&gt;
    &lt;input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but03.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"&gt;
    &lt;/form&gt;
    &lt;/p&gt;&lt;/center&gt;
</code></pre>

<p>and i check if it has been submitted using using the isset function, if it has i run an sql query and add details to a table in a database.
this is the php code......</p>

<pre><code>if (isset ($_POST['submit_x']) )    //////_x needs to be added to submit because it is a image button
                {
                $user_id = $_SESSION['user_id'];
                $get = mysql_query("SELECT firstname, lastname, id FROM users WHERE id='$user_id '" ); // int means interger is only being passed for secuirty;
                while ($get_row = mysql_fetch_assoc($get) ){
                $firstname = $get_row['firstname'];
                $lastname = $get_row['lastname'];
                $persons_id = $get_row['id'];
                $rented_movie = $name;
                $date_rented = date("d F Y"); // function thats gets todays date
                $d = date(" d ");
                $d = $d +2; // adding 2 to todays date 
                $due_back = date("$d F Y "); // date rental is due back

                $query = "INSERT INTO rentals VALUES('','$firstname $lastname','$persons_id','$rented_movie','$date_rented','$due_back' )"; //query that inserts data the users entered in the sign up form into the database
                $query_run = mysql_query($query);
</code></pre>

<p>Now this works fine, it is only when i change the link in the form, that the query wont work and no data is added to my database table . when i change "index3'php" to "https://www.paypal.com/cgi-bin/webscr" </p>

<p>the code when i change the link is</p>

<pre><code>&lt;form action="https://www.paypal.com/cgi-bin/webscr" method="post"&gt;
    &lt;input type="hidden" name="cmd" value="_cart"&gt;
    &lt;input type="hidden" name="upload" value="1"&gt;
    &lt;input type="hidden" name="business" value="derek.skybc3@gmail.com"&gt;
    &lt;?php paypal_items(); ?&gt;
    &lt;input type="hidden" name="currency_code" value="EUR"&gt;
    &lt;input type="hidden" name="amount" value="&lt;?php echo $total; ?&gt;"&gt;
    &lt;input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but03.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"&gt;
    &lt;/form&gt;
    &lt;/p&gt;&lt;/center&gt;
</code></pre>

<p>the index3.php link is an internal page from my website, the other link is a external link to the paypal website.</p>
