Jump to content

JonnoTheDev

Staff Alumni
  • Posts

    3,584
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by JonnoTheDev

  1. OK this is a simple string mapping function. Easy if you want your ecommerce website in pirate language. As for a multilingual website this is impossible as you aren't going to store the entire dictionary of each language and map to english words! Also think about sentence structure in different languages. Replacing each word individually will not produce the correct translation. Even Googles translation tools struggle to do this accuratly!
  2. Forgive my ignorance but not everyone uses Facebook. What is this?
  3. Forget addslashes() and stripslashes(). When inserting/updating the record all you need to do is use mysql_real_escape_string() on each field variable i.e: mysql_query("INSERT INTO tableName SET name='".mysql_real_escape_string($_POST['name'])."', address='".mysql_real_escape_string($_POST['address'])."'");
  4. any header() command must be called before any output is displayed to the screen. this is why you see this error
  5. Many ways to implement multi-languages. One way is to store all the static text for the site in language files within constants i.e. en.php ====== define(WELCOME_TEXT,'Hello'); es.php ====== define(WELCOME_TEXT,'Hola'); de.php ====== define(WELCOME_TEXT,'Hallo'); You could then use a cookie to determine which language file to use for the website. In your website templates you just print out the constants. // welcome.php print WELCOME_TEXT; If you also store text in your database you must include fields for each language used. This may require branching the text fields into new tables with a language Id.
  6. You may have a broken link on that page
  7. Check you http.conf file for the the htaccess rules. Usually allowOverride or something like that
  8. What do you mean install language packs? Are you asking if there is an addition to an existing commerce system (such as osCommerce) or are you asking how to best implement multiple languages into a website?
  9. Forget the header command or any other type of script redirect (could ruin Google rankings). Use a proper 301 redirect in your .htaccess as DanielO suggested.
  10. 1. Select the record from the database via the URL id 2. Put the database field values back into the form fields 3. Store the id in a hidden form field to retain the value 4. When the form is posted update the database record using the id in the WHERE claus
  11. Use the database ID in the url to restore the data, not the actual values in the url. http://www.confirm.php?id=1 // get the data from table with id 1 // put data into form fields // after form complete update record id 1
  12. Print out your query to test. Change the query code to my prev post rather than using 'or die......'
  13. Must be a bad database query. Get your script to die on query error if(!$result = mysql_query("")) { die(mysql_error()); } $row = mysql_fetch_array()
  14. SELECT * FROM achievements LEFT JOIN list_achievements ON (achievements.name = list_achievements.entry AND listname = '$listname' AND username = '$username') ORDER BY achievements.name
  15. Add into your strtotime() function strtotime($row['date']." -3 hours")
  16. Depends how you read into it. The OS will essentially become a bit of disk space on a central terminal running web service apps as and when you need them. If you use Microsoft products think of Terminal Server, apps and the OS do not run on your standalone PC. This cuts out the need to upgrade your OS and apps entirely. The problem with Windows is that when users upgrade to a new version it takes an awful long time for the surrounding environments to adjust, i.e. the web applications that you run and the desktop applications that you run. The number of compatibility issues encountered really is starting to mean the cost of upgrades is massive in time spent adding updates and patches to existing apps. People are thinking really about joe blogs with his home computer. A new OS may seem exciting to play about with but for businesses running hundreds or thousands of PCs moving to a new OS can be a very daunting experience especially when they run many applications that just become unusable. The OS as people see it now does not fit into the constantly moving web based technologies and a change is needed.
  17. There will be no OS on your computers hard disk. PCs will be thin client and apps will run as and when you need them via web services.
  18. Didn't they laugh at Nouriel Roubini when he said the global economy would collapse? Trust me Windows and Microsoft desktop products are coming to end of their lifespan! http://technology.timesonline.co.uk/tol/news/tech_and_web/article3730534.ece
  19. Stopped upgrading Windows after XP. Nothing about Vista makes me want to use it and the constant security popups when you try to do anything are just annoying. No reason to get excited about another release. As long as I have a web browser and copy of Dreamweaver running i'm happy. Windows will soon be a thing of the past along with its desktop apps with PCs becoming thin clients running apps via web services. Just look at Googles beta programs, you have spreadsheets, word processing, email, organiser, maps, photo sharing, web browser and so on. Windows will be out the window!
  20. Possible maybe using socket connections. Checkout fsockopen() http://uk3.php.net/manual/en/function.fsockopen.php
  21. Store the cut version also or break it up to make it searchable. Would be easier if you used friendly rewritten urls
  22. You would obviously store the time of login for that user. Possibly if tracking the user you store the last click time. Each post has a creation time so displaying new posts is simply a case of retreiving all posts greater than the users last click time.
  23. removing ob_start() doesnt make any difference but I have managed to implement.
  24. Nope Heres what ive done to simulate a process: ob_start(); echo "Please wait"; ob_flush(); flush(); // now sleep for 10 seconds sleep(10); The sleep() function is where I would have processing code. Ive put a sleep in to simulate 10 seconds of processing. However the line "Please wait" is still only displayed after 10 seconds of waiting where I would expect it to be displayed straight away.
  25. Ok thanks Orio Back to madTechie. This is where I get confused. By inserting the following before the processing part of the script: <?php ob_start(); echo "Please wait"; ob_flush(); flush(); //long wait... ?> It still waits till the process has completed before displaying the text 'please wait' to the screen
×
×
  • 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.