Jump to content

chwebdesigns

Members
  • Posts

    73
  • Joined

  • Last visited

About chwebdesigns

  • Birthday 04/16/1994

Contact Methods

  • Website URL
    http://www.chwebdesigns.co.uk

Profile Information

  • Gender
    Male
  • Location
    UK

chwebdesigns's Achievements

Member

Member (2/5)

0

Reputation

  1. Hmm thanks for that info - need to start checking compatibility in chrome I think! Will have to look into all of the coding then and decide where the problem lies, whether it's in CSS / HTML / PHP or a mixture of all 3! Thanks for the help Cal
  2. This is just a guess at what you mean by properly! But how about: background-color: white; background-image:url(blueGradient.png); background-repeat:repeat-x; background-position: bottom left; Also just a suggestion, it is normally better to define a style in a .css file as a class (e.g. tr .background ) and then have the code <tr class="background"> Hope this helps a bit, Cal
  3. How strange, This problem is happening in IE9 but after double checking in firefox, I've realised that the opposite occurs in Firefox, as it is stopping the horizontal scroll before all of the pictures are there. Thanks, Cal
  4. Hi, Thanks for the reply. The website is online at www.catherinelaura.com/pages/portfolio from there, there are 3 seperate galleries each gallery has the same coding and each has the same problem (they are the same page, just witha different ?id=xx value) Thanks, Cal
  5. Hi, I have no idea why this problem is happening, so was wondering if anyone could help? I have a PHP script pulling images from a flickr account and displaying them on my website. The images are set so that they appear in a horizontal scroll box which fills the width of the page content. However, when the page is first loaded, there is a load of blank space at the end of the scroll box, making the scroll box continue, on the page refresh/reload this blank space disappears and the total width of the scroll box is just that so all of the images fit in. I hope this makes sense? Any ideas? The relevant parts of the CSS coding are as follows: #streamcontainer {white-space: nowrap;height: 360px;}#photostream {width: 670px;height: 365px;overflow-x: auto;overflow-y: hidden;white-space: nowrap;} I have also included below the relevant HTML and PHP Coding incase this helps at all? <div id="photostream"> <div id="streamcontainer"> <?php $flickr = getSet($theSet); ?> </div></div> <?php function getSet($which) {global $user;global $apikey;$method = 'flickr.photosets.getPhotos';$params['user_id'] = $user;$photoCollection =& new DOMIT_Document(); $request_url = 'http://www.flickr.com/services/rest/?'; if (empty($params)) $params = array();$params['api_key'] = $apikey;$params['method'] = $method;$params['photoset_id'] = $which; foreach ($params as $var => $val) { $var = urlencode($var); $val = urlencode($val); $request_url .= "&$var=$val"; }$safe_return = getFileContents($request_url);$response = $photoCollection->parseXML($safe_return);$photos =& $photoCollection->documentElement->getElementsByTagName("photo");$total = $photos->getLength(); for ($i=0; $i<$total; $i++) { $currImg =& $photos->item($i); $id =& $currImg->getAttributeNS($URI, 'id'); $server =& $currImg->getAttributeNS($URI, 'server'); $secret =& $currImg->getAttributeNS($URI, 'secret'); echo "<a href=\"http://static.flickr.com/".$server."/".$id."_".$secret.".jpg\" rel=\"lightbox[flickr]\" title=\"".$id."\" name=\"$user\"><img src=\"http://static.flickr.com/".$server."/".$id."_".$secret.".jpg\" alt=\"Catherine Laura Photography\" class=\"photo\" /></a>";}} ?> Any help or ideas are much appreciated - as I am absolutley stumped on thoughts now! Many thanks in advance, Cal
  6. Hi, I have no idea what is causing the problem, so any help or ideas would be greatly appreciated. I am using a 3rd party script to connect the website to a flickr account and pull the images from there. The images then appear in a css defined <div> area with a scrollbar across the bottom. This works fine, however when the page is first loaded there is a load of blank space at the end of the scroll area, however once the page has been refreshed or reloaded this blank space disappears. I don't want the blank space to appear as it looks like the images haven't fully loaded when they have. As I am not sure what is causing the problem I have included the PHP Code, HTML Code and relevant CSS snipets. Any help or ideas are much appreciated! Many thanks, Cal 1) PHP Function to get the relevant set from flickr function getSet($which) { global $user; global $apikey; $method = 'flickr.photosets.getPhotos'; $params['user_id'] = $user; $photoCollection =& new DOMIT_Document(); $request_url = 'http://www.flickr.com/services/rest/?'; if (empty($params)) $params = array(); $params['api_key'] = $apikey; $params['method'] = $method; $params['photoset_id'] = $which; foreach ($params as $var => $val) { $var = urlencode($var); $val = urlencode($val); $request_url .= "&$var=$val"; } $safe_return = getFileContents($request_url); $response = $photoCollection->parseXML($safe_return); $photos =& $photoCollection->documentElement->getElementsByTagName("photo"); $total = $photos->getLength(); for ($i=0; $i<$total; $i++) { $currImg =& $photos->item($i); $id =& $currImg->getAttributeNS($URI, 'id'); $server =& $currImg->getAttributeNS($URI, 'server'); $secret =& $currImg->getAttributeNS($URI, 'secret'); echo "<a href=\"http://static.flickr.com/".$server."/".$id."_".$secret.".jpg\" rel=\"lightbox[flickr]\" title=\"".$id."\" name=\"$user\"><img src=\"http://static.flickr.com/".$server."/".$id."_".$secret.".jpg\" alt=\"Catherine Laura Photography\" class=\"photo\" /></a>"; } } 2) HTML Code to display photos <div id="photostream"> <div id="streamcontainer"> <?php $flickr = getSet($theSet); ?> </div> </div> 3) CSS Code for Containers #streamcontainer { white-space: nowrap; height: 360px; } #photostream { width: 670px; height: 365px; overflow-x: auto; overflow-y: hidden; white-space: nowrap; } Thanks again!
  7. Many thanks @phpfreak , has worked now Also @Christian F. it is a slight mix between the 2 really, it is intendented slightly different in my code editor, but I know they aren't the best indentations!! Thanks, Cal
  8. Hi, When I try and execute the following PHP code, I get the following error message: What I am trying to do is 'copy' the data from a mysql table back into the same table but with one of the fields with a different number, if that makes sense? The PHP code I am working with which brings the error message is: include("../setup/dbconnect.php"); $sql = "select * from classes where term='$import'"; #execute the query $conn = @mysql_query($sql ) or die("Could not execute query"); while ($row = mysql_fetch_array( $conn ) ) { $day = $row['day']; $time = $row['time']; $grade = $row['grade']; $teacher = $row['teacher']; $sqlvalues = "('$day', '$time', '$grade', '$TermID', '$teacher')"; $sql2 = "insert into classes (day,time,grade,term,teacher) values $sqlvalues"; include("../setup/dbconnect.php"); #execute the query $conn = @mysql_query($sql2 ) or die(mysql_error()); if ($conn) { echo"<br />Classes Copied"; } } Any help will be much appreciated. If you need any more info just let me know. Many thanks in advance, Cal
  9. I have been thinking and thinking about it and still I am not getting anywhere. Obviously what will tell me that I have reached a new class by just looking down the list is when the class_assignment number changes Thanks
  10. Thanks for the quick reply I am wanting the output to be in a table for example. So if I order by class_assignment that will list all classes in the one table, where each class needs to be in a separate table on the page, so is there a way of splitting the data up like this? Thanks, Cal
  11. Hi, I am writing a class application, where students are assigned to a class in a mysql database such as: id student_name class_assignment 001 A Student 1 002 B Student 2 003 C Student 1 004 D Student 1 .... etc. what I want to be able to do is print a table off for each class. I know I could do this individually with an sql such as <?php $sql = "SELECT * from classes where class_assignment='1'"; ?> But what I would like to be able to do is 'report' class 1 register have a page break, then class 2 register etc. in one click - I am unsure at the moment how many classes there are going to be. Is this possible? Hope this makes sense? Many thanks in advance, Cal
  12. Many thanks, Just what I needed
  13. Hi, I don't have a lot of experience with mySQL and SQL commands. Here is my command on which I am working on: $sql = "SELECT * from shop_products where subcat='$cat' order by id asc"; This part of the code works fine. However I want to include to WHERE parts in the sql statement. I have tried this, however I come up with an error saying that it cannot execute the query: $sql = "SELECT * from shop_products where subcat='$cat' where shown='1' order by id asc Any ideas would be appreciated. Many thanks
  14. Hi, I have a PHP code which searches a mysql database. And then shows the results. However, I want the code to search multiple columns and then show which column it comes from. An example of the table called $table: Gold Silver Bronze J Smith A Jones C Holmes and i used the php code to select it from a single column rather than searching multiple columns: <?php $sql = "SELECT * from $table where gold like '%$name%' "; ?> Hope that this makes sense. Thanks in advance
  15. Where you have the code <form action='upload.php' you need to specify the album id again. So it will be something like <form action='upload.php?album=$albumid' method='post' Hope this helps Cal
×
×
  • 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.