PASTING TEXT
Hello, so basically... I've been trying to figure this out for 3-4 hours now (I'm new to PHP And I'm really bad) and I really need help with this "paste text" thing.. I basically wanted to make it so you type in a text
EXAMPLE:
"Hello my name is tyler"
And then when you submit it, it generates a random URL and redirects you to it (like hastebin / pastebin)
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>
Like I said I'm really bad at php and that's sadly all i got, if you guys could help me out that would be amazing
I tried researching "Pastebin Clone" "Hastebin Clone" "paste text php code" etc etc and kept going through them but none of them worked, I'm really sorry for asking for alot.
Aucun commentaire:
Enregistrer un commentaire