Hack Forums
[.NET] Can i convert this VB.NET/PHP into HTML/PHP or JAVASCRIPT/PHP ? - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] Can i convert this VB.NET/PHP into HTML/PHP or JAVASCRIPT/PHP ? (/showthread.php?tid=1457679)



Can i convert this VB.NET/PHP into HTML/PHP or JAVASCRIPT/PHP ? - LittleSpy - Jul 7, 2011

Guys i want to convert this code "Write to text file from VB.NET" into Web Page code.
This is the code:
Code
Dim request As WebRequest = WebRequest.Create(WebServer.Text & "/writetotextfile.php?w=" & MyText.Text)
request.GetResponse()

I want to make application same as this one, but on the web (To have theese textboxes in html, and when i press Save, to write them into my text file.

This is the php code i used (from Eleqtriq tutorial)

Code
<?[h[
$msg = $_GET['w'];
$logfile = 'textfile.txt';
$fp = fopen($logfile, "a");
fwrite($fp, $msg);
fclose($fp);
?>

I know that this is possible but what language do websites use to do this"?

Do you know some methods to do this?
If you know, please help me.

I want to get result same as this one, but to post the data from the textboxes into a text file.
http://www.youtube.com/watch?v=sz1v5XduHio&feature=related

Thanks.


* - Deceptive - Jul 7, 2011

Just look up some tutorials it's really easy once you think about it, I highly suggest w3schools.


* - Uncol Dolan - Jul 7, 2011

Go to php section dude. You will get help there. :)


* - CaZzUaLLv3x - Jul 7, 2011

iindex.php
Code
<form action="process.php" method="get">
text to write: <input type="text" name="w" />
<input type="submit" />
</form>
process.php
Code
<?
$msg = $_GET['w'];
$logfile = 'textfile.txt';
$fp = fopen($logfile, "a");
fwrite($fp, $msg);
fclose($fp);