Jump to content

JonnoTheDev

Staff Alumni
  • Posts

    3,584
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by JonnoTheDev

  1. This is a bad idea. If you use ajax then a search engine cannot read the information on the page. You should create these as dynamic pages. i.e. http://www.ontherocks.me.uk/index2.php?go=gear&member=ben&gear_id=1 Use a mod rewrite to make the pages search engine friendly i.e. http://www.ontherocks.me.uk/gear/ben/1 Place the URLs in a sitemap so Google can spider the pages. I'm guessing you want search engine rankings!
  2. Need to post your code. sorry didnt see the link
  3. or if you are reloading the same page // if the counter is set increment by 1 // if not set then default to 1 $_SESSION['COUNTER'] = (is_numeric($_SESSION['COUNTER'])) ? $_SESSION['COUNTER']++ : 1; Remove $_SESSION['COUNTER'] = $_SESSION['COUNTER']++;
  4. You require a loop. All you are doing is incrementing the counter by 1. Example // displays Question 1 Question 2 Question 3 Question 4 $numQuestions = 4; for($counter = 0; $counter < $numQuestions; $counter++) { print "Question ".$counter+1."<br />"; }
  5. Check the url in the header() function that you are redirecting to by printing it. It maybe malformed. Firefox maybe able to reconstruct it correctly. I'm guessing IE is throwing a 404.
  6. Options +FollowSymLinks -MultiViews RewriteRule ^([a-zA-Z0-9_-]+)/workouts$ /workouts.php?site=$1 [L]
  7. Then don't use mysql for searching text. It's slow and the results aren't great. Implement a search using a fulltext search index using the likes of Sphinx or Lucene. Far better and much, much faster. http://sphinxsearch.com/docs/manual-0.9.9.html http://framework.zend.com/manual/en/zend.search.lucene.html
  8. Dont use a rewrite for images. You need to set the path correctly in the img src element. if your images folder is under the root <img src="/images/image.jpg" /> not <img src="images/image.jpg" />
  9. This line: $query = "UPDATE " . $mysqltable . " SET resultspo = '" . $newpo . "', resultsmo = '" . $newmo . "' WHERE username = '" . $username . "'" AND `id` = '.$_SESSION['id']'; <?php $query = "UPDATE ".$mysqltable." SET resultspo = '".$newpo."', resultsmo = '".$newmo."' WHERE username = '".$username."' AND id = '".$_SESSION['id']."'"; ?>
  10. IE 8 1280 x 1024
  11. Remember this though. Just because you see a .html extension on a url doesn't mean that it is not a php file or anything else. Mod Rewrite can transform URLs.
  12. The CSS is all over the shop. Take a look at the file attached. [attachment deleted by admin]
  13. This one is nice http://www.instituteofbass.com/ It might be yours I don't know because you haven't posted a link
  14. Depends what distro you are used to. This is a good book if you are familiar with Red Hat Enterprise or Fedora http://www.amazon.com/Linux-Quick-Notebook-Perens-Source/dp/0131861506
  15. I would start with a book.
  16. You shouldn't try to strip them out. You should be using the correct character encoding for your DB storage, php, HTML document. UTF-8 Unicode should work. Check your HTML headers: <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> If that doesnt work use php (place at the top of each script preferably in a common include prior to any screen output). header('Content-Type: text/html; charset=UTF-8');
  17. It will help if you need to get to 1600 Pennsylvania Ave NW Washington DC
  18. yes that works
  19. If you are a designer then why learn javascript? Developer yes. You must learn XHTML and CSS (XHTML is just extended HTML so don't bother with the previous as a lot of tags have been depreciated). Raw coding HTML documents. If anyone does this they are liars, especially if they say, 'I use notepad'. You are better with an IDE like Dreamweaver or any of the free editors to make life easier. CSS editors like Topstyle can be useful also however most of the time I will hand crank CSS or use from existing projects. As long as you understand XHML, CSS etc then you can modify anything that an editor may insert itself. As a designer you should have a strong knowledge of at least one image editor (Photoshop / Fireworks). Get your HTML, CSS and image editing upto speed. Create some sample projects and share for critique. Once you are confident then move onto more advanced website features like javascript widgets and Flash.
  20. These functions will do what you are after. look them up in the manual for usage. ob_start(); flush(); ob_flush();
  21. Firstly get an API key from Google. Then read through the examples: http://code.google.com/apis/maps/documentation/examples/index.html
  22. <input type="text" name="email" value="<?php print (strlen($_POST['email']) ? $_POST['email'] : "Not Required"); ?>" />
  23. if (preg_match('/[0-9]{4}-[0-9]{2}-[0-9]{2}/', $date)) { // matched } else { // no match }
  24. You can declare a function anywhere you just can't have 2 functions with the same name! This is your error. i.e. // function-file1.php function xyz() { } // function-file2.php function xyz() { } // index.php // this will throw an error as i am including 2 files with the same function include('function-file1.php'); include('function-file2.php'); Or you are including the same file more than once // index.php // this will throw an error as i am including the same file twice include('function-file1.php'); include('function-file1.php');
×
×
  • 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.