Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100



Go Back   PHP-Editors > Programming Help > PHP Programming Help

PHP Programming Help Post any question relating to PHP Programming here and hopefully someone can help.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2006-12-22, 12:49 PM
Junior Member
 
Join Date: Dec 2006
Posts: 12
tk_php is on a distinguished road
Exclamation method not allowed

On my website (www.freewebs.com/thetechgeek/htmlwriter/) I have a php code that tries to write a text file to the user's "my documents" folder. try going to my website and press the submit button. a page will come up that says that the POST method is not allowed. here's my php code:

PHP Code:
<?php
$f 
fopen ('C:/Documents and Settings/My documents/filename.txt',"w");
fwrite($f$_POST['textarea']);
fclose($f);
header"Location: http://www.opmstech.org/trey/webpagewriter/saved.html" );
?>
P.S. i also tried this on my school's website (http://www.opmstech.org/htmlwriter/) hosted by dreamhost.com, and the same error occured. it seems it won't let me send data using POST. PLEASE! If anyone knows how to fix this and/or why it won't let me use this script, please help me with this. Also, for some reason sometimes the submit button works and takes you to the page that says you saved the file, but it's not saved and sometimes it says that the method is not allowed. I really need help on this one.

i need help
tk_php

Last edited by tk_php; 2006-12-22 at 11:20 PM. Reason: more info
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 2006-12-23, 02:47 AM
Xnuiem's Avatar
Senior Member
 
Join Date: May 2004
Location: DFW, Texas
Posts: 1,104
Xnuiem will become famous soon enough
Send a message via Yahoo to Xnuiem
Default

This is a 405 error given back by the webserver.

http://www.checkupdown.com/status/E405.html
__________________
I rarely give code examples.
No, I have never used IIS or Windows of any kind as a web server. Get a real OS!
Please don't PM me, I won't respond.
Reply With Quote
  #3 (permalink)  
Old 2007-02-07, 05:55 PM
Junior Member
 
Join Date: Feb 2007
Posts: 2
nutzag9 is on a distinguished road
Default Freewebs.com and POST

I'm sorry to say, but Freewebs.com as well as most of the other website providers out there do not allow POST method (freewebs does not even allow PHP or any server side/ client side script!). However, Freewebs does allow users to use PHP and some other scripts like it if you sign up for premium services (I know, what a rip!). Another solution: you could create an Apache server on your computer and put the script there.
Reply With Quote
  #4 (permalink)  
Old 2007-02-07, 07:06 PM
Xnuiem's Avatar
Senior Member
 
Join Date: May 2004
Location: DFW, Texas
Posts: 1,104
Xnuiem will become famous soon enough
Send a message via Yahoo to Xnuiem
Default

Wow....no POST? Get a real webhost then. Considering 99% of the forms on the web are using POST.
__________________
I rarely give code examples.
No, I have never used IIS or Windows of any kind as a web server. Get a real OS!
Please don't PM me, I won't respond.
Reply With Quote
  #5 (permalink)  
Old 2007-03-03, 04:29 PM
Junior Member
 
Join Date: Feb 2007
Posts: 2
nutzag9 is on a distinguished road
Default Good webhosts

If you want a good host, I recommend www.kingofhosts.com
You can also just go to google.com and type in "Free PHP web hosts" or go to http://www.0php.com/free_PHP_hosting.php
Reply With Quote
  #6 (permalink)  
Old 2007-03-31, 09:47 PM
Senior Member
 
Join Date: Jul 2006
Location: Prague, Czech Republic
Posts: 193
vladimir_cz is on a distinguished road
Send a message via ICQ to vladimir_cz Send a message via MSN to vladimir_cz Send a message via Yahoo to vladimir_cz Send a message via Skype™ to vladimir_cz
Default

set "action" property in your <form> tag point to your php script.
__________________
Thank you. Vladimir, Czech Republic.
http://www.smartwebco.com/
I'm looking for job.
Reply With Quote
Must read Review for Serious PHP Developers


NuSphere PhpED 5.5 : The Staff of php-editors.com recently spent a few days working with NuSphere PhpED 5.5 (a popular PHP IDE) and NuCoder 2.0 (a PHP Encoding Utility), read up on all the details.

Sponsored Links
Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 11:57 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.