自动编辑php表

自动编辑php表,php,mysql,phpmyadmin,Php,Mysql,Phpmyadmin,我在phpMyAdmin中有一个coins表,我需要在用户通过PayPal完成购买时自动更新该表。它的设置方式是PayPal会自动将它们重定向到我选择的链接 那么,如何运行从URL获取参数并向表中添加新记录的脚本呢 感谢您的帮助。因此该链接需要是一个名为payment\u success.php的页面 在该页面上,您需要一个如下所示的脚本: <?php include 'credentials.php'; /*this is a file that will contain your da

我在phpMyAdmin中有一个coins表,我需要在用户通过PayPal完成购买时自动更新该表。它的设置方式是PayPal会自动将它们重定向到我选择的链接

那么,如何运行从URL获取参数并向表中添加新记录的脚本呢


感谢您的帮助。

因此该链接需要是一个名为payment\u 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'

设置确认PayPal链接以增加MySQL表中特定用户的硬币数量值


我希望这能奏效。。。。。如果我能了解你的桌子或更多信息,我可以给你一个清晰的想法。

到目前为止你都尝试了什么?求助