473,395 Members | 1,484 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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.

Jul 17 '05 #1
1 1812
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

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: edykstra | last post by:
Hello, If you point your browser to this page, http://prdownloads.sourceforge.net/vnc-tight/tightvnc-1.2.9_x86_viewer.zip?use_mirror=umn the server sends you the HTML page, and very soon...
1
by: kaiser | last post by:
Hello. I am trying to write a program that continues to read the last line of a txt file until a stop button is clicked. while (ContinueLoop == true ) { while ((LastLine = file.ReadLine()) !=...
2
by: Tim::.. | last post by:
Can someone please tell me why I keep getting an error saying the page cannot be displayed in my ASP.NET app. If I upload a file that is under approx 3mb then it works file but as soon as I try to...
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update...
0
by: Casey Bralla | last post by:
For some reason, I can't get curses to refresh the screen. Can someone offer a suggestion to try to debug this? Here is my python code snippet: stdscr=curses.initscr() curses.noecho()...
1
by: Bob Bedford | last post by:
Hi all, I need help for parsing a huge XML file with some ISP limits (I can't change ISP, so this isn't a solution). The ISP limits the scripts to 16MB and 10 seconds. Those params can't be...
8
by: Ravi | last post by:
Hi to all, There is a start button in my page. if user clicks on that then a php program should start and should listen on a particular port. and also user should able to do other tasks on...
12
by: TS | last post by:
i have a need to possibly enable mutli language support. What benefit do i get by using a resource file instead of a custom xml solution? thanks!
7
by: dm3281 | last post by:
Hello, I have this non-standard XML file that I have to manually sort thru each day and verify whether various jobs finish successfully or not. This file isn't a real XML file, so I cannot appear...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.