A simple php script for alerting users about a form submission via a discord webhook, the main focus is ease of use, requiring hardly any back-end setup. Requires curl to be enabled inorder to post via webhook.
- Upload all the files onto your webserver.
- Enter your details into config.php.
- Change the form html tags in index.php.
- Upload config.php & discord-post.php into your webserver.
- Enter your details into config.php.
- I'd delete all the form formatting for the template out of config.php.
- Have your form posting to discord-post.php.
Custom Example
<form method="post" action="discord-post.php">
<textarea name="message" placeholder="Message" required></textarea>
<button type="submit">send</button>
</form>
- name="" is used as the input title in the discord message, it is auto capitalised.
- value="" is entered below the title.
- Form returns back with ever ?r=success or ?r=error.
- No backend form verification, users could add new form inputs. That shouldn't really matter because they will just be posted with the message and nothing malicious could be done.
Submit a form entry on our demo site here.
All submission on the demo website are posted into this discord server.