2017-08-19 11 views
-2

私はphpMyAdminにコインテーブルを持っており、ユーザーがPayPal経由で購入を完了すると自動的に更新する必要があります。設定方法は、PayPalが選択したリンクに自動的にリダイレクトすることです。PHPテーブルを自動的に編集

URLからパラメータを受け取り、テーブルに新しいレコードを追加するスクリプトを実行するにはどうすればよいですか?

ありがとうございました。

+0

これまでに何を試しましたか?ヘルプについては、https://stackoverflow.com/help/mcveを参照してください。 – rndus2r

答えて

0

だからリンクは、あなたがこのようになりますスクリプトを持っている必要があり、そのページ上にあるようにpayment_success.php

ようなページと呼ばれるものが必要になります

<?php 
include 'credentials.php'; /*this is a file that will contain your database connection info 

Then here you will establish the connection and enter the data into the desired table*/ 

$var1 = 'some information collected from paypal that you want to update'; 
$id = 'some identifiable information about your user that can connect them to the correct row in your table'; 

I won't hold your hand through all this but the SQL query you would need would be: 

UPDATE table_name SET column_1 = '$var1' WHERE ID = '$id' 
0

確認PayPalのリンクを設定します特定のユーザーのためのMySQLテーブルのコインの価値を増やす.... !!!

私はあなたのテーブルやいくつかの情報のアイデアを得ることができたら、私はそれについて明確な考えを与えることができます。

関連する問題