IE cannot display page/submit page to self

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
sheepysheep
Forum Newbie
Posts: 9
Joined: Mon Oct 12, 2009 8:14 am

IE cannot display page/submit page to self

Post by sheepysheep »

Hi,

I have a page which adds a row on a database - that's all. At the start it checks/receives any variables sent to it, and if there are any updates the database, and then below all of that code, it just has an html form (the same form that fills in the variables at the start)

Chrome, Firefox and Safari all work fine.

Internet explorer, however gives me this error:

"Internet Explorer cannot display the webpage

Most likely causes:
You are not connected to the Internet.
The website is encountering problems.
There might be a typing error in the address.

What you can try:
Diagnose Connection Problems

More information"

Here is my code

Code: Select all

<?php 
include('includes/start.php'); 
include('includes/functions.php'); 
if($_POST['submit'])
    {
        if(empty($_POST['fname']))
            {
                $err = 1;
            }
        else
            {
                $parent = $_POST['folder'];
                $userid = $_SESSION['userid'];
                $folder_name = mysql_prep($_POST['fname']);     
                $result = mysql_query("INSERT INTO files 
                (`id`, `name`, `url`, `type`, `parent_id`, `user_id`, `account_id`, `filesize`, `neatfilesize`, `date_added`, `is_folder`)".
                    " VALUES 
                (NULL, '{$folder_name}', '', 'Folder', '{$folder}', '{$userid}', '{$_SESSION['account']}', '0', '0', CURRENT_TIMESTAMP, '1')");
                
                header("Location: " .  $index);
                
            }
    }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Extranet - Add a new folder</title>
        <!-- Uncomment when needed
        <meta name="Description" content="Your description" />
        <meta name="Keywords" content="Your, comma delimited, keywords" />
        <meta equiv="content-type" content="text/html; charset=utf-8" />
        -->
    <link rel="stylesheet" type="text/css" media="all" href="css/style.css" />
    <script src="../Scripts/swfobject_modified.js" type="text/javascript"></script>
    </head>
    <body>
        <div id="container">
            <div id="header">
            </div>
            <div class="menubox">
                    <a href="index.php">My Extranet</a> |
                    <a href="search.php">Search</a> | 
                    <a href="settings.php">Account Settings</a> | 
                    <a href="login.php?logout=1">Log out ></a>
            </div>
            <div id="sidebar">
                <?php include('tree/sidebar.php') ?>
                <br/><br/>&nbsp;&nbsp;&nbsp;
                Add a new folder +  
            </div>
            <div id="content">
                <?php
                if($_FILES)
                {
                    echo "<br/><br/><br/><div class='menubox'><strong>File received</strong></div><br/>";
                }
                ?>
                <h1>Add a new folder</h1>
                <form class="centerContent" action="add_folder.php>" method="post">
                    Create new folder within:<br/>
                    <select name="folder">
                    <?php
                    //Set id as variable
                    $userid = $_SESSION['userid'];
                    //Select all the folders
                    $query = "SELECT * FROM files WHERE user_id='$userid' AND id>=0 AND is_folder=1";
                    $results = mysql_query($query);
                    while($line = mysql_fetch_assoc($results)) {
                        if($line['id']==$folder)
                            {
                                echo "<option selected='selected' value='" . $line["id"] . "'>" . $line["name"] . " (current folder)</option>\n";
                            }
                        else
                            {
                                echo "<option value='" . $line["id"] . "'>" . $line["name"] . "</option>\n";
                            }
                        
                    }   
                    ?>
                    </select><br/>
                    <br/>
                    <?php
                        if($err==1)
                        {
                            echo "<div class='error'>You did not enter a folder name</div><br/>";
                        }
                    ?>
                        New folder name:<br/><input type="text" name="fname"/>
                    <input type="hidden" name="submit" value="1">
                    <br/><input type="submit" value="Create" /> 
                    
                </form>
 
            </div>
            <div id="footer">
                <a href="http://www.twist-media.com" target="_blank" class="linkBox">
            </a>
            </div>
        </div>
<script type="text/javascript">
<!--
swfobject.registerObject("FlashID");
//-->
</script>
</body>
</html>

I've included the whole code, in case my problem lies elsewhere! Any one have any ideas? Thanks in advance for any help...
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: IE cannot display page/submit page to self

Post by AbraCadaver »

Something is wrong here. The color coding should help you:

Code: Select all

<form class="centerContent" action="add_folder.php>" method="post">
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Post Reply