submitting a form using a external link

Hi,

i’m having problems submitting a form using an external web address link.
i use an if statement to check if the form button is pressed,and if it is the database is updated.
it worked for me when i used an internal link from my website but not when i used an exteranl link.
can anyone help ?

this is the form with an internal link, which works

<center><p>
		<form action="index3.php" method="post">
                         <input type="hidden" name="cmd" value="_cart">
		<input type="hidden" name="upload" value="1">
		<input type="hidden" name="business" value="[email protected]">
		<?php paypal_items(); ?>
		<input type="hidden" name="currency_code" value="EUR">
		<input type="hidden" name="amount" value="<?php echo $total; ?>">
		<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!">
		</form>
		</p></center>

and this is the if statement and query

[php]
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);
				
				
				}

[/php]

this is the code when i use the exteranl link which does work and update the database

<center><p>
		<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
        <input type="hidden" name="cmd" value="_cart">
		<input type="hidden" name="upload" value="1">
		<input type="hidden" name="business" value="[email protected]">
		<?php paypal_items(); ?>
		<input type="hidden" name="currency_code" value="EUR">
		<input type="hidden" name="amount" value="<?php echo $total; ?>">
		<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!">
		</form>
		</p></center>
Sponsor our Newsletter | Privacy Policy | Terms of Service