Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Include a $user.txt in php

i have a little problem, that i dont know how to solve.. i'm new with that kind of php stuff. How can I include a file, named $user + extension .txt ($user.txt), that comes with that form:

<form action="status.php" method="post">
            <input type="text" name="user" placeholder="USER" />
            <input type="submit" value="submit" onclick="Submit" />
</form>

And, the results (incluiding the file) comes in the same page.

like image 644
TheBlackRAT Avatar asked Jul 09 '26 23:07

TheBlackRAT


1 Answers

do like

if(isset($_POST['user'])) {
    include($_POST['user'].".txt");      
}
like image 128
Mithun Satheesh Avatar answered Jul 11 '26 14:07

Mithun Satheesh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!