CODE THAT I HAVE
<?php
if(isset($_POST['text_box']))
{
?>
<html>
<head>
<title>paste</title>
</head>
<link href="http://ift.tt/2mVnupV" rel="stylesheet">
<style>
body {
background-color: #1A1A1A;
}
textarea {
width: 98%;
height: 91%;
background-color: #161616;
color: #4BB112;
outline: none;
resize: none;
border-color: #161616;
}
.box {
background-color: #0F0F0F;
padding: 5px;
float: right;
}
.footer {
position: absolute;
right: 0;
bottom: 0;
left: 0;
padding: 1rem;
background-color: #0F0F0F;
border-top: 1px solid #50C112;
text-align: center;
font-family: 'Raleway', sans-serif;
color: #0f0;
}
input[type=submit] {
font-family: 'Raleway', sans-serif;
border: 1px solid #0F0F0F;
float: left;
color: #0f0;
background-color: #0F0F0F;
cursor: pointer;
font-size: 16px;
outline: none;
}
</style>
<body>
<form name="form" method="post">
<textarea id="text_box" name="text_box"></textarea>
<div class="footer">
<input type="submit" name="submit" id="submit" value="Submit Paste">
</form>
</div>
</body>
</html>
I researched for over 3 or 4 hours to try to find a hastebin // pastebin clone but I couldn't find a working one, so I came to Stackoverflow to ask you guys to help me out.
Basically I wanted to make it so you input a text into the textbox (text_box) and then you press submit and It generates a random url and redirects you to it, kinda like for Example: a2a1da4.txt and then it pastes the text Into that Random URL
I'm new to php and I'm really bad at It. If you guys could help me out that'll be great.
Aucun commentaire:
Enregistrer un commentaire