Jump to content
Killersites Forums


  • Content Count

  • Joined

  • Last visited

Everything posted by pb1uk

  1. pb1uk

    PHP form problem

    Hi all, I'm having a complete mind blank, sure there is a very simple answer to my soloution, but i just can't find it! Basically i have a registration form. When submitting the form goes to another page to process the information. It successful the info will be entered into the database and the user is redirected to the login page. If there is a problem with the data supplied, e.g. the username chosen has already been taken the page will redirect back to the registration form. What i'm trying to do it make it so the form is automatically filled in with what the user previously entered
  2. I have experienced problems between IE and Firefox before, but not with a favicon. Can you paste the bit of code that you added that's causing a problem?
  3. Do you specifically have to do it in that way? What i would do is have it database driven and allow users to upload files to a table in the database, that would hold user id, file name and file type. You can set it up the file name so it's saved with a prefix of the users name/id. So when a user uploads a file it is saved to folder on the server and the information about the file is held in the db. Then you can query the db so a user can access their files. This way you don't have to setup a folder for each user and everything is kept seperate by saving the users id/username in the files t
  4. If i were you i wouldn't use images to create rounded corners for your div. Have a read up about css3. Most browsers support it now. I know firefox and chrome do, am pretty sure Safari does and IE 9 supports some css3, am sure it does border radius. To get you started my mate has created a site that will generate code for you, and trust me it's a lot easier to understand than using images! The link is here There is also ways you can set your css so that if the browsers doesn't support css3 then use images, but i'd not bother messing around with that and just use css3. In my view so wha
  5. From having a brief play with google unless you actually type facebook into search bo facebook pages do not appear in the search results (high up anyway). True facebook is great for letting people know about a company name and spreading the word, but at the end of the day it is very restricted in what you can actually do. It doesn't cost much or indeed take much time to create a basic site with a few pages of content. Then you can direct people from the facebook page(S) to the actual site and visa versa if you wish. There's also a lot you can do to integrate a companies site with facebook.
  6. Very basically to get you started you could use the following: <script type="text/javascript"> function addToCart(){ document.getElementById("link1").style.display='none'; document.getElementById("link2").style.display='block'; } function removeFromCart(){ document.getElementById("link1").style.display='block'; document.getElementById("link2").style.display='none'; } </script> <a href="./addToCart.php?id=1" onclick="addToCart(); return false;" id="link1">Add to Cart</a> <a href="./removeFromCart.php?id=1" onclick="removeFromCart(); return false;" id="
  7. A - change the anchor tag to "remove from cart" ; and B - change img emptychk.jpg to a different image (greenchk.jpg) C - Ideally, I would like clicking on the empty checkbox <img> (at the start of any row) to do the same thing as clicking <a href>add to cart </a> for that row. Is that possible? How could that be done? I'd probably do it by adding onclick to the add to cart link. This would then call a function that would change the link to remove from cart and could also change the image from emptychk.jpg to greenchck.jpg. Do this by putting the images into div or spa
  8. Hello all, Am continuing work on a little personal project i've had going and have encountered a few problems. Basically i'm trying to integrate google maps into my site. I've been using the this class currently as it's the best i've found for the purpose so far. Reading on the google maps documentation the way they recommend is to write the point to an xml file and then read them and send them through the api to create the map, however this won't work for me as i'm trying to use it a bit differently Very basically here's what i'm trying to do: On my site users can register.
  9. Thanks hahaha. I did try he avg function Ben (thanks for the pointer though) but couldn't get it to work. I also tried sum to add up all the numbers as well and that didn't work. Was probably my object oriented syntax that messed it up. Unfortunately Andy that tends to happen to me a lot, i start thinking about how to code up a problem and end up over thinking and overcomplicating it, hopefully over time this will improve!
  10. I've never used eclipse before. At work though i use PhpED, it can do the things you are looking for, for example you can setup a workspace and project and when you click on the function/method names if takes you there. Also when you're looking for a function to use it provides a list of the ones in your classes, i've found it very useful.
  11. I have managed to find out how to do it. Although when i had done it what i needed to do was different, but this is a start! Cheers for the point in the right directions though Andy. I have changed the code was the call states the row of the db to look in $test_rating = new Ground(); $row = "test_rating_1"; echo $test_rating->getRating($row); Then in my ground class public function getRating($row) { $total=0; //intialise total variable // select all rows except those with zero $sql = "SELECT $row FROM ground WHERE $row != 0"; $this->executeQuery($sql
  12. Hi all, I know how to do this in normal php, but putting into oo php (which i'm new to) is proving to be difficult and i'm struggling to get my head around it. Basically i have a table called ground which very simply looks like this: id name rating 1 test1 5 2 test2 2 3 test3 4 etc etc. What i want to do is to work out the average of the rating column. At the moment on the page i have <?php $rating = new Ground(); $rating = $this->getRating(); ?> then in my ground class public function getRating() { $sq
  13. Just have a read up about absoloute positioning on w3, it's quite simple. will be something like this: <style> #slide_container{position:absolute; width:??px; height:??px; top:??px; left:??px; background:url('path/to/first/pic.jpg')no-repeat;} </style> <div id="slide_container"> <!--Slideshow code in here--> </div>
  14. Excellent design, i really like it. I would know where to start with something like that! My only comment would be the links at the top of the sliding box (the one with your portfolio in for example) in the white are quick tricky to find. That's a very minor point though.
  15. What i would do is place the slideshow in a div and absolute position this where you want it on the page. Set the background image of the div to the still pic you have there already. This way if the slideshow doesn't load or someone doesn't have javascript an image will still be displayed there. Hope this works for you. Site looks very good btw
  16. In the following change top to 310px; #fadeshow1 { border: 9px double #999; position:absolute; left:75px; top:15px; width:422px; height:262px; } If you use firefox get a plug in called firebug. Means could can look at code how it's displayed in the browser and change it in real time to see how it looks. If you don't use firefox and firebug at the moment i would strongly recommend doing it. It will help you find out a lot of problems very easily
  17. Practice to be honest. Keep going. Design isn't my strong point either, i prefer and am better at the functionality more. But there are a number of good sites for design advice and tips and template sites are very good as well. I often look around for inspiration. Download some free ones and see how they're put together, i find that helps as well
  18. Wrap div tags around the slideshow and absolutely position the div within the right hand side. e.g. <style> #righthand{width:500px; position:relative; float:left; margin:0; padding:0;} #slideholder{position:absolute; left:30px; top:100px; width:200px; height:200px;} </style> <div id="righthandside"> <div id="slideholder"> <!-- code for slideshow here --> </div> </div> Change to suit your needs. Set the width and height to the width and height of the slideshow and the top and left accordingly to where you want the div
  19. The debug bar allows you to view the code as displayed in the browser and allows you to change it in the browser so you can find out and fix problems
  20. You're implying IE 6 is a decent browser!
  21. The code from css3gen also works in chrome and pretty sure safari as well, although haven't tested it in there myself. The best way to utilise this is in the css put rules so that if the border radius rules can't be used then an image is for the rounding corners. This way it'll look the same in all browsers and will be displayed in the best way possible
  22. There's a debug bar you can download from the same site that's helpful. Otherwise there's a version of firebug (a firefox extension) that can be run in IE. It is a bit fiddly compared to the firefox version, but it does still mean you can inspect the code and root out problems
  23. No problem. I used to be scared of javascript but am starting to explore it and once you start to understand things it's easy what you can do with a few simple functions
  24. Site is good for a first proper site. I would second joecool and start creating external style sheets. Will save you having to have the same chunk of code on each page. I'm no designer, but the site does have a kind of 80s/early 90s feel to it. Don't take this the wrong way, it's a lot better than the first site i ever did! For a more extensive use of fonts i'd advise using google fonts api. There are lots you can use for free and means you can have better looking fonts without having to use images. Keep it up though. What i found good was making site and after site in my free time for
  • Create New...