Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

61 users online



Repeated Data in IE

Repeated Data in IE

Currently viewing this thread: 1 (0 members and 1 guests)


Crano

Crano

Really cool guy!
Status: Offline!

Repeated Data in IE

I created a login and news feature for my website... currently it is really messed up in IE, but everything (almost) works fine in Firefox.

What's happening is, I login, post a news article, and hit submit.. In IE it keeps refreshing and reprinting the information... But in FF it works perfect. WTF!?

Here is my login page:
<form action="added.php" method="POST">
<p>Title:</p>
<input type="text" name="title">
<p>News:</p>
<p>HTML tags are active.</p>
<p>Legend</p>
<textarea name="news" cols=20 rows=5></textarea>
<p>Posted by:</p>
<input type="text" name="posted" value="Crano">
<input type="submit" name="submit" value="submit">
</form>

And here is my php page:
<?php
$da = getdate();
$date="$da[weekday] $da[mday] $da[month] $da[year]";

$news = ("
<div id=\"content\">
<h2 class=\"post-title\">$title</h2>
<h2 class=\"post-date\">$date</h2>
<p>$news</p>
<h2 class=\"post-author\">Posted By: $posted</p>
</div>
");

$file = fopen("news.php", "r");
$read = fread($file, filesize("news.php"));
fclose($file);
$blah = fopen("news.php", "w");
$news=stripslashes($news);
fwrite($blah, "$news $read");
fclose ($blah);
print "<meta http-equiv=\"refresh\" content=\"1;http://cranomedia.net/\">";
?>

Any help would be greatly appreciated...
Note... all I need is assistance with this little php question... everything else that is wrong in IE I can fix myself. :P

Motorspin

Motorspin

Neverside Newbie
Status: Offline!

I don't know.

Instead of using a meta refresh, use a header.

PHP:

<?php

header
('Location: http://cranomedia.net');

?>

For further information on refreshes using PHP, you can read my tutorial at http://www.motorspin.com/index.php?op=t&cat=php&tid=2

or you can always use google.

___________________

Travis Farrell
http://motorspin.com/stuff/images/avasig/m_enterprisesig.gif

Crano

Crano

Really cool guy!
Status: Offline!

Motorspin

Do you mean the last line of the code:
print "<meta http-equiv=\"refresh\" content=\"1;http://cranomedia.net/\">";

Change to:
header('Location: http://cranomedia.net');

Sorry I am fairly new with php.
And thank you for your quik responce Grin.

Crano

Crano

Really cool guy!
Status: Offline!

I tried it... and...
It works!!!!

Wow that was fast.

Now I need to work on the other stupid stuff :P

Thank you again.

By the way your site looks very nice Smile

Last edited by Crano, August 8th, 2004 07:45 AM (Edited 1 times)

Motorspin

Motorspin

Neverside Newbie
Status: Offline!

Your welcome. Glad I could help. Smile

___________________

Travis Farrell
http://motorspin.com/stuff/images/avasig/m_enterprisesig.gif

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0078 seconds.