Jump to content

GalaxyTramp

Members
  • Posts

    59
  • Joined

  • Last visited

Everything posted by GalaxyTramp

  1. Try something like Magpie http://magpierss.sourceforge.net/ GT
  2. Yeh got there at the same time as you with the loop Thanks for your help GT
  3. Thanks for your response. Your code results in only one image being displayed in each of the columns! GT
  4. Hi I have a page which returns 2 rows of images max 5 in each. Code is: <?php $query = mysql_query("SELECT COUNT(id) FROM " . $prev . "pics where id=" . $id . ""); list($number_records) = mysql_fetch_row($query); if ($number_records >= 10 ) { $number =10; //LIMIT IMAGES TO 10 } else { $number =$number_records; } echo "<br />"; echo "Displaying $number of $number_records images"; ?> <div class="thumb-right"> <dl> <?php for ($i = 0; $i < 5; $i++): ?> <dt> <img src="../pics/<?php echo $images[$i]; ?>" alt="" width="120" height="120" class="border1" /><br /><br /> </dt> <?php endfor; ?> </dl> </div> <div class="thumb-left"> <dl> <?php for ($i = 5; $i < $number; $i++): ?> <dt> <img src="../pics/<?php echo $images[$i]; ?>" alt="" width="120" height="120" border="0" class="border1" /><br /><br /> </dt> <?php endfor; ?> </dl> </div> This works fine if there are 10 images to display, but on occasions there may only be 7 for instance. This then puts 5 in the right column and only 2 in the left column which looks ugly. Can someone suggest a way of calculating the total number of images and then displaying them say 4 in the left column and 3 in the right column for this example? Thanks for your time GT
  5. Can we see the rest of your code GT
  6. I strongly disagree with iridy saying CSS is more trouble than its worth. Get it right and it works cross browser, is easy to update, gives absolute positioning the list goes on. The advantages are immense compared to tables. I am not sure what you mean by "side by side vertically" either?? If something is side by side then surely that must be horizontally? Without seeing what your include files contain it is difficult to offer an opinion on this because they could be breaking the table structure. GT
  7. Hi Why are you using tables at all when you can, and should be, using just CSS for your layout? GT
  8. Do you have errors and warnings set to display on the server or on your page? ini_set("error_reporting","E_ALL"); GT
  9. Errors or Warnings?? Give us something to work on. GT
  10. I have to agree with the others #3 looks the best of the lot to me. GT
  11. I support Thorpe on this, get a better host. If your hosting does not do, or cannot be configured to do, what you want then find another package somewhere that will. It is a lot easier to do this than have to code your site to allow for the inefficiencies or strange configs of a particular webhosting package. GT
  12. Hi Dave RewriteEngine On RewriteRule ^projector/$ /item.php?id=100 [L] Will output in the browser address bar as: http://mywebsite.co.uk/projector/ So basically if a page starts with ^projector rewrite it to /item etc. The $ sign denotes the end of the string to be matched and [L] tells Apache to stop here if rewrite conditions are met. So links on your site to http://mywebsite.co.uk/projector/ would be rewritten on the server to http://mywebsite.co.uk/item.php?id=100 You can find several online tools to achieve this such as http://www.generateit.net/mod-rewrite/ No point in reinventing the wheel so google mod rewrite and you will find plenty of tutorials explaining the intracacies of this method. GT
  13. You have 2 options here I think. 1. Ask your host to explain how to do this step by step. 2. Find some better hosting for your site, with CPanel or Plesk which makes all this stuff a piece of cake. I think I would most certainly take the latter option. GT
  14. The MySql administrator interface is already connected to the server. You just need to use it to manipulate the MySql database. From your previous post I see you have a table called "newtblee" with "0" records but what is the name of the database schema this is contained in?
  15. Seems likely that you do not have CPanel or Plesk. What you need to do is check in the MySql administrator that your table "people" exists, what the name of your database is and what the password is. This may be of use: http://www.ghacks.net/2009/12/09/creating-a-database-with-mysql-administrator/
  16. If you login to CPanel you will be able to access phpmyadmin and to setup MySql databases. Are you sure that you have CPanel on the server?? Who are you hosted with?
  17. Hi Do you have CPanel or Plesk on the server?
  18. if(($file !==".") and ($file !=="..")) GT
  19. Where does the variable ($db_name) get a value from?
  20. You might want to convert the string to lower case or this will not work if user enters email address in upper case $bcc_address = strtolower('HELLO@BOBEMAIL.info');//Convert string to lowercase if(preg_match("/@bobmail\.info/i",$bcc_address)) { $bcc_address = ','; $subject = 'Bobmail email was blocked! Voucher unclaimed!'; }
  21. <?php $prod_new="yes"; ?> <input name="change_img" type="checkbox" class="mycheck" id="change_img" value="yes" <?php if($prod_new=="yes"){echo" checked";}?> />
  22. And with the braces: $upload_path ="'../images/{$file_name}'"; :-\
  23. $upload_path = '../images/$file_name/'; will return something like: ../images/my-image.jpg/ why have you got the extra slash on the end? $file_name="my-image.jpg"; $upload_path ="../images/$file_name"; echo $upload_path returns: ../images/my-image.jpg You do not need the curly braces?? Hope this helps
  24. Hi John You have an error in the code it should be $upload_path = '../images/$file_name/'; and not $upload_path = ',,/images/$file_name/'; Does this only occur here and not in your page code? Can we see the rest of the query so its possible to see where $file_name gets its value from.
  25. http://http:// duplication
×
×
  • 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.