File won't refresh

This is a discussion on File won't refresh within the PHP Language forums, part of the PHP Programming Forums category; Hello all I'm building a suite of free php applications to create virtual worlds. My problem is i can'...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-28-2005
jcwmtl@hotmail.com
 
Posts: n/a
Default File won't refresh

Hello all
I'm building a suite of free php applications to create virtual worlds.
My problem is i can't get my file to refresh. I am not a programmer and
i started using php this week. my only experience with php is
installing personal cms systems (mambo, gallery, pn, phpbb, wordpress,
etc.)

The sample application contains 2 files:
a)The php file (with input controls and the embedded world)
b)The embedded world (text file)

1. The php file accepts input from the user
2. The user hits Submit which creates the text file for the world
this works - the text file is created with changes. next the page
should refresh itself and show the world based on the user's input.

Right now steps 1 and 2 work perfectly in the sense that the text file
for the world does get created. however the page will still show the
older version of the text file.

To get the page to refresh properly, i have to hit the reload button on
the browser...this gives me the "this page can't be refreshed without
sending..." alert...but it then refreshes and shows the changes.

the code:
the code for the text file is irrelevant.
the code for the php file (just a snippet):

<html><head>
<title>SpotCoder</title>
</head>
<body>
<form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<p>Spot Title: <input type="text" name="SpotTitle" size="20" /></p>
<p><input type="submit" /></p>
</form>
</body>
</html>

<?php
//variables
$spot_code = $_POST['SpotTitle'];
//open
$sc = fopen("myfile.3dml", "w");

// Write to 3dml text file
fwrite($sc, "<TITLE NAME=" . '"'. $spot_code .'"'. " />\n");

// Close file
fclose($sc);

?>

<div id="Mylayer" style="position:absolute; left:25px; top:130px;
width:626px; height:440px; z-index:2">
<embed TYPE="model/vnd.flatland.3dml" SRC="myfile.3dml"
PLUGINSPAGE="http://www.flatland.com/download_direct.html" HEIGHT="440"
WIDTH="626">
</div>

thanks for any help.

Reply With Quote
  #2 (permalink)  
Old 05-29-2005
IWP506@gmail.com
 
Posts: n/a
Default Re: File won't refresh

sorry, I'm not really sure what to do about your problem. Only thing i
could suggest is make another php file that actually submits the data
like "submitter.php" that receives the data then sends you to your page
that shows it... then it would be the new version.

what kind of virtual worlds? sounds interesting

-IWP506

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 11:47 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0