Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <center>
- <form method="POST">
- QUOTE :<br>
- <textarea rows="5" name="quote" id="quote" placeholder="Your quote" required></textarea><br>
- IG USER :<br>
- <input type="text" name="creator" placeholder="Your instagram username"><br>
- <button name="submit" type="submit">SEND</button>
- </form>
- <?php
- if(isset($_POST['quote'])){
- $myfile = fopen("quote.txt", "a+") or die("Unable to open file!");
- if(!empty($_POST['creator'])){
- $txt = $_POST['quote']."\n- ".$_POST['creator']."\n\n";
- } else {
- $txt = $_POST['quote']."\n- Unknown\n\n";
- }
- fwrite($myfile, $txt);
- fclose($myfile);
- echo "Your quote is saved.";
- }
- ?>
- </center>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement