FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


help with php





golles
I'm making a simple site for a friend that need to learn html and css for school.
www.golles.frihost.net/test
but the save part does not work.
it just needs to save to 2 files.

this is my code:
Code:
<html>
 <head>
  <title>Test your HTML and CSS</title>
 </head>

 <body scroll="no" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
  <table height="100%" width="100%" border="0">
   <tr height="100%">
    <td colspan="2" valign="center">
     <center>
<?php
$fn = "style.css";
$content = stripslashes($_POST['CSS']);
$fp = fopen($fn,"w+") or die ("Error with opening the file!");
fputs($fp,$content);
fclose($fp) or die ("Error with closing the file!");
?>
<?php
$fn1 = "test.html";
$content1 = stripslashes($_POST['HTML']);
$fp1 = fopen($fn1,"w+") or die ("Error with opening the file!");
fputs($fp1,$content1);
fclose($fp1) or die ("Error with closing the file!");
?>
      <form method="POST" action="index.php">
       <input type="submit" value="Continue">
      </form>
     </center>
    </td>
   </tr>
  </table>
 </body>
</html>


I have added 1's afther the second save part but that also didn't work.

please help me, thanks!


//golles
BlackSkad
I always thought you needed to place all the textarea's within the form, and not only the submit-button. Change and try, I think that's the solution.

Edit: it is the solution Smile
misterdimiz
BlackSkad wrote:
I always thought you needed to place all the textarea's within the form, and not only the submit-button. Change and try, I think that's the solution.

Edit: it is the solution Smile


agreed
golles
shame on me, that was really n00bish <_<

it work thanks!


hmm the iframe does not work perfect. does someone now how I can refresh it on a page load?
golles
please help me
devroom
hi, i do not really understand what you mean, can say something more about your problem?
golles
devroom wrote:
hi, i do not really understand what you mean, can say something more about your problem?

yea sure...

dutch:
Ik wil dus dat die iframe gerefreshed word als de pagina geladen word, als ik hem nu save en de doorga naar de index pagina dan geeft hij de oude nog weer (logisch want hij zit in de cache).

english:
I want that the iframe does refresh on the main page load, if I save it now and contineu to the index page then I see the old page in the iframe (logical because it is in the cache).


//golles
kv
Add this to your html

Code:
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
Related topics
Zapraszam do mojej gry :)
[HELP] PHP -> Scripting
Needing a Bit Og Help {PHP}!
need some help - php switch code
[SUPORTE] Imagem de status do MSN
[man][help]PHP...
http://www.samisaada.frihost.net What you think?
help,php books
Please help. php script installation error
I need help yet again
[help][php] Ayuda con las cadenas
[HELP] PHP (and some MyBB) Administration
Error with MySQL and PHP script in my CMS
Session directory permissions issue
[Help] php script to post to twitter
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.