Warning

 

Close

Confirm Action

Are you sure you wish to do this?

Confirm Cancel
BCM
User Panel

Posted: 12/12/2013 5:54:29 PM EDT
I'm running a test with some people at work.  I have a web form that people enter info on and I want the information to write (append) to a text file on the web server.  How can I do that?  I'm definitely NOT a programmer, so if someone can post the code that would be awesome.  I've tried Google but I'm completely lost.  Thanks.
Link Posted: 12/12/2013 6:04:17 PM EDT
[#1]
It's not that easy.  I would recommend giving Google another shot.  Start here: https://support.google.com/drive/answer/87809?hl=en
Link Posted: 12/12/2013 6:04:29 PM EDT
[#2]


There are a large numbers of methods to accomplish this.


<?php
if (isset($_POST['submit'])) {
$variable1 = fopen('text1.txt','a+');
$variable2 = $_POST['something'];
$variable3 = $variable2.PHP_EOL;
fwrite($variable1,$variable2);
fclose($variable1);
print_r(error_get_last());
header("place: http://www.domain.com/whatever.htm") ;
}
?>
<form action='text1.php' method='post'>
   <input type='text' name ='something' size= '30'/>
   <input type='submit' name='submit' value='87'/>
</form>




something similar to this?
Link Posted: 12/12/2013 6:14:01 PM EDT
[#3]
Thanks for the responses.  I'm actually using this as part of a security test and doing a spearfishing attack to capture login info, trying to trick people to login to the website.  The PHP scripts are probably the way I'm going to have to go so I'll keep at it.
Link Posted: 12/12/2013 7:02:32 PM EDT
[#4]
Discussion ForumsJump to Quoted PostQuote History
Quoted:
Thanks for the responses.  I'm actually using this as part of a security test and doing a spearfishing attack to capture login info, trying to trick people to login to the website.  The PHP scripts are probably the way I'm going to have to go so I'll keep at it.
View Quote



well if you want to do that with a web based form as a proof of concept I would have the application email a recipient the results of the completed form

you could even sanitize then forge the email to not only send you the results but also a "confirmation" of sorts to your intended target.  



remember it's not the function of the form but the appearance for a phishing attack.
Close Join Our Mail List to Stay Up To Date! Win a FREE Membership!

Sign up for the ARFCOM weekly newsletter and be entered to win a free ARFCOM membership. One new winner* is announced every week!

You will receive an email every Friday morning featuring the latest chatter from the hottest topics, breaking news surrounding legislation, as well as exclusive deals only available to ARFCOM email subscribers.


By signing up you agree to our User Agreement. *Must have a registered ARFCOM account to win.
Top Top