Jump to content

ILMV

Members
  • Posts

    502
  • Joined

  • Last visited

    Never

Everything posted by ILMV

  1. Is this even a PHP question? I did a Google search (I know, I'm really clever) and found this: http://www.actionscript.org/forums/showthread.php3?t=61612 It uses both a PHP script and a Flash ActionScript to achieve the result.
  2. http://en.wikipedia.org/wiki/Web_application_framework A PHP framework is a range of classes, usually utilising such object oriented programming techniques as inheritance, polymorphism and encapsulation to provide a code base in which can be used as the core of an application. It will provide advantages, such as recycling (reusing) code, higher database portability, and generally reducing the overheads involved in creating medium to large applications... etc etc. You won't be using a framework unless you had to install one yourself, and this is very unlikely.
  3. The safest bet will be to locate an exchange rate API, usually provided by a reputable financial establishment. That way you could download the exchange rates and work out the calculation yourself, the problem is if your exchange rate is slightly weaker than your customers credit card company you might receive slightly less money than you should.
  4. Right then: 1) The first rule of web design, make sure you have decent colour contrast, dark red on black? Not a good choice. 2) This isn't the 90's, get rid of the marque, it's ugly and expects my to read 1 word every 2 seconds. 3) You don't have a lot of content (that I can see), consider using a fixed width setup, aligned in the centre of the page. (e.g. 900px) 4) For your headers, don't use two different colours (the red on the first character). I think in general you have a long way to go, you also need to think about what areas on each page need to grab my attention, because at the moment it's the back button. Take it as constructive criticism ILMV
  5. Wrong forum, and I would think that it is a custom system.
  6. 1) You need to assign a name to your input field: name="txtTotal" 2) If you want to assign $txtTotal to $products_price the do this: $products_price = $_GET['txtTotal']; or $products_price = $_POST['txtTotal']; ...depending on how your form is being submitted. ILMV
  7. Can you post the HTML created by the browser
  8. What are you having problems with? You have nicely explained what you want, but you haven't explained what you have done so far, and what is going wrong.
  9. lostprophetpunk, do you mean that you want to return the array position? You could use something like...array_search, which will return the array key based on a search.
  10. The design isn't exactly appealing, quite frankly there is too much to distract the eye on the home page from the search box, and the results page from the search results. The colour scheme is too complex (too many colours), also, the choice of colour would be better suited for an audience of babies, mums etc. It's the colours you would usually find on toys designed for young children. I don't really care about what other people have been searching for, when I hit the site it wasn't obvious what these links were, it seems as if you were trying to play up to the search engines, this just screamed link farm to me. Also, you have explicit links in your recently searched box, this is a massive no no. Also, why do I want my search term shared with the rest of the world? This seems a little backwards to me. I guess the issues boil down to the same problem at the end of the day, when creating a service that competes directly with Google, what are your USPs? Becuase if you don't have at least one that will blow my socks off, you can be pretty sure it won't be successful. Just my 2c
  11. Oh I am going to cry I used this code to find self terminating tags: $sxml = new SimpleXMLElement($xml, LIBXML_NOEMPTYTAG); From the Googling I had done I was under the impression that would convert a tag like <this /> into a tag like <this></this>, and it did on some of the tags in my feed (Google Calendar feed) but not all of them.
  12. Right, I have spent hours looking over this and I still cannot understand how to clear this final hurdle. I have a vague idea as to how I think the problem can be resolved, but I am relying on guess work as I cant understand this possessive quantifiers lark. As I have to check that only one < exists I assumed that I have to do this: ([<]?????)([A-Za-z0-9_]+)(.*?) \/\> ..putting a ([<]) in will allow my to specify a quantifier.... right?
  13. Instead, add this WITHIN your form tag <input type="hidden" name="propid" value="<?php echo($_GET['id']); ?>" />
  14. Change your last line to this? <?php } ?>
  15. Ah, I have found a problem, it is matching the first < it finds, and trawling through until it finds a />. which means it will find this: <feed> <title>My XML Feed</title> <other_tag a='1' b='2' c='other' /> Is there a way to specify that the starting character should be <, but until a /> is found we don't want to match any other < ? Thanks, Ben
  16. Try this: $string="View Joe Bloggs return,, View James May return random text here View Bill Clinton return"; preg_match_all('/View\s([\w]+)\s([\w]+)\sreturn/',$string,$test); echo("<pre>".print_r($test,true)."</pre>"); ILMV
  17. Try this: preg_match('/^([0-9]{2}?)(\-)([0-9]{4}?)/',$_POST['Startdate'][$row]))
  18. Many thanks for your help MrAdam! I have forgotten to mention that <othertag /> could be anything as well (e.g. <foo /> <bar />) :-/, s**t. However, I will take what you have coded and do my best to not screw it up Again, many thanks! Ben
  19. Amateurish? Not really, but at the same time it doesn't really feel like a flash game site, of which usually use very radical, youth oriented colours, take miniclip for example, white for me seems a bit too 'clean'. Why does your T&Cs, Privacy Policy, Contact Us etc spawn a new window, that is becoming more and more annoying on the internet, I would suggest putting them on their own proper pages. ILMV
  20. No, the attribute names and content could be anything, and the quantity of attributes may differ as well, for example there may be none, there may be seven.
  21. Hello again, still battling with my XML I have one final problem, here is a piece of example XML: <feed> <title>My XML Feed</title> <other_tag a='1' b='2' c='other' /> <author>ILMV</author> </feed> If you can see I have a tag called "other_tag", which contains 3 attributes and is self closing. I need to convert those attributes to child tags and create a independant closing tag, such as this: <feed> <title>My XML Feed</title> <other_tag> <a>1</a> <b>2</b> <c>other</c> </other_tag> <author>ILMV</author> </feed> *It doesn't have to be indented Like I said in my other post, I am a regex n00b... I think this could be done in one shot, but I am unsure. Any help greatly appreciated, Many thanks, Ben
  22. Thanks MrAdam! I have tweaked it a bit to catch </ as well: $xml = preg_replace('/<([\w]+)[\w]+)/', '<$1_$2', $xml); $xml = preg_replace('/<\/([\w]+)[\w]+)/', '</$1_$2', $xml); Thanks again p.s. learnt a bit about regex too
  23. I have found this, which removes the : all together, which I guess solves the problem, but if anyone can help me modify it so it replaces it with an underscore that would be fantastic. $namespaceFree = preg_replace('/([<<\/])([a-z0-9]+):/i','$1$2',$xml);
  24. Hello all, I need to find this: <somerandomtext:somemoretext and replace with this: <somerandomtext_somemoretext Where the : changes to a _, I don't want to search the entire document, just where a < exists, with any number of alphanumeric characters exists and then a :, nothing else. I am a super n00b with regex, need any more info I can provide it. Many thanks, Ben
  25. Oh dear... it seems as if I forgot to slap a closing code tag in there, sorry. $url="http://www.google.com/calendar/feeds/".$calendar_id."/".$magicCookie."/full?".$query_string; $sxe = new SimpleXMLElement($url, LIBXML_NOEMPTYTAG, TRUE); echo($sxe->asXML()); This is my current code, the 'LIBXML_NOEMPTYTAG' parameter specifies that any empty tags such as <gd:when /> will be converted to <gd:when></gd:when> Even with this code I still cannot access the gd:when tag (or any other tag formatted similarly), I have been trawling the net like crazy, and some people are suggesting it's because the tag contains a semi colon, a namespace? I have probably cheated slightly by replacing the gd:when tag with gd_when tag, this has solved the problem. Cheers, ILMV
×
×
  • 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.