Jump to content

Guardian-Mage

Members
  • Posts

    341
  • Joined

  • Last visited

    Never

Everything posted by Guardian-Mage

  1. I have this basic file upload script: <?php if (($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/pjpeg") && ($_FILES["file"]["size"] < 20000)) { if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "<br />"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br />"; echo "Type: " . $_FILES["file"]["type"] . "<br />"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />"; echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />"; if (file_exists("upload/" . $_FILES["file"]["name"])) { echo $_FILES["file"]["name"] . " already exists. "; } else { move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $_FILES["file"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file"]["name"] . "<br /> <img scr=\"upload/" . $_FILES["file"]["name"] . "\" alt=\"Hello World\" />" ; } } } else { echo "Invalid file"; } ?> I need to have my script rename the file if it already exists, like add a number to it until it is ok. How do i do this?
  2. Some HTML <div class='news'> <b class="news-head">News Flash: New Website by Guardian Technology </b> <br /> <span class="news-subhead">Date: 2007-05-01</span> <br /> <span class="news-subhead">New Website Again...OMG!</span> <br /> <img style="border:0" src="images/default.bmp" width="200" height="133" alt="Jordan 2 Picture" /> <br /> Thanks to Brandon Wamboldt From Guardian Technolog...<br /> <span id="span1" class="readmore" style="cursor:pointer;" onclick="toggleDisplay('news1','span1')"> >>Read More</span> <div style="display:none" id="news1"><p class="news-body"> Thanks to Brandon Wamboldt From Guardian Technology: Freelance Web Development, we have yet another new site. Hope you all like this one. </p></div> </div> <div class='news'> <b class="news-head">News Flash: Jordan Wilkens 2 Trailer </b> <br /> <span class="news-subhead">Date: 2007-04-04</span> <br /> <span class="news-subhead">WHAT?! JORDAN AGAIN!?!? NOOOOOOOOO!!!!!!!!</span> <br /> <img style="border:0" src="images/jordan2trailer.jpg " width="200" height="133" alt="Jordan 2 Picture" /> <br /> We just released the Jordan Wilkens 2 Trailer on Y...<br /> <span id="span2" class="readmore" style="cursor:pointer;" onclick="toggleDisplay('news2','span2')"> >>Read More</span> <div style="display:none" id="news2"><p class="news-body"> We just released the Jordan Wilkens 2 Trailer on Youtube. Go ahead and check it out. The movie stars Jordan Wilkens as Jordan Wilkens. Please vote for the new movie. </p></div> </div> </div> Now I need it so when I click on Read More it changes ">>Read More" to "<<Hide All" Javascript so far: <!-- function toggleDisplay(which,other) { var myId = document.getElementById(which); var otherID = document.getElementById(other); if (myId.style.display=="block") { myId.style.display="none"; otherID.nodeValue=">>Read More"; } else if (myId.style.display=="none") { myId.style.display="block"; otherID.nodeValue="<<Hide All"; } } --> You can look at the site at http://ictonentertainment.com/wamboldt/newicton/
  3. I have a PHP script that grabs a string out of a database. I need to echo the first 13 letters of that string. How can i do that ex: We just released the Jordan Wilkens 2 Trailer on Youtube. Go ahead and check it out. The movie stars Jordan Wilkens as Jordan Wilkens. Please vote for the new movie. result: We just relea... I know how to add the ... to the end, just not how to get the first part of the string. Thanks
  4. My bad, forgot to add the ID to the elements, that was kinda dumb
  5. <!-- function toggleDisplay(which) { var myId = document.getElementById('news1'); if (myId.style.display=="block") { myId.style.display="none"; } else if (myId.style.display=="none") { myId.style.display="block"; } } --> Above is an external javascript file I included in the head of my html document Whenever I try to execute the function in Firefox it comes up with "myId has no properties" and the script will not work. For all code go to http://ictonentertainment.com/wamboldt/newicton/ and look at the source PLEASE NOTE: THIS SITE IS NOT COMPLETE AND THE CSS IS TEMPORARY AND SUCKS
  6. I still haven't had time to tone it down but I added an image that acts as a navigation tool as well. More images to come, and I will tone it down soon.
  7. I really appreciate the comments, but I am busy right now devoloping 3 sites. Once these are done I can get back at mine, so for the time being, no more comments please. However the new site will have rounded corners and being blue, white, and light blue, with sans-serif font.
  8. $query2 = "SELECT shout_id FROM $database ORDER BY shout_id DESC"; //The above query selects all shout entries and lists them in reverse //order so the newest ones are first $result2 = mysql_query($query2) //Executes the SQL Query or die("This script was unable to execute the SQL Query #2. Please contact the webmaster and inform them of the problem. Sorry for the inconvience."); Now I need to take the last row from the above query and assign the value to the variable j for example, the results come back like this: 755 754 753 752 751 ... $j = "755"; I would want $j to equal 755
  9. Is it possible to make a site that connects to an email with POP enabled. Like I want to connect to the gmail server and create my own web based email system where I can login and read all my mail sent to my GMail accounts. I do not like the gmail website and want to be able to login anywhere. Just wondering if this is possible?
  10. When using Maguma Open Studio, I cannot use their templates. I click on new and the template selection comes up. Whenever I select a template the OK is grayed out and I can't click it. The only working option in empty document. When I click the templates right below new they work.
  11. I am signing up for the business plan with 1&1 Web Hosting. I was wondering if anyone here has a website with them and if they are any good. Thanks.
  12. I recently was awarded the job of designing and programming an anti-bullying website for paradigm options. It was an interesting task as the website is hosted by Allura Communications and their server supports ASP, while my specialty is PHP. Nevertheless I completed the website and would like to know what you all think. I did not type up any of the messages, I coded it, and designed it. Please don't criticize the writing. http://bully.allura.com/web20/ Please note that it is supposed to be kid friendly and catch your eye
  13. What is the best in your opinions: Zend Studio Maguma Workbench Maguma Open Studio TsWebEditor Other In terms of power, ease of use, debugging and other criteria.
  14. Wow, ambitious aren't you? I suggest you get a firm understanding of XHTML, CSS, Javascript, PHP, and SQL. An excellent website with tutorials is www.w3schools.com Then I suggest you buy or take out books from your library on PHP and SQL. After that you will probably have enough understanding to start, and practice will improve your skills. -Brandon
  15. I started a business for web design and programming and made a website. It is still under contruction but I would like some opinions. Please try various experiments with it if you wish. It uses PHP, XHTML, CSS, and Javascript. The entire site uses a Javascript Navigation bar, but the Navigation is designed to work on browsers that do not have Javascript enabled. The page resizes well with the window and has been tested on IE, Firefox, Netscape, and Opera. I tested them on the newest versions of the last three, but I only have IE version 4 or something like that. I hope you like it. www.GuardianTechnology.co.nr Hint: If you disable Javascript you have to refresh the page
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.