Jump to content

arbitter

Members
  • Posts

    349
  • Joined

  • Last visited

Everything posted by arbitter

  1. Hello, I'm new to javascript and can't figure out how to do this. What I want is that there when you click on 'login', underneath it a form appears with 2 fields and a submit button. Now, I can manage the form, but I don't know how to do the javascript part... Can someone get me started please?
  2. You can always give it a try before asking I tried, and yes it is possible. I do not know if it's reliable, but it works.
  3. Thank you for the help! I'd been searching off sites for it but just couldn't find it.. Though this doesn't quite work in IE and there is a margin at the top... What I had after doing some more research: body { margin:0 0 0 0; background-color:#3f3f3f; } #main { background-color:#afafaf; width:1024px; margin:auto; } .header { height:100px; background-color:#cdaae7; } #left { width:904px; float:left; background-color:green; height:100%; position: absolute; } #right { width:120px; float:right; background-color:yellow; height:100%; position:relative; } Using this, the left-right margins are good in all the browsers. Only problem is that they aren't 100%... (Though in chrome the 'right' div is 100%, in IE it isn't.)
  4. almost 15GB of traffic is an afwul lot. My site had 88MB traffic last month, equals to 6500 hits. But ofcourse my site is nothing, it almost doesn't have content and most certainly doesn't have a lot visitors, most of my visitors come from this site Ofcourse I do not know how many visitros you have. And I don't really understand the graph; if it's displayed like this it looks as if there is no moment that you have 0 visitors? That there is a constant stream of data?
  5. This problem has perhaps been explained millions of times, I just can't find it all to work. I want a div that is in the center of the page with a height of the whole page <head> <style type='text/css'> body { margin:0 0 0 0; background-color:red; } #main { background-color:#afafaf; width:1024px; text-align:center; margin-top:0; margin-bottom:0; margin-left:auto; margin-right:auto; height:100%; position:absolute; } </style> </head> <body> <div id='main'> </div> </body> Like this, I get the whole thing (good height), but on the left-hand side of the screen. With relative instead of absolute, I only get a small, one-lined grey box (that is centered) on the top of the page. Perhaps you can also delete all the unnecessary stuff from the css? eg i don't think the body needs a set height and stuff. Thanks a lot
  6. About the hovering; If I put in in a greyish colour between the white of the ribbon and the grey from the background, it isn't really that pretty. Also, I made the ribbon in tables; so the "|" is also in a table, so if I use onmouseover it isn't that pretty eather..
  7. I guess they don't mind the photos being public. At least I hope so. It's not as if the site has dozens of visitors, and it's only for the family itself so. I don't see why they'd mind something like that And if they would really mind, I'll not make them public or I'll delete their pictures if they would like. Thanks for the tip about the hovering!
  8. Whoa this all sounds really difficult. If I use JustLikeIcarus's method, isn't it the same as only using sessions, but then much more difficult? Thanks for the tips, and I'll most certainly go search for that tutorial!
  9. Currently, the login on my site is determined by sessions. So practically each time you visit the site you have to login again. Currently it's all done with sessions, so each page contains session_start() int he beginning (not to lose the session). Now, I want to go and make it all with cookies. The problem is, I really don't know how to do this. I have a really difficult login page, but I can't just 'make a cookie' in the middle of it, can I? A cookie needs to be set before any line of html if I'm correct? So I could redirect the user to another site that makes the cookie right after he logs in, but that would mean everybody could visit that url and get a cookie. How do I do this? And if I use cookies, I can delete all the session_start()'s, and I'll only need the $_COOKIE if it is necessary to be logged in to do a certain function? Secondly; what do you guys recommend to put in the cookie? I thought making 1 cookie with only the email-address would be enough, but a tutorial I searched used multiple cookies. (In case of multiple cookies; should I compare those with each other to verify a login?) And yet another question; are you allowed to write some php handling's before you SET a cookie? For example to first check if a form was fully filled (not empty) or not, and with that in mind make the cookie or not? I'm new to cookies, I made my first one yesterday, concerning a user-choice-color, and it worked (after ages of trying only to find out it was a typo). I hope this question is not too much to ask, you can give a little description and I'll try to do it by that (though I'm very clumsy). Any help will be much appreciated!
  10. I use versio.nl, and for 12 euros a year I have a domain, 1GB diskspace, and 15GB of badwith a month And it costs 0.5€ a month + domain name
  11. You guys are all talking about things I'd never heard of
  12. wow, that I didn't notice that What didn't you notice? I didn't notice he put the ' around all the line and the " around the link, instead of otherwise
  13. I accidetally forgot to delete the ';' WHERE id='" .$_POST["id"] ."'"; But I don't get what's wrong in line 14..
  14. After WHERE id='" .$_POST["id"]; you forgot to close the apostrophes i think; make it WHERE id='" .$_POST["id"] ."'";
  15. Yeah I know.. But I'm rescripting all my pages, and then I recode it all (check everything, see if I can shorten anthing, if something is useles, if something is missing, put it in a good lay-out,..) and then it should all be better Because that was written in the beginning days of my scripting and I wanted to be sure it worked, so using $_POST[] and $_GET[] made me feel more sure
  16. Oh no I feel so stupid right now! I triplechecked all the variables, and still... Darn! Oh well, my bad guys, sorry for wasting your time, and thanks for the help!
  17. Oh my bad, I put in the wrong file here. <?php include('../header.php'); $sort2 = $_GET["sort"]; $_SESSION["sort"] = $_GET["sort"]; $sort = $_SESSION["sort"]; $_SESSION["month"] = $_GET["month"]; if(isset($_COOKIE['uploadskleur'])){ $dekleuris = $_COOKIE['uploadskleur']; $kleurachtergond= $dekleuris;} else{ $kleurachtergrond = '#cdaae7';} $kleurletter = 'white'; ?> SO no problem there I also see I mde a type in my <form>, but it is correct here. Sorry about that And at the last reply; this is weird, when i type if(isset($_COOKIE['uploadskleur'])){ $dekleuris = $_COOKIE['uploadskleur']; $kleurachtergond= 'white';} else{ $kleurachtergrond = '#cdaae7';} $kleurletter = 'white'; ?> The colour isn't white but it's also transparant... So I guess there's something wrong with my if and else... But what then?
  18. I really feel like I'm spamming this forum, with my many questions. Though I've really searched this one out, and can't find the problem. Setting the cookie is no problem, I'll give you the files: cookie.php <?php include('header.php'); ?> <for action='cookie2.php' method='post'> <input type="radio" name="kleur" value="green" /> Groen <br /> <input type="radio" name="kleur" value="blue" /> Blauw <br /> <input type="submit" /> </form> </html> cookie2.php <?php $kleur = $_POST['kleur']; $expir = time()+ 60 * 60 * 24 * 60; setcookie("uploadskleur",$kleur,$expir); ?> This is all good, because when I check my browsers cookies I see the right value. Now when I retrieve the cookie data, all goes fine too! I fI echo the cookie, I get 'green' or 'blue'. Now, I want to implement this in a file, and here's the real problem: <?php include('../header.php'); $sort2 = $_GET["sort"]; $_SESSION["sort"] = $_GET["sort"]; $sort = $_SESSION["sort"]; $_SESSION["month"] = $_GET["month"]; if(isset($_COOKIE['uploadskleur'])){ $dekleuris = $_COOKIE['uploadskleur']; $kleurachtergond= $dekleuris;} else{ $kleurachtergrond = '#cdaae7';} $kleurletter = 'white'; ?> This "$kleurachtergrond" I will use later on in the page to show which items are active. So if there's no cookie set, no problem, the second "$kleurachtergrond" shows (it's a light-purple). But If my cookie is set, it is transparant. I've tried doing it with eg #111111 , I've tried with or without apostrophes, I've tried without the semilicons ( {}, and ofcourse then I wrote one single line after the if), I've tried many possibilities, and I can't seem to get to the solution... The if(isset[blabla)) works, because I've tried it with solely echoing the cookie and that worked.. This is my first cookie, so I was delighted that my browser got a cookie from my site, and I would be even more delighted if it worked!
  19. So you are running a site that is online, and an image that is on your computer? Or am I interpreting this wrong? Any file seen on a webpage must be on the internet too.
  20. http://localhost/images/xxx.jpg
  21. It adds an escape character ('\') during data insertion/updating, but it shouldn't be visible during data retrieval. If you do see an escape character during data retrieval, chances are you have magic quotes on, which is considered a no-no (if memory serves, it should be turned off by default in PHP5, and may be completely removed from the language when version 6 is finally released). So if I type in "what/ever" it returns "what\/ever" ? Because I'm trying to implement it in my password, but the point is that my passwords get md5()'ed. And they get md5()'ed before they enter the mysql database. So should I: 1) md5() the "\" with the password, so nevertheless my passwords containing slashes work 2) leave it like this, because md5() always returns Letters and numbers...
  22. I got interested at 16/17 years of age. When I was 13 I had some 'scripting' lessons in school. It's between apostrophes because it was only working in microsoft acces. But I found it all very easy and fun, (though it was really not hard at all), but I couldn't really find any use in using acces. So years later, I got more and more on the web, and once on a day that I was browsing, just like any other, I thought to myself "Joren, wouldn't you like to make webpages?". So I looked html tutorials up in google and started making a website. While making it, I realised I'd need soms css to make my site look like something. So... I went ahead and learned (little) css. I finished the header of my site (http://www.fransdepypere.be/) and then I realised something else; with html itself you can't do anything. Because for every page, I'd have to copy my header and stuff again! I noticed a lot of sites were working with php so... I searched a littleof what that was. And I started using php very simple; only to include my header! Only then did I realise more capabilities, and so I went on. I still have a lot to learn; I only know half of css (though I'm starting to get the hang of it), I know really little about MySQL, and from all the php capabilities... I guess perhaps I know a fraction!
×
×
  • 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.