Jump to content

SFB

Members
  • Posts

    282
  • Joined

  • Last visited

Everything posted by SFB

  1. it will probably be there but not like "click here for the source" before the server change dcole had the fla and swf version of his games. only the swf version was linked to though.
  2. Hey dan, anything new you want me to try and work on? if anyone was wondering i made the hookup and unhook script for the truck and trailer.
  3. SFB

    problems with sessions

    I have a working login script using sessions. It works on xampp (my program to test my php files). when i transfered it to the dcole server the login worked correctly but the session did not last from page to page. I could use the session variables i set on the page i set them on but when i went to the home page, i could no longer use them. here is most of my script. <?phpsession_start();$userlogedin = false;$username = $_POST["username"];$password = $_POST["password"];require_once("userdata.php"); //include the file that contains the user records$size = count($users);for ($i = 0; $i < $size; $i++){ if (($users[$i]['username'] == $username) and ($users[$i]['password'] == $password)) { $userlogedin = true; $_SESSION['username'] = $users[$i]['username']; $_SESSION['first'] = $users[$i]['first']; $_SESSION['last'] = $users[$i]['last']; $_SESSION['email'] = $users[$i]['email']; $_SESSION['website'] = $users[$i]['website']; }}if($userlogedin){ $first = $_SESSION['first']; print "you should be loged in $first ";}else{ print"the username and password do <u>not</u> match!";}?> the login works because when i type in my password and username it gives me the message you should be loged in Charles but when i type in nothing or something random it gives me the username and password do not match! so it must be something with my sessions. I know i can use the ones i set on the page i set them on because it gave me my name in the message that said that i was loged in. but i cant use the session on my home page where i go something like <?phpsession_start();$username = $_SESSION['username'];$first = $_SESSION['first'];$last = $_SESSION['last'];$email = $_SESSION['email'];$website = $_SESSION['website'];?><?php if(isset($_SESSION['username'])){ print" Welcome $first $last | <a class='welcome' href='/login/profile.php'><div class='welcome'>Profile</div></a> | <a href='/login/logout.php'><div class='welcome'>logout</div></a> ";}else{ print"Welcome <a href='/login/newuser.php'><div class='welcome'>Guest</div></a>| <a class='welcome' href='/login'><div class='welcome'>Login</div></a>";}?> I want to figure out why this is happening only on the dcole server. the sessions work just fine for me on xampp.
  4. SFB

    Browser Discussion

    I always look back at my code and go why didn't i just do it the easy way... I really think this "band aid" idea applies to everyday life too. you should always fix what is causing the problem. never try to fix the effects of a problem. I really dislike some parts of IE and well i just say i hate IE. People ask me why and i give them a few examples. they go but those are just little things. they don't really understand from a developers standpoint how hard it is to get IE to do some things correctly.
  5. SFB

    Loginsystem

    I got another idea. go to the yabb forum. ask in the programing section. many of the people that work on the actual yabb forum also answer questions. they could probably tell you how they do the online/offline thing. I think they use perl but you could probably do it a similar way using php. here is another idea. you could use somethign like "Inactive" if the user hasnt viewed a page in the last hour or something. just make a script to check the last page view time.Edit: i just hate it when i am posting a message and someone slips their post in first. o well
  6. SFB

    Loginsystem

    I see now. that one is complicated. do you want to consider the user loged out after they leave your site? I am not sure how to do this. there is probably a way. If i were you I would just look at the time they last visited a page on your site. that would be close to the time they would log out.Edit: Try and get the source of a php forum. take a look at how they do it.
  7. SFB

    accessing a file

    obviously it isnt working... thus there must be something wrong. MOgaard will probably be like dan did you try this yet? and it will work...
  8. SFB

    Loginsystem

    ok you say the statistics remain the same. is that the same as when they were loged in? or is it the same as something else? I guess what i am confused on is what you are trying to do with your statistics.
  9. SFB

    accessing a file

    DCole.ath.cx is actually Dan. D is for dan and Cole is his last name. Dan Cole, you should really post your script even if there is no mistakes. then people cant just blame your script or your locations. It isnt hard to post a script here, just do it.
  10. just on the crazy chance that you did what dcole did, check to make sure there is a space inbetween the equals sign and your email in the php.ini file.
  11. SFB

    accessing a file

    Dan, I think you should just start all over. try to do everything an different way but get the same end result. there are many ways to do one thing. just try a different one. remake your file manager and everything but no coppy and paste!
  12. SFB

    domain register

    I know domains are never free but i was more referring to subdomains. I have a free subdomain from dyndns.com but they dont seem to have any that would go well with noreseland4h
  13. SFB

    Rounded corners...

    What would be a good color that would go with both 003399 and F0F8FF
  14. Even though it may be depreciated all the browsers i tested it in still support it
  15. SFB

    Rounded corners...

    oh yeah that was when i was working on the code. it is pretty much fixed now. just a few minor things that probably only I will notice.
  16. SFB

    scroll bar

    ok um i dont get what the problem is. my text wraps on its own. I dont have a scroll bar. It isnt set to have or not have a scroll bar any more.
  17. SFB

    problems with height in IE

    I could use javascript but then there is what if javascript is disabled. It isnt that big of deal. I got most of the bumps smoothed out of my html and css now.
  18. setting all the classes may work together and it may not but it will Not work for rounded corners. I wish i could draw a picture here but i cant. each div is a line each line gets longer then you have your main div and theneach line/div gets smaller. thats bassically how the rounded corners workso if you only had one div with all the classes set at onec you would have a corners that has just one px missing.
  19. SFB

    problems with height in IE

    My therory is that IE has some problem setting the height of the div because the height of the tabel and td it is in are precents. if i set a specific height for the td (in px) then the div is the corect height. the position relitive mad no difference the position absolute mad everything end up sitting ontop of eachother.Edit: when one thing works in FF it doesnt work in IE. When one thing i try works in IE It Makes it display wrong in FF.Theory #2 When the page is loading it decides the height of the td from the div inside(even though it should be a % of the table) then it goes to the next div inside and it is like oh no the td is too small. now insted of adjusting the previous div too it just makes the td size adjustment then moves on.Theory #3 IE tried to change W3 standards but forgot that it couldnt.Edit #2: I got it working 95%. the only major thing is that in IE it scrolls and in FF it places a scroll bar there but it scrolls only half a line. if i could i would like to remove the bar in FF. I wish there was some sort of way for php to dectect the type of browser the user has.
  20. I was working on a websit for my 4H. I just need a domain or a subdomain that works with norseland4h. I would like to have something like http://norseland4h.com or .org. if it was a subdomain i would like it to be something like http://norseland.fourh.com or norseland.4h.com or something that relates to 4h. I would prefer something that is free but the club would be willing to pay some money for a domain
  21. I have a problme with <?phpsession_start();$username = $_SESSION['username'];$first = $_SESSION['first'];$last = $_SESSION['last'];$email = $_SESSION['email'];$website = $_SESSION['website'];$style = "/Program Files/xampp/htdocs/test/style.php";$snav = "/Program Files/xampp/htdocs/nav/snav.txt";$bnav = "/Program Files/xampp/htdocs/nav/bnav.txt";?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html><head> <title>Snow Fort Builders -- Home </title> <meta name='keywords' content='Snow Fort, snowfort, snow fort builders, snow, fort ' /> <meta name='description' content='Learn how to build snow forts just like mine, see pictures of my snow forts and other winter related activities' /> <meta name='robots' content='all' /> <meta http-equiv='content-Type' content='text/html charset=ISO-8859-1' /><?php include($style); ?><base href='http://snowforts.ath.cx/' /></head><table> <tr> <td class='title'> <div class='header'>Snow Fort Builders</div> </td> </tr> <tr> <td class='title'> <div class='url'>http://snowforts.ath.cx</div> </td> </tr> <tr> <td class='welcome'> <div class='welcome'><?php if(isset($_SESSION['username'])){print" Welcome $first $last | <a href='/login/profile.php'><Profile</div></a> | <a href='/login/logout.php'><div class='welcome'>logout</div></a> ";}else{print"Welcome <a href='/login/newuser.php'><div class='welcome'>Guest</div></a>| <a class='welcome' href='/login'><div class='welcome'>Login</div></a>";}?></div> </td> </tr> <tr> <td class='middle'> <div class='snav'> <div class='r6'> <?php include($snav); ?> </div> </div> <div class='content'> <div class='scroll'> <div class='bold'>Home</div><br /><br /> <div>Snow Fort News</div><br />The end of snow fort building season has ended! Last year was not very good for snow forts. January and Febuary were too warm and we did not recive much snow. In march we recived over a foot of snow but I felt like making a sleading track insted. <br /><br /> <div>Updates </div><br /> <div>XHTML</div>--This site is now Valid XHTML<br /> <div>New photos</div>--I added some pictures of my snow forts form before 2003<br /> <div>Contact Us</div>--I got the Contact page working again.<br /> <div>Settings</div>--You can choose the colors as well as some preset settings.<br /> <div>Message Board</div>--Added style tags and improved display in Internet Explorer.<br /> <div>Loading Time</div>--decreased loading time by removing statcounter<br /> <br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br /> </div> </div> </td> </tr> <tr> <td class='bottom'> <div class='bnav'> <div class='rtop'></div> <div class='r2'></div> <div class='r3'></div> <div class='r4'></div> <div class='r5'></div> <div class='r6'> <?php include($bnav); ?> </div> <div class='r5'></div> <div class='r4'></div> <div class='r3'></div> <div class='r2'></div> <div class='rbottom'></div> </div> </td> </tr></table></body></html> dynamic stylesheet(php) <?phpif(isset($_COOKIE['background'])){$color = $_COOKIE['background'];$color1 = $_COOKIE['tdbg'];$color2 = $_COOKIE['links'];$color4 = $_COOKIE['title'];$color5 = $_COOKIE['text'];}else{$color = "F0F8FF";$color1 = "039";$color2 = "F0F8FF";$color4 = "039";$color5 = "F0F8FF";}print <<<STYLESHEET<style type="text/css"> body { font-family: verdana, arial, sans-serif; font-size: small; background-color: #$color;}table { margin-left: auto; margin-right: auto; height: 90%; width: 80%;}td.title { text-align: center;}td.welcome { text-align: right;}td.middle { text-align: left; vertical-align: top; height: 100%}td.bottom { text-align: center; width: 100%; height: auto;}div.snav { float: left; padding-right: 5px; width: 25%; height: 100%;}div.content { font-size: small; width: 75%; height: 100%;}div.bnav { font-size: small; height: 100%;}div.rtop { display: block; overflow: hidden; height: 1px; font-size: 1px; background: #$color1; margin: 0px 5px;}div.rbottom { display: block; overflow: hidden; height: 1px; font-size: 1px; background: #$color1; margin: 0px 5px;}div.r2 { display: block; overflow: hidden; height: 1px; font-size: 1px; background: #$color1; margin: 0px 3px;}div.r3 { display: block; overflow: hidden; height: 1px; font-size: 1px; background: #$color1; margin: 0px 2px;}div.r4 { display: block; overflow: hidden; height: 1px; font-size: 1px; background: #$color1; margin: 0px 1px;}div.r5 { display: block; overflow: hidden; height: 1px; font-size: 1px; background: #$color1; margin: 0px 1px;}div.r6 { background: #$color1; font-size: small; overflow: auto; height: 100%; display: block; padding-right: 5px; padding-left: 5px;}div.scroll { background: #$color1; font-size: small; overflow: auto; height: 100%; display: block; padding-right: 5px; padding-left: 5px;}a.snav:link, a.snav:active, a.snav:visited { text-indent: 10px; vertical-align: top; font-size: small; color: #$color2; text-decoration: none;}a.snav:hover { text-indent: 10px; vertical-align: top; font-size: small; color: #$color2; text-decoration: underline;}a:link, a:active, a:visited, a:hover { text-decoration: underline; color: #$color2;}div.bold { color: #$color5; font-size: small; font-weight: bold; display: inline; }div.header { font-family: Comic Sans MS, arial, verdana, sans-serif; font-size: 50px; font-weight: bold; display: block; text-align: center; color: #$color4;}div.url { font-family: Comic Sans MS, arial, verdana, sans-serif; font-size: 20px; font-weight: bold; display: block; text-align: center; color: #$color4;}div.welcome { font-size: small; color: #$color4; display: inline;}div { font-size: small; color: #$color5; display: inline;}</style>STYLESHEET;?> edit: fixed link to ie screen print
  22. SFB

    accessing a file

    Nope that isnt the only thing... dcole has bad luck
  23. SFB

    Rounded corners...

    I didnt see what was wrong with it in IE6 I want that scroll bar there if that is what you are talking about.
  24. I dont think php can detect the screen resoultion. it is a server side script. you should just use javascript. is there a reason you have to do it in php?
  25. SFB

    Rounded corners...

    they are different!this is a compleatly different topic. If i didnt have rounded corners it wouldnt even relate to this. my problem would still occur without the rounded corners. my problem is with tables and divs more than rounded corners. I have rounded corners down but the div inside of the table is what is bothering me.
×
×
  • Create New...