Jump to content

woolyg

Members
  • Posts

    254
  • Joined

  • Last visited

    Never

Everything posted by woolyg

  1. Valid point Corbin! I saw from the outset that the currency conversions are not exact (it's an XML feed from a european bank and I'm trying to convert NZD into USD, so it's converting it to EUR in between there, hence a small margin of error), but all I wanted to do was to give prospective customers an idea of what the cost would be in their currency. I'll be putting a note on the page that it's not absolutely exact, and the actual cost might fluctuate depending on currency changes in the previous 24 hours. But all in all, a SWEET resource. Cheers, WoolyG
  2. Thanks ProjectFear, That's set me in the right direction. You rock! Cheers, WoolyG
  3. Hi, I'm starting development on a site that will be taking orders internationally, and I'd like for customers to be able to see a set value of money (say, 100 USD) in their localised currency. Has anyone else here ever done this? I'm thinking of trying to capture a currency RSS feed every 6 hours, then bringing the XML data into a table, but this method will be verrrry time consuming, code-wise! Has anyone had any experience in this? I'm posting as off-topic as it doesn't really qualify as PHP help, per se.. Cheers, WoolyG
  4. mjdamato - I spent a bit of time, and worked it out - Thats almost *exactly* the code I went for! Nice one guys, thanks for your input. WoolyG
  5. Hi all, I've got a piece of code that is half way down a PHP page. It calls a JS script, depending on whether a SESSION variable is set. <?php if((isset($_SESSION['one_to_many_input_choice']) && ($_SESSION['one_to_many_input_choice'] == "one_by_one"))){ // IF 27 $method_of_retrieval = "onload"; } else { $method_of_retrieval = "onkeyup"; } ?> Then.. <html> <input name="number_of_recipients" id="number_of_recipients" <?php echo $method_of_retrieval; ?>="one_to_many_show_recipient_list()"/> </html> .. This essentially dictates the method of the one_to_many_show_recipient_list() call. If the SESSION variable is not set, the JS is called when the user types on their keyboard. If it is set, I'd like the page to automatically carry out the JS. However, the 'onload' side of it doesn't want to work for me. Is there another way of automatically calling one_to_many_show_recipient_list() - similar to onload - without needing the user to physically do anything? I hope I've been clear, I'm quite new to JS. All input appreciated. Thanks, WoolyG
  6. Hi all, Do any of you have a handy code snippet for PHP's ZIP functionality, or a link to a tutorial on how to structure the code to ZIP up documents in PHP? All info appreciated, WoolyG
  7. Thanks Corbin - I'll get reading into zip. Hellonoko - could you elaborate? I'm not sure what you mean.. Thanks, WoolyG
  8. Ideally separate, but if there is a way to zip them all up and send them (or something like that) that would be great... Any ideas?
  9. Hi all, I'm trying to devise a way for a user to select a number of files (by multi-selecting using a web form), and for the web server to "send" all of the selected files to the user by download. After the PHP script downloads the files from the server to the user, I'd like the page to redirect to a different page. Has anyone ever dealt with this functionality? Thanks, WoolyG
  10. Found it - In my JS I used obj1 = parent.top.document.getElementById('overlay_1'); ..this calls the object from the parent frame, rather than attempting to call it from within the Iframe. Nice one!
  11. Hi all, Within an HTML page of mine, I have embedded an IFrame. Within the Iframe is a little snippet of JS code that calls a overlay, and displays something over the whole page. Problem is, the overlay DIV I want to call is actually housed on the main HTML page, not within the Iframe. Is it possible to getElementByID from a main page, when calling it from within an Iframe? I keep getting "divname is undefined" errors because the divname is not locate in the Iframe code. All input appreciated, Thanks. WoolyG
  12. Ooh - valid point, never thought of that! Nice one DarkWater, that'll help out down the line!
  13. Cool, thanks for your input. There could be literally thousands of variables in a language file - do you reckon this will hurt page load times if it's called at the start of each page load?
  14. Hi all, I'm starting to work on a fairly big project, and was wondering if any of you have had any previous experience with incorporating different languages on a site... and how you implemented it? I was thinking of doing it this way: The site will be developed in English, and every bit of static text on the site will go into an English language file, like: <?php $lang_1 = "Hello"; $lang_2 = "Welcome to the site"; $lang_3 = "This is some further site info"; // ... etc etc ?> Throughout the site, static text is replaced by the variables listed above. After a user signs up, they specify what language they'd like to use. If they select English, the site references the English Language file, and each of the variables on all of the pages are in English. Say if French was available, and they selected it, their $_SESSION language would be set to French, and the site references a Language file that is exactly the same as the English Language file, but every bit of text is its equivalent in French. This way, every user can have localised languages version of the site. The thing I'm worried about though, is that the language files might be very large (like, up on thousands of textual variables to be set) - do you reckon this will affect the page loading times, if the page referenced say 5000 language variables before it got to the HTML? All of your opinoins / experiences are much appreciated. Cheers, WoolyG
  15. Hi all, Just a quick query regarding the way that IE (specifically 7) handles AJAX calls. I'm using a standard getData call to get info from an external PHP file. It displays fine. However, if any changes are made to the external PHP file (say, I changed an image on it for display purposes) and I click on the link to call the AJAX in IE, the original image is shown, not the new one. If I do the same thing in Firefox, the new image displays without needing to open a new browser window and 'refresh' the AJAX. Has anyone else had this problem? Is there an easy fix to make IE show the most up-to-date info in a PHP call? This is really messing with my cross-browser compatibility stuff...! Cheers, WoolyG
  16. Hi all, I'm trying to validate a number entry - say a user enters 100 - allow it, 100.23 - allow it 100.234 - disallow it 100text - disallow it Can anyone help me with the preg_match validator? I've tried looking it up, but I'm getting errors regarding delimiters. Thanks, WoolyG
  17. Hi Wildteen88, No, I'm doing it to test the effect of installing a second web server on the machine - I understand that it is possible to run numerous sites from the one instance. Thanks for the help - I have a couple more Q's: Do I change that into on httpd.conf - the listen port and the server port? Will the second instance automatically use the MYSQL server on its instance, or could there be a crossover/confusion? Thanks, WoolyG
  18. Cool, thanks. Where would I configure this? I was tinkering with httpd.conf, but it didn't work for me... WoolyG
  19. Hi all, I have installed XAMPP twice on a testing machine (Don;t worry, I meant to do it to test this issue!). My question is - How do I access the second instance from a browser? For example - I have placed website 1 in C:\Folder_ONE\xampp\htdocs, and can access it using http://localhost in a browser. I have placed website 2 into C:\Folder_TWO\xampp\htdocs. Can anyone tell me how I would access website 2 in a browser? All help appreciated. WoolyG
  20. Nice one! I'll use that for bulletin board programming, it'll come in handy..
  21. ProjectFear - excellent, you've nailed it. Thank you very much - Solved.
  22. Thanks, I'm looking to do something like $mystring = "Hello I'm looking for a word like word1 or word2"; $cursewords = array('word1', 'word2'); $pos = strpos($mystring, $cursewords); echo $pos .. but attempting to plug an array into strpos() isn't working. Has anyone dealt with this kind of string stuff before? Thanks WoolyG
  23. Hi all, I'm trying to put together a 'bad word' filter on text-input form items that have been POSTed to a PHP file. Is there a way to put all curse words into an array, and check all of them against 1 string? All help appreciated! WoolyG
  24. Hey thorpe, Does that little bit of code allow the 'max_execution_time' value to revert to its original setting after the script is run, or would you be best off running the line of code again to reset it to its former value?
  25. ....that's solved it! Thank you very much, I'll need to go back & do a bit more reading on the parameters I've chosen. Solved. -WoolyG
×
×
  • 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.