Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Web ページにはボタンとリンクがあり、どちらも同じ次のページに移動します。ユーザーが次のページに移動したときに、前のページのボタンまたはリンクをクリックしたかどうかを知りたいです。
ランディングページのphpでその情報を取得するにはどうすればよいですか?
更新:
リンクとボタンにパラメータを追加します。
リンクの場合:
<a href="page.php?param1=1¶m2=2&source=link">link text</a>
ボタンの場合:
<form ...> <input type="hidden" name="source" value="button"> ... <input type="button" ...> </form>
ページ入力を処理するときは、$_REQUEST['source']
$_REQUEST['source']