Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 04-28-2005, 09:59 AM PHP with web form?
kiiyii's Avatar
Novice Talker

Posts: 6
Trades: 0
I'm trying to get a web form to write its content to a file on the server, this is what i have so far:

my web page is:

<html>
<head></head>
<body>
<form action="results.php" method="post">
name: <input type="text" name="msg" size"30">
<input type="submit" value="Send">
</form>
</body>
</html>


results.php is:

<html>
<head></head>
<body>
<?php
$file = fopen("output.txt", "w");
$input = $_POST['msg'];
fwrite($file, $input);
fclose($file);
?>
</body>
</html>

and output.txt is just a blank file.

When I press the submit button on the webpage it seems to call the php script but it doesnt write to the file..... any help would be great.
kiiyii is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-28-2005, 10:00 AM
kiiyii's Avatar
Novice Talker

Posts: 6
Trades: 0
woops, i just relaized this is in the wrong place.

Sorry
kiiyii is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to PHP with web form?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.17013 seconds with 12 queries