Jump to content

OtagoHarbour

Members
  • Content Count

    118
  • Joined

  • Last visited

Everything posted by OtagoHarbour

  1. I have figured out that it is not the length of the file names but the size of the files. The PHP post failed because the files were 11 MB each. Two of them exceeded the php.ini limit of 20 MB.
  2. I was not sure whether this question belongs here of in the PHP forum since my problem may be with one or the other or both. I use the following html and php code to select and upload multiple files.HTML <form action="uploadFiles.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file[]" multiple="multiple"/></br> <input type="submit" name="submit[]" value="submit" /> </form> uploadFiles.php <?php if(isset($_POST['submit'])) {
  3. I tried that code except without <!doctype html> since it is a PHP file. I found that if(isset($_POST['submit'])) returns false. I don't know why this is since this is my form code and I selected 2 files. <form action="uploadFiles.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file[]" multiple /><br> <input type="submit" name="submit" value="submit" /></form> Thanks, OH
  4. Thank you for your reply but it still does not appear to be working properly. I tried echo "_FILES[file]: " . print_r($_FILES['file']) . "<br>"; if ($_FILES["file"]["error"][0] > 0) { echo "Error: " . $_FILES["file"]["error"][0] . "<br>"; // this would check for error only for that first image selced } else { echo "No. files uploaded : ".count($_FILES['file']['name'])."<br>"; echo "Upload: " . $_FILES["file"]["name"][0] . "<br>"; // this selects the name of the first image selected echo "Type: " . $_FILE
  5. I am trying to modify the code given here to upload multiple files. The code I use is as follows. ?> <form action="uploadFiles.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file[]" multiple><br> <input type="submit" name="submit" value="Submit"> </form><? uploadFiles.php has the following code <?php if ($_FILES["file"]["error"] > 0) { echo "Error: " . $_FILES["file"]["error"][0] . "<br>"; } else { echo "
  6. Yes. That was the problem. Thanks again.
  7. Sorry. I should have mentioned that I am doing everything in JavaScript with some HTML. However you are certainly right about the caching causing the problem. I put the following code <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /><meta http-equiv="Pragma" content="no-cache" /> in the head section of index.html and that appears to have solved the problem. Thank you very much for you help,Peter.
  8. I used loadXMLDoc to load an XML file onto my web page. I then saved different contents to a file of the save name. When I reloaded the file with loadXMLDoc, I got the original contents instead of the new contents. I deleted the file and then save the new contents to the file with the same name. Reloading still gave me the old contents. I then changed the name of the file. This time loading the file with loadXMLDoc gave me the new contents. Does loadXMLDoc remember the contents that was loaded from a file with a given name and not bother reloading the contents if I present it with a file of th
  9. I would like to use PHP to put a vertical space on a web page. echo "<br \><br \><br \><br \>"; works fine on FireFox but probably breaks several rules in relation to strict xhtml and may not work as well on other browsers. Is there are more standard/correct/robust way of doing this? Thanks,Peter.
  10. Thanks. I'll try that and see if it works. The problem with what I had initially was that I did not specify the contect so it took the default. Thanks,Peter.
  11. Someone gave me the answer. It should be <li><a href="http://192.168.1.4/about.php">About</a></li>
  12. I tried chaning the php code to <li><a href="$_SERVER['']/192.168.1.4/about.php">About</a></li> but now it tries to accesshttp://localhost//$_SERVER['']/192.168.1.4/about.php I want it to just try to access192.168.1.4/about.php without all the preceeding stuff. Thanks,Peter.
  13. I am hosting a web site from home. My system has two layers: a web server (running Ubuntu 11.04) that is port forwarded through port 80 and has only index.php on var/www and an application server (running Ubuntu 11.10) that has everything else and is set up to only talk to the web layer server. index.php has the following line of code. <li><a href="192.168.1.4/about.php">About</a></li> This is a menu item that is supposed to call about.php which is located in var/www on the application server which has the local IP address 192.168.1.4. However, when I click the bu
  14. No worries. I sorted this out. I just needed to uninstall the old Apache.
  15. Thank you so much for your help. I fixed the validator problems and also added two tables, gradually adding what I needed to them and now the web page looks exactly as I would like it to look. Thanks again. The issue that I need to deal with now is that my web server is running Apache http://httpd.apache.....3/windows.html but it seems that I would need WAMP (for Windows) in order to use PHP. I have used WampServer http://www.wampserver.com/en/ in the past. My question is how do I get my web server to use WampServer instead of regular Apache? It is currently looking for my index.html file
  16. The page is at http://www.clusterprism.com/. None of the links work yet as I'm setting up a DMZ. There should be no maroon around the table that contains the image and links. Thanks,Peter.
  17. .bottomBar{ background-color:#300; color:#FFFFCC; font-family:verdana,sans-serif; font-size:65; top:0px; text-align:left;} Thanks,Peter
  18. I put it through Validator and got "Congratulations! No Error Found." But I removed the part that you mentioned and also made sure that bottom and position were removed. I no longer have the bottom bar totally covering the table but its maroon color is still present where the table, and table cell, outlines should be whether I have table outlines or not. The outline coloring does not cover the whole table - just the part that the bottom bar was totally covering it before. Thanks,Peter.
  19. I got rid of position:relative; and that removed the solid block of maroon that was covering the table. But I still have unwanted maroon, from the bottom-bar, where the table and table elements boundaries would be whether I set border="1" or border="0" Thanks,Peter.
  20. In the .css file, I specify the following class for the bottom bar. .bottomBar{ a:hover {color:#FFFF00;} /* mouse over link */ background-color:#300; color:#FFFFCC; font-family:verdana,sans-serif; font-size:65; height:auto; position: relative ; top:0px; text-align:left; width:100%; bottom:5px;} The call to the bottom bar in the html file is as follows. <div class="bottomBar maroon"><span style="font-family: times, serif; color:white"><font face="times, serif" size="3" style="color:orange"><a href="copyright.html" style="color:white">Copyright © Website 2011. All
  21. Unfortunately I have just noticed that, if <p>Text that is supposed to go be below the image.</p> is replaced by a longer block of text (longer than about one line) then the text that is supposed to be on the right falls down below the the text on the bottom. Thanks,Peter.
  22. I used this option. Now the text that is supposed to be on the right is on the right and the text that is supposed to be underneath is underneath. Thanks very much. One change I made was to use.frame2 div {float:left; width: auto;} in the .css file. My wife also suggested using tables. I guess that would be another way to do it. Thanks,Peter.
  23. Sorry. I missed your post earlier. I tried<img src="BackgroundColorBar.jpg" alt="Background" style="overflow:auto; vertical-align:text-top" /> but I still don't get a scroll bar for the text if I reduce the window size. The text just disappears a word at a time. Also, I can only put one line to the right of the image. Thanks,Peter.
  24. I've found thatstyle="vertical-align:text-top" works. Sort of. But the text doesn't wrap around so, if there is a lot of text, it just stops at the end on the page and there is no new line. Adding a break tag puts the following text under the image. Another problem is that, if the screen is small as with a mobile, it doesn't scroll to include the text of the right of the image.
  25. I'm using FireFox as a Browser and writing html code in Crimson Editor. I am not using any WYSIWYGs. Thanks,Peter.
×
×
  • Create New...