Everything posted by You
-
How much would u charge for this?
alzer81, I think you need to lose the attitude, you've asked what people think it's worth, and they have gave you their opinions. You should also learn to spell.
-
Forum Upgraded
This looks very yummy, I wasn't sure I came on the right website! Good job x
-
Session problem
Hello When someone logs in, it stores the time in $_SESSION['lastlogin'] and it collects the time they last logged in from a mysql database and works out how long ago they last logged out. When pressing logout it destroys the session and writes $_SESSION['lastlogin'] to the mysql database, but if the user just closes the window the session is destroyed without the last login time being saved to the database. I just wondered if anyone knows of a way to tackle this, is there a way to write this to the mysql database when the window is closed, or will I have to do it another way? Thanks
-
Display text from a textarea as it's written
Thanks ElanMan
-
Display text from a textarea as it's written
Hi I wondered if anyone could tell me how I would have the text typed into a textarea would be displayed below it, but not in the textarea? I think you'd need to use Ajax, it's probably really simple Thank you.
-
Custom blog - How to store comments?
Thank you so much ErisDS! Also thanks ElanMan
-
Custom blog - How to store comments?
Uhh.. internet just went off, and Notepad++ crashed, I lost everything I had. Why... why. Looks like I'm going to have to start from scratch... why would it delete it off the server? Urrghh EDIT: :D :D :D It saved it locally
-
Custom blog - How to store comments?
Ok, this is what it looks like. //Comments $comment_query = mysql_query("SELECT * FROM comments WHERE BlogID = '".$_GET['id']."'"); $row_comment = mysql_fetch_array($comment_query); while($comment = mysql_fetch_array($comment_query)) { echo "<p>".$row_comment['Comment']."</p>"; } I have 7 comment entries for BlogID 4 (not shown in picture above), and it's repeating "blog id 4" (5th entry shown above) 7 times, and I'm really not sure why. Any ideas?
-
Custom blog - How to store comments?
Thanks ErisDS, yea I know I'm terrible at explaining things which I'm not sure about... I've done what you've suggested, but I'm having a bit of trouble displaying them. $comment_query = mysql_query("SELECT * FROM comments WHERE BlogID = '".$_GET['id']."'"); $row_comment = mysql_fetch_array($comment_query); while($comment = mysql_fetch_array($comment_query)) { echo "<p>".$row_comment['Comment']."</p>"; } Can you see anything wrong here?
-
Custom blog - How to store comments?
Okay, I've done something along those lines, but I'm having trouble displaying the comments :s Probably a simple problem, I'll go and have another look. If not, I'll post on here
-
Custom blog - How to store comments?
Hello I'm making a custom blog - nothing fancy just basic and wondered about adding comments. How would I go about doing this? Would I have a separate database for each blog entry? Hopefully not, preferably I will be able to store them in the same database. What I'm looking to do (I hope this is possible) for every comment that is put into the database, for it to have an auto_increment but for each "BlogID". So, for example when "BlogID" is 1, each row entry would go up by one for where "BlogID" is 1 ONLY, so when "BlogID" is 2, each row entry would go up by one also, but not in the same sequence, if you know what I mean. I was thinking of storing in the same database, then getting the comments for each blog by doing $comment_query = mysql_query("SELECT * FROM comments WHERE BlogID = '".$_GET['id']."'"); Heh, doubt I've explained that well... but I tried Thank you.
-
PHP form, what have I done wrong?
Never mind, turned PHP errors on and found at what was wrong, had a missing ;
- CSS float column height
-
CSS float column height
Hello Basically I have 2 columns, a main one covering a majority of the width of the screen, then one floated right. When the right column has more in than the left one, it just carrys on without the content div wrapping it. Does anyone know how to do this? <div id="container"> <div id="right"> More </div> <div id="content"> Less </div> </div> #container { background-color:#ffffff; border:1px solid #cccccc; color:#333333; margin:20px 6%; height:100%; -moz-border-radius:8px; -webkit-border-radius:8px; } #right { float:right; width:220px; margin:2%; margin-left:1%; font-family:Arial, Helvetica, sans-serif; font-size:0.78em; background-color:#ffffff; } #content { position:relative; font:0.78em Arial, Helvetica, sans-serif; border-right:1px solid #cccccc; width:70%; padding:3%; } Thank you
-
PHP form, what have I done wrong?
Hello Hope this makes sense! I barely know PHP, so this is probably an easily corrected error I'm trying to make a very simple blog-type-thing. When going to the page it just displays a blank page. sql database information is stored in another file, and is included at the top of the page, $_SESSION['Username'] is also defined. Fixed Hope you can help Thank you
-
Header and Navigation Placing Problem
Thanks a lot to both of you - I've learnt a lot Glad it's finally working
-
Header and Navigation Placing Problem
Ok, great. I'll start editing it a bit now, then I'll post again when I'm done Thank you. EDIT: Ok, so problems which I'm going to try and fix. Using position:relative on #nav and not absolute means it doesn't stretch the width of the screen, which is what I wanted, but I suppose I could cope Also now all is well apart from in IE (Arrghh ) Going to have a little play around and try and fix it. EDIT2: Arrghh!! I'm too tired to be doing this, keep missing things haha. Didn't have * { margin:0; padding:0; } Working well so far thank you very much!
-
Header and Navigation Placing Problem
Haha, what am I doing rofl. Thanks a lot for that Started this last night when I was tired... wasn't the best idea seeing as I only know the absolute basics now anyway.
-
Header and Navigation Placing Problem
Ah, you're right, sorry I assumed the absolute positioning wouldn't make a difference, but the thing is, I'd much prefer if it was positioned absolutely at the top, left and right. EDIT: JohnNerush, thanks alot I'll be back tomorrow Thanks a lot to you too Ade
-
Header and Navigation Placing Problem
Ok, so I'm a little confused now, using what you told me somehow doesn't keep the height of the div "header" not sure if that makes sense... but the height is defined as 140px but now is only 120px, have any idea why?
-
Header and Navigation Placing Problem
Thanks JohnNerush, that's fixed it
-
Header and Navigation Placing Problem
Oh, maybe my ftp connection timed out, and it didn't upload to server... I'll try it your way again EDIT: nope, still the border Safari: http://i41.tinypic.com/anhfsh.png Firefox: http://i39.tinypic.com/2vwb3aw.png
-
Header and Navigation Placing Problem
Thanks, but it's still got the gap/border, any ideas? EDIT: Nevermind, I added margin-top:-2px; to #nav ul and it works cross browser now Haven't checked in IE 6 yet though, theres bound to be some problems there though, haha. Anyone have an idea how to sort out the text in #header div?
-
Header and Navigation Placing Problem
Hi, Problem fixed Thanks a lot Ade I've found a sort-of-fix for my original problem, but now I also want to have text inside the header, but if I add padding or a margin to h1, it displaces the nav bar. This is probably a simple fix by adding a separate div, however I've tried this, probably wrongly though haha, but yea.. If anyone could help me that would be great, thank you In Chrome and IE (surprisingly) it shows as I expect it to, but in Safari and Firefox there is a small gap or border in-between the header and navigation. URL: REMOVED Anyone got any ideas as to how to remove this gap? CSS #header { background:#0a0a0a url('headerbg.png'); position:absolute; top:0; left:0; right:0; width:100%; min-width:100%; height:140px; min-height:140px; } #nav { background:#ffffff url('navbg.png'); height:48px; min-height:48px; margin-top:82px; font:bold 0.82em Arial, Helvetica, sans-serif; color:#0a0a0a; border-bottom:1px solid #cccccc; } #nav ul { width:100%; min-width:100%; height:28px; min-height:28px; position:absolute; list-style:none; margin:0; padding:0; } #nav ul a { display:block; margin:0 25px; padding:16px 40px; color:#0a0a0a; text-decoration:none; } #nav ul a:hover { color:#ffffff; background-image:url('headerbg.png'); background-position:bottom; text-decoration:underline; } #nav ul li { float:left; display:inline; } #nav .current a { color:#ffffff; background-image:url('nav-bg.png'); text-decoration:none; } HTML <div id="header"> <h1>Header</h1> <div id="nav"> <ul> <li><a href="/">Home</a></li> <li><a href="">About Us</a></li> <li><a href="">Mail</a></li> </ul> </div> </div>
-
How do you make a rounded box in CSS?
Using no images, just CSS you can use: -moz-border-radius:3px; -webkit-border-radius:3px; the above code gives rounded corners to all corners, if you want just certain corners to be rounded use the code below, editing the bold. -moz-border-radius-top-left:3px; -webkit-border-top-left-radius:3px; But this is not valid CSS 2.1, but it is CSS3. Unfortunately this doesn't work in IE though.