Jump to content

PayPall litle Help pliz..


somazvanica

Recommended Posts

hi all i have problems with php script that i made,  this script show items from sql db , and next to every item i put add to cart button, but when i click on that hi just get information from last raw of table.. what do i need to do? becouse i need a information from raw that is selected. i use this script for paypall 

{
  	 echo "<tr>";
  	  echo "<td align='center' width=40>". $row['Art']. "</td>";
  	   echo "<td align='center' width=80>". $row['d']. "</td>";
  	   echo "<td align='center' width=80>". $row['De']. "</td>";
  	   echo "<td align='center' width=80>". $row['Lo']. "</td>";
  	   echo "<td align='center' width=80>". $row['R']. "</td>";
  	   echo "<td align='center' width=80>". $row['nt']. "</td>";
  	   echo "<td align='center' width=80>". $row['Ln']. "</td>";
 	   echo "<td align='center' width=80>". $row['sn']. "</td>";
 	   echo "<td align='center' width=80>". $row['Fn']. "</td>";
 	   echo "<td align='center' width=80>". $row['rdj']. "</td>";
 	   echo "<td align='center' width=80>". $row['stanje']. "</td>";
 	   echo "<td align='center' width=80>". $row['cena']. "</td>";
 	   echo "<td align='center' width=80>". $row['artnr']. "</td>"; 
        echo '<td><button type="submit" src="shopping-cart-icon-614x460.png" width="30" height="30" id="btn_9" class="Button3" ></button></div>
 </div>
 <form id="form_1" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_self" 
 
 style="margin:0;position:absolute;left:279px;top:1146px;width:220px;height:96px;">
 <input type="hidden" name="bn" value="shoping.cart">
 <input type="hidden" name="cmd" value="_cart">
 <input type="hidden" name="business" value="feder-matic@europe.com">
 <input type="hidden" name="item_name" value="Druckfedern">
 <input type="hidden" name="item_number" value="' . $row["artnr"] . '">
 <input type="hidden" name="currency_code" value="EUR">
 <input type="hidden" name="amount" value="1.00">
 <input type="hidden" name="add" value="1">
 <input type="hidden" name="quantity" value="1">
 <input type="hidden" name="no_shipping" value="0">
 <input type="hidden" name="no_note" value="1">';
 	  echo "</tr>";
   }
    echo "</table>";
         }
 
 mysql_close($db_con);
 ?>
<input type="hidden" name="item_number" value="' . $row["artnr"] . '">

this value i every time i click only get me from last row of table, and there is also problem with pirst row of table becouse when i click add its not working only on frist row.. i will send whole script in attacment it prabaly need some claning but i am new in this, if someone can help me THX

 

filter.php

Link to comment
Share on other sites

  • 2 weeks later...

move submit line inside form and close form tag

somet6hing like this

{
  	 echo "<tr>";
  	  echo "<td align='center' width=40>". $row['Art']. "</td>";
  	   echo "<td align='center' width=80>". $row['d']. "</td>";
  	   echo "<td align='center' width=80>". $row['De']. "</td>";
  	   echo "<td align='center' width=80>". $row['Lo']. "</td>";
  	   echo "<td align='center' width=80>". $row['R']. "</td>";
  	   echo "<td align='center' width=80>". $row['nt']. "</td>";
  	   echo "<td align='center' width=80>". $row['Ln']. "</td>";
 	   echo "<td align='center' width=80>". $row['sn']. "</td>";
 	   echo "<td align='center' width=80>". $row['Fn']. "</td>";
 	   echo "<td align='center' width=80>". $row['rdj']. "</td>";
 	   echo "<td align='center' width=80>". $row['stanje']. "</td>";
 	   echo "<td align='center' width=80>". $row['cena']. "</td>";
 	   echo "<td align='center' width=80>". $row['artnr']. "</td>"; 
       // echo '<td><button type="submit" src="shopping-cart-icon-614x460.png" width="30" height="30" id="btn_9" class="Button3" ></button></div>

 <form id="form_'.$row["artnr"] .'" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_self" 
 
 style="margin:0;position:absolute;left:279px;top:1146px;width:220px;height:96px;">
 <input type="hidden" name="bn" value="shoping.cart">
 <input type="hidden" name="cmd" value="_cart">
 <input type="hidden" name="business" value="feder-matic@europe.com">
 <input type="hidden" name="item_name" value="Druckfedern">
 <input type="hidden" name="item_number" value="' . $row["artnr"] . '">
 <input type="hidden" name="currency_code" value="EUR">
 <input type="hidden" name="amount" value="1.00">
 <input type="hidden" name="add" value="1">
 <input type="hidden" name="quantity" value="1">
 <input type="hidden" name="no_shipping" value="0">
 <input type="hidden" name="no_note" value="1">';
 echo '<td><button type="submit" src="shopping-cart-icon-614x460.png" width="30" height="30" id="btn_9" class="Button3" ></button>';
echo '</form>';
 	  echo "</tr>";
   }
    echo "</table>";
         }
 
 mysql_close($db_con);
 ?>

i change form id to. it's must bi uniq

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.