()
| 1 | import UsePhpClientComponent from "./components/UsePhpClientComponent"; |
| 2 | |
| 3 | export default function Home() { |
| 4 | |
| 5 | return ( |
| 6 | <main className="min-h-screen p-24 bg-white"> |
| 7 | <UsePhpClientComponent></UsePhpClientComponent> |
| 8 | <form> |
| 9 | <button |
| 10 | className="rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600" |
| 11 | formAction={async () => { |
| 12 | 'use php' |
| 13 | $pdo = new PDO('mysql:host=localhost:33066;dbname=public', 'root', 'root'); |
| 14 | |
| 15 | $statement = $pdo->prepare("INSERT INTO Bookmarks (slug) VALUES (?)"); |
| 16 | $statement->execute(array('new')); |
| 17 | }}> |
| 18 | Insert Bookmark |
| 19 | </button> |
| 20 | </form> |
| 21 | |
| 22 | </main> |
| 23 | ) |
| 24 | } |
nothing calls this directly
no outgoing calls
no test coverage detected