Jump to content

OJB

Members
  • Content Count

    362
  • Joined

  • Last visited

Everything posted by OJB

  1. It appears to be your menu ><ul> <lis><a>HOME</a></lis> <li><a href="http://www.primaryteachingresources.net/teaching%20resources/html/about_us.html">ABOUT US</a></li> <li><a href="http://www.primaryteachingresources.net/teaching%20resources/html/contact.html">CONTACT</a></li> <li><a href="http://www.primaryteachingresources.net/teaching%20resources/html/period_one.html">1º-2º E.P.O</a></li> <li><a href="http://www.primaryteachingresources.net/teaching%20resources/html/period_two.html">3º-4º E.P.O</a></li> <li><a href="http://www.primaryteachingresources.net/teaching%20resources/html/period_three.html">5º-6º E.P.O</a></li> <li><a href="http://www.primaryteachingresources.net/teaching%20resources/html/links.html">LINKS</a></li> </ul> Why does 'home' appear in an <lis> tag? More to the point, what is an <lis> tag? I have been a web developer for years now and I have never used an <lis> It also is probably to do with the anchor tag, try changing it to: ><a href="#">HOME</a>
  2. Unfortunately I put some money on Jade from the UK to win!!! But even more unfortunately I now have the UK and the Norwegian entries stuck in my head!!!!!
  3. This is one of the sexiest sites I have seen hosted by TCH. Nice use of the JQuery library also, clean and simple too. Nice work. Congrats on the award.
  4. You can use the 'IN' clause >UPDATE diesel SET comments='Formerly BLAH BLAH BLAH' WHERE model='NS' AND subdir='1300' AND unit IN('1304', '1308', '1313', '1345', '1374', '1387') If you want to do it truly random though you can 'group by rand()' and then limit. So if you wanted to select 5 random rows from your database you could do the following: >SELECT * FROM diesel ORDER BY RAND() LIMIT 5 for the update command using the IN clause you could do: >UPDATE diesel SET comments = CONCAT(comments, '</a>') WHERE railroad='ns' AND subdir='1300' AND unit IN('1304', '1308', '1313', '1345', '1374', '1387')
  5. Glad it worked, Niagara. Feel free to post any more questions or PM me directly. I work with MySQL everyday in a professional capacity so I 'should' be able to help if you have any further questions.
  6. try something like this: >UPDATE diesel SET comments = CONCAT(comments, '</a>') WHERE railroad='ns' AND subdir='1300' What this does is concatenate the current comment and appends </a> to the end of it. Not sure if those where clauses are the correct clauses for your use but it gives the idea of how to do it.
  7. I thought the syntax was: >SELECT REPLACE(comments, 'Formerly', 'Formerly <a href="http://www.domainname.com/cars.phtml?id="></a>') FROM cars That will show whether it will work I guess then the update code would be: >UPDATE cars SET comments = REPLACE(comments, 'Formerly', 'Formerly <a href="http://www.domainname.com/cars.phtml?id="></a>')
  8. Are you wanting to backup your personal files, or your website files?
  9. I use Mozilla Thunderbird as my client both at work and at home and nearly all of my TCH accounts I have now moved to be hosted by GMail - Even my work on my recommendation migrated our mail exchange to GMail. To be honest I don't require or use extensive folders so I can't really help on that front.
  10. I am an IMAP fiend also! Whatever accounts I can IMAP I do...
  11. I know the things you mean, you tend to get them on wordpress or blogger blogs I think. Think its some sort of plugin for the software they bug me too but I think the only way around them is probably disabling javascript in your browser. But loads of sites nowadays rely on javascript.
  12. Is your table structure definitely InnoDB? You need indexes and/or primary keys set on the table before the relation view option will appear.
  13. Yes Make sure you have set up the necessary indexes on the tables to enable the foreign key Then under the structure view of your table click on: "relation view" just above where you add new fields. You can then create the required foreign keys for the table.
  14. OJB

    Xidth And Xeight

    There is no such thing as xeight and xidth as far as I know. You say you changed them to width and height and it did change the layout, how about if you removed them completely? If you remove them and the layout does not change then they are invalid properties and aren't doing anything. The reason changing them to width and height would change the layout is because then you are applying valid width and height properties to an image without any width and height currently set.
  15. What forum software are you using?
  16. >RewriteRule ^spinland.(.*)$ http://www.spinland.$1 [R=301,L] Not sure if that would work??? I am no modrewrite expert by any means. I am actually interested in finding out the answer to this because I want to learn more about apache modrewrite.. I have a feeling a RewriteCond would be required
  17. Other than what Thomas mentioned it looks good for me in Firefox. There are however issues with other browsers: IE6 - The coloured blocks at the top are not sitting next to eachother, they are sitting below eachother. I don't think IE6 supports min-width property - not too sure on that actually. There is also a massive load of space at the bottom of the page. Google Chrome, IE7, Opera and Safari for Windows all have the massive space at the bottom of the page too. Opera also appears to have double thickness borders between your columns. I would recommend using the WebDeveloper toolbar and validating your CSS and XHTML because it will make fixing bugs much easier if your code is valid. At present there are 3 xHTML errors and 41 CSS errors.
  18. There are still people out there who use 800x600 screen resolutions, but there aren't many to be honest - I think you can find this out from google analytics of your site (if you have that) I tend to work towards 1024x768 nowadays and if I am using a fixed with I tend to aim for around 900px width with margin left and right set to 'auto'. Therefore people will smaller screen resolutions won't have TOO much scrolling to do, and those with higher resolutions will have space either side of the main block of content and it will still look OK. If you are using Firefox, get hold of WebDeveloper Toolbar, it has the capability to resize your browser to set heights/widths so you can easily check your pages in other dimensions.
  19. No problem, Sam. Good luck with it and feel free to ask anything else
  20. Hello, OK I think I understand what you were trying to do now. At the top of your PHP file just under the <?php can you paste this line of code: >error_reporting(E_ALL); This will print any errors that occur during the script in the browser as you test the script. I still think there is an error in the logic... I would change your for loop to this: > for($i=0; $i<10; $i++) { if($rowcount > $i) { echo('filename: '.$properties[$i]['filename'].'<br />'); } else { //do something else } } The only thing I have changed is: $rowcount > $i. What you were doing before is cycling through your results, then checking if $rowcount was LESS than or equal to the current value of $i. This wouldn't work and is probably the reason you are getting the output of just "filename:" I shall explain why now: Let's say for an example that your MySQL query returns 5 rows. $rowcount therefore = 5. then you start at $i = 0 $i =0 , $rowcount <= $i, (5 <= 0) ... FALSE... $i =1 , $rowcount <= $i, (5 <= 1) ... FALSE... $i =2 , $rowcount <= $i, (5 <= 2) ... FALSE... .... $i = 5 , $rowcount <= $i, (5 <= 5) ... TRUE... So now we have one that is true. But as there are only 5 rows returned there will be NO value for $properties[5]['filename'], as PHP arrays begin from 0 the $properties[5] is actually the 6th element, hence no result, hence "filename: " So from then on $i =6 to $i=9 is the same result. This I think should solve your issue.
  21. The first thing I notice is the for loop. You are first starting from element 1 in the array ($i = 1) but PHP arrays start from 0. So change that to $i = 0; Secondly you are looping through the data 9 times but you should be looping through while $i is LESS than $rowcount. So change that to $i <$rowcount; Then inside the loop you are checking to see if $rowcount is LESS that or equal to $i. I don't get what you are trying to do, surely you would want it the other way around otherwise the data you are seeking in the array will not exist. Personally I would change your for-loop to: >for($i=0; $i<$rowcount; $i++) { echo 'filename: '.$properties[$i]['filename'].'<br />'; } No need for the check against row count because the for loop does that No need for the else statement because it won't be in the loop under those circumstances. I can't see a reason why that would not work off the top of my head. Hope this helps.
  22. OJB

    Css Resize

    The only 'good' way to resize images is using a library such as the built in PHP GD library, but that is alot of work just to have an adaptable layout. As bruce says you can set font sizes to be relative too for instance: font-size: 10%; To be honest this sort of layout will usually cause more issues than benefits. I strongly suggest something with either a min-width/min-height or something fixed width because it means you won't have to keep messing about with percentages to ensure it looks fine on all resolutions in all browsers.
  23. OJB

    Css Resize

    The reason this has happened is you are using relative sizes in your CSS, not absolute.... i.e. you are using percentages of the page width and not fixed widths etc. I can understand why you would do this because you want it to expand/contract to the size of the window. The problem is that the font size and images you have used will not shrink, so whilst the elements around them are shrinking the text and the images are not, hence you get a mangled effect when you are on smaller window resolutions. My suggestion would be either: 1) Create a fixed width design that is the same size on all windows and resolutions (using absolute values e.g. width: 900px;) 2) Use min-width to specify a minimum width your elements can shrink to before stopping. This will probably result in scroll bars on smaller resolutions but at least it wont be all squished. (e.g. min-width: 40px; or min-width: 10% etc Bare in mind min-width behaves differently in different browsers and I dont know if IE6 even supports it, but there are 'hacks' out there to help.... just google IE6 min-width
  24. Surely though you are adding checks in to check the $_SERVER['HTTP_REFERER'] value in the PHP file to ensure they are coming from a link and not a direct entry in the address bar. I can't really think of a safe way of doing it without checking. I mean there are ways around HTTP_REFERER anyway as I stated so I would personally recommend spending the time to check if that contact belongs to that user. Just an example of how your method could be circumnavigated is using the web developers 'firebug' plugin for firefox. I could log in as user A from Company A, then firebug the page (editing the HTML live) and edit the links to point to a different contactid and then effectively view other company contact data... I know thats a pretty specific example but I feel it shows how easily these things can be done. As your site grows it is only going to become more complicated to introduce error checking so I would strongly recommend doing it. Sorry I can't be of any other help.
  25. To be honest you should never rely on the HTTP_REFERRER header because it can be blocked/spoofed and some browsers do not even send it. Am I right in assuming you are trying to stop users directly accessing a page and rather have them either POST to it or be forwarded there by the script? Maybe if you could explain exactly what you are trying to do I can help think of an alternative more secure way of doing this.
×
×
  • Create New...