Do you have a question? Post it now! No Registration Necessary. Now with pictures!
May 28, 2005, 12:26 pm
rate this thread
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,
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 for the text file is irrelevant.
the code for the php file (just a snippet):
<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>
$spot_code = $_POST['SpotTitle'];
$sc = fopen("myfile.3dml", "w");
// Write to 3dml text file
fwrite($sc, "<TITLE NAME=" . '"'. $spot_code .'"'. " />\n");
// Close file
<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"
thanks for any help.
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
- » PHP 4: does method_exist return true if parent class method even if child class forgot to ...
- — Previous thread in » PHP Scripting Forum