在 React / Next.js 中使用 PHP

php 爱好者的福音

Youtube Video about how this project was made

return (
    <button
        formAction={async () => {
            'use php'
            (new PDO('mysql:host=localhost:3306;dbname=public', 'root', 'root'))
                ->prepare("INSERT INTO Bookmarks (slug) VALUES (?)")
                ->execute(array('new'));
            }}>
        Insert Bookmark
    </button>
)

https://github.com/bufferhead-code/nextjs-use-php