类似的文字php mysql(Similar Text php mysql)
我有以下代码,当我搜索一个单词时,它显示我是你的意思。 问题是,如果我输入“临床”,我希望它返回临床,但它返回“重新安排”
$my_word = $_POST['value']; $bestMatch = array('word' = > $my_word, 'match' = > 2); $result = mysql_query("SELECT keyword FROM athena"); $storeArray = Array(); while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { similar_text($row['keyword'], $my_word, $percent); if ($percent > $bestMatch['match']) $bestMatch = array('word' = > $row['keyword'], 'match' = > $percent); } if ($bestMatch['match'] < 70) echo 'Did you mean: <strong>'.$bestMatch['word'].'</strong>';
i have the following code that when i search for a word it shows me a did you mean. the issue is if i type in "clin" i want it to return clinicals but it returns "reschedule"
$my_word = $_POST['value']; $bestMatch = array('word' = > $my_word, 'match' = > 2); $result = mysql_query("SELECT keyword FROM athena"); $storeArray = Array(); while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { similar_text($row['keyword'], $my_word, $percent); if ($percent > $bestMatch['match']) $bestMatch = array('word' = > $row['keyword'], 'match' = > $percent); } if ($bestMatch['match'] < 70) echo 'Did you mean: <strong>'.$bestMatch['word'].'</strong>';
原文:https://stackoverflow.com/questions/11321376
最满意答案
对我来说,付款应该始终是用户的最后一个操作,如果出现其他任何问题,您不希望撤消付款。 因此,如果用户愿意,请让用户匿名浏览您的网站。 然后,当他想要买东西时,让他记录(如果他已经有账户)或注册(如果他没有账户),然后他可以在验证后处理PayPal付款。 您在提交帐户注册时会将其信息发送到数据库。 如果他的提交由于某种原因(缺少字段或其他)而失败,他将不得不再做一次,直到它工作。
不确定是否回答了你的问题。 当然,这对我来说似乎是最合乎逻辑的方式,但在某些情况下你可能想要以不同的方式做事(我现在看不到)
To me, payment should always be the last action of the user cause if anything else goes wrong, you don't want to have to undo the payment. So let the user navigate your website anonymously if he wants. Then, when he wants to buy something, ask him to log (if he already has an account) or register (if he does not have the account), and then he can process the payment on paypal once he is authenticated. You will send his information to the database when he submits his account registration. If his submissions fails for some reason (missing field or whatever), he will have to do again until it works.
Not sure that answers your question. Of course, that seems the most logical way to me, but there might be some cases where you want to do things differently (which I do not see right now)
相关问答
更多-
在网站付款偏好设置下的PayPal帐户个人资料中,您应该看到PayPal帐户可选的选项。 确保禁用此选项并且无帐户支付的选项应该消失。 I found the solution at x.com forums - the key directive for the Pay request is 'fundingConstraint' - https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_ap ...
-
PayPal Web付款标准:现在强制创建PayPal帐户?(PayPal Web Payment Standard: forcing PayPal account creation now?)[2022-05-16]
Yahel的回答不正确:我打电话给PayPal,他们解释说为了接受非PayPal付款必须满足以下条件: 企业电子邮件地址必须确认。 您可以通过转到配置文件>电子邮件来检查。 PayPal账户可选必须选中: 转到www.paypal.com.au并登录到您的商户帐户。 点击页面右上角的“个人资料图标”(“注销”按钮旁边) 点击“配置文件和设置” 点击“我的销售工具”。 点击“网站偏好设置”旁边的“更新”。 选择页面底部附近的“PayPal帐户可选”下的“开”。 点击“保存”。 Yahel's answer i ... -
PayPal帐户类型(PayPal Account Types)[2022-02-05]
是的,你可以做到这一切。 http://www.tipsandtricks-hq.com/playing-in-paypals-sandbox-2880为您提供高速概览。 而https://cms.paypal.com/cms_content/TR/tr_TR/files/developer/PP_Sandbox_UserGuide.pdf是官方文档。 Yes, you can do all of that. http://www.tipsandtricks-hq.com/playing-in-paypal ... -
您可以访问www.paypal.com/buttonfactory为他们创建一个按钮,您只需要将他们与PayPal帐户关联的电子邮件地址链接到他们的帐户。 You may create a button for them by going to www.paypal.com/buttonfactory and all you will need is the email address they have associated with their PayPal account to link the bu ...
-
是的,要实施安全令牌,您需要拥有带有付费流程链接或paylfow pro的管理帐户。 注册 您可以使用test运行经理帐户中的交易(类似于paypal中的沙箱) Yes, for implementing Secure token you need to have a manger account with payflow link or paylfow pro. Sign up You can run the transactions in manager account with test(simila ...
-
通过PayPal帐户的paymentId搜索Paypal记录(Searching for Paypal records by paymentId at Paypal account)[2022-01-23]
我意识到我需要使用PaymentID并使用SDK来检索更详细的付款信息。 $ apiContext = $ this-> getApiContext(); $payment = new Payment(); $payment = $payment->get( $paymentId, $apiContext ); $execution = new PaymentExecution(); $execution->setPayerId( $_GET ... -
只有Express Checkout paypal api允许它... 查看paypal快速结账的文档 https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_WPGettingStarted 我不相信直接付款选项允许它。 Only the Express Checkout paypal api allows it... Check out the documentation for pa ...
-
如果个人是指个人PayPal帐户,那么不,您将无法做到这一点。 您需要一个企业帐户才能访问大多数API,并且您需要PayPal Payments Pro才能访问DoDirectPayment。 PayPal Pro每月30美元,但是,如果您想直接与我联系讨论,我可以免费为您提供专业帐户。 If by individual you mean a Personal PayPal account, then no, you won't be able to do that. You'll need a busin ...
-
对我来说,付款应该始终是用户的最后一个操作,如果出现其他任何问题,您不希望撤消付款。 因此,如果用户愿意,请让用户匿名浏览您的网站。 然后,当他想要买东西时,让他记录(如果他已经有账户)或注册(如果他没有账户),然后他可以在验证后处理PayPal付款。 您在提交帐户注册时会将其信息发送到数据库。 如果他的提交由于某种原因(缺少字段或其他)而失败,他将不得不再做一次,直到它工作。 不确定是否回答了你的问题。 当然,这对我来说似乎是最合乎逻辑的方式,但在某些情况下你可能想要以不同的方式做事(我现在看不到) To ...
-
这种方式不是一个很好的解决方案,因为您无法检查或保证双方都拥有PayPal帐户。 我建议使用自适应付款(连锁付款)。 这将允许您作为PayPal帐户持有人运行每笔交易,它会将钱发送到相应的卖家PayPal帐户,或通过电子邮件发送给他们,让他们知道如果他们没有PayPal帐户他们有钱等,这样他们可以报名并领取这笔钱。 This way is not a great solution because you have no way to check or guarantee that both parties ...