Jump to content

Guardian-Mage

Members
  • Posts

    341
  • Joined

  • Last visited

    Never

Everything posted by Guardian-Mage

  1. My newest client requested a website for his landscaping business. He wanted a one paged simple design that look good. I am finished with the design, and all that is left is to add his pictures and content. Please tell me what you think of this one, and if you don't like it tell me why, and maybe how I could improve it? http://cdlandscaping.biz/dev2/ Remember, the images and content are mock up. Also, I had numerous transition effects for the slide show, and he chose the current one
  2. Thank you Ken, I don't know why I didn't think of that, and thank you Rithiur, I needed that code.
  3. I parse all of my xhtml pages as php, because I have a lot of php in them. The problem is, to have a perfectly valid xhtml document, I need this line:<?xml version="1.0" encoding="utf-8"?> My webhosting provider has set php to accept a <? tag as php, so now my pages just come up with an error. How can I include the above line in php, can I add a line to my htaccess file or what?
  4. I have an account with 1and1 Web hosting, and a local server. To parse html files and php files as php5 files with 1and1 I need to add this line to my htaccess file: AddType x-mapp-php5 .php .html .shtml .css Then everything is parsed as php5. When I use this line on my local apache installation(Windows) everything screws up. For my local installation I have to add this line to my htaccess file: AddType application/x-httpd-php .php .html .shtml .css This line doesn't work for 1and1. How can I change my local installation to accept the 1and1 x-mapp line?
  5. I have an array with a few values. This array is called $array. I want to find the biggest string in the array, and make all of the other strings in the array the same length by adding whitespace. How should I go about doing this, and I know how to add whitespace, just not how to find the biggest string and do everything else. For example: $array[0] = "asmllstr"; #8 Characters $array[1] = "amediumstri"; #11 Characters $array[2] = "abiggerstring"; #13 Characters $array[3] = "thisisclearlybiggest"; #20 Characters $array[4] = "smaller"; #7 Characters #This would become $array[0] = "asmllstr "; #20 Characters $array[1] = "amediumstri "; #20 Characters $array[2] = "abiggerstring "; #20 Characters $array[3] = "thisisclearlybiggest"; #20 Characters $array[4] = "smaller "; #20 Characters Thanks
  6. I there anyway that I could change my AJAX script to do it the way I wanted?
  7. I have an image that is 1200x1000 for people with a 1280x1024 browser. My problem is, it is still to high when you factor in the status bar, task bar, tabs, and anything else a browser or user might have. I want to use CSS if at all possible, or if not, I can use javascript to resize the picture to take up the ENTIRE USABLE page space. How might I do this?
  8. What? I use post data in my ajax .js file, nowhere in my php file. I am new to AJAX.
  9. I have this ajax script: <!-- var http_request = false; function makePOSTRequest(url, parameters) { http_request = false; if (window.XMLHttpRequest) { // Mozilla, Safari,... http_request = new XMLHttpRequest(); if (http_request.overrideMimeType) { // set type accordingly to anticipated content type //http_request.overrideMimeType('text/xml'); http_request.overrideMimeType('text/html'); } } else if (window.ActiveXObject) { // IE try { http_request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { http_request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!http_request) { alert('Cannot create XMLHTTP instance'); return false; } http_request.onreadystatechange = alertContents; http_request.open('POST', url, true); http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); http_request.setRequestHeader("Content-length", parameters.length); http_request.setRequestHeader("Connection", "close"); http_request.send(parameters); } function alertContents() { if (http_request.readyState == 4) { if (http_request.status == 200) { //alert(http_request.responseText); result = http_request.responseText; document.getElementById('info').innerHTML = result; } else { alert('There was a problem with the request.'); } } } function get() { makePOSTRequest('boot/init.php', 'dummy'); } --> and a php file which does a loop, and pauses between each one. I want AJAX to fetch my results as I echo them. I won't put my php script here, but here is the general idea <?php $a = 0; while ($a < 10) { echo "$a out of 10 complete"; sleep(1); $a++; } So each time php uses the echo command, I want my html script to update, instead of waiting for the entire php script to run. I am using XHTML 1.1 and I have tried changing "if (http_request.readyState == 4) {" to " if (http_request.readyState == 3) {" with no success
  10. I've tried Maguma Studio, and I found it to be quite buggy. I currently use Adobe Dreamweaver CS3 or my own code editor, still under development
  11. OOP is part of PHP, it extends the functionality of PHP, and can help make complicated tasks easier
  12. Could you give us a brief diagram of your server tree layout?
  13. When using the PHP header() function, it includes the content of the page specified, and executes the rest of the code in BOTH pages.
  14. Are you being paid for this? From now on, before you post on this forum, search through the forum archives, and use Google Search and Google Groups. It would save us the hassle of answering a question that could have been solved with a simple Google Search.
  15. Have you ever heard of Google? This forum specifically says no Coding Help. Take the time to learn PHP, XHTML, CSS, Javascript, and AJAX. Then you would have the skills to build a basic forum.
  16. OOP is almost required when programming large and complex software such as forum software (Which I am currently doing). OOP can save time, and teaches you more about the language. Many employers would rather hire somebody familiar with OOP as well.
  17. what version of PHP are you using, and where have you defined editAccount()? The function must be in the same file as the code that calls it or must be included in that file.
  18. No modern servers would allow you to include a file from another domain. That is a major security risk. You need all the files stored on your own server if you want to use PHP include. However, you could look at iFrames, a very messy solution.
  19. First thing first: Learn better grammar and spelling, Firefox even has a build in dictionary Second: Your question was poorly written and you didn't explain it properly Now if I did understand it write, you want to pass two variables to the new page. If this is so, I would recommend using sessions. Google PHP sessions for more information.
  20. Use the php date() function and a text file. Write the last time sent in the text file, and have you php script keep checking the date until 5 or more minutes have passed.
  21. Maybe a little more detail, but why can't you just put the image in the html and when you convert it everything should be fine. Again, I am not quite sure I understand you
  22. $start=100; $finish=5; #If you do the math, this is right $result=mysql_query("SELECT * FROM $tablename LIMIT $start,$finish") or die(mysql_error()); echo "<b>Starting Row: <u>$start</u><br /> Finishing Row: <u>$finish</u><br /></b> <br />Number of rows found: $numrows<br />"; Happy Coding
  23. I don't like assembly, too much work, but I went and ahead and learned it, made two simple programs, and I haven't used it since. I just thought it might be good to know.
  24. Firefox 2 or 3 because they are multi-platform, stable, fast(Regardless of what others may or may not think) and I love all of the available addons, mainly Firebug and Web Developer
×
×
  • 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.