Jump to content

Ninjakreborn

Members
  • Posts

    3,922
  • Joined

  • Last visited

Everything posted by Ninjakreborn

  1. I found out what I needed, I just have a question. How can I record the height of an element (for instance: div) using javascript.,  I need to trap the height of a div into a variable to use with some calculations, how do I do this?
  2. [code] function autodivheight (div1, div2) { var divheight = document.div.getElementById('div1').style.height; document.div.getElementById('div2').style.height = divheight; //var divtochange = document.getElementById('div1').style.height; //document.getElementById('div2').style.height = div1; } </script> </head> <body onload="autodivheight (leftnav, rightcontent);">[/code] It's telling me expected object or something, unexpected object. Am I referencing my div's wrong, those are the id names for the div's I also tried with the .div.
  3. For the 2nd problem I found out it's called Equal Height CSS Columns I don't understand a way to do this without something tricky.  So far I have been able to get things under control.  But these 2 problems are still bugging me, for one does anyone know of a way to fix this.  To make them equal just using CSS, with no background images.  Because currently I have it with a background color, I am going to add a border as well, but I was wondering if there's  a way to make it extend down to the footer?
  4. actually I didn't notice that but he's right.
  5. [code]<?php ini_set('error_reporting', E_ALL); ini_set('display_errors', 'On'); include("dbconnection.php"); $customerID=$_GET['customerID']: $firstname=$_GET['firstname']; $lastname=$_GET['lastname']; $address1=$_GET['address1']; $address2=$_GET['address2']; $city=$_GET['city']; $state=$_GET['state']; $zip=$_GET['zip']; $email=$_GET['email']; $referral=$_GET['referral']; $promo=$_GET['promo']; $lubricant=$_GET['lubricant']; $query="UPDATE customers SET firstname='$firstname', lastname='$lastname', address1='$address1', address2='$address2', city='$city', state='$state', zip='$zip', email='$email', referral='$referral', promo='$promo', lubricant='$lubricant' WHERE customerID= '$customerID'"; odbc_exec($cnx, $query); echo "Record Updated"; odbc_close(); echo "Debug Info:"; echo $query; echo "<br />"; echo $firstname; echo "<br />"; echo $lastname; echo "<br />"; echo $address1; echo "<br />"; echo $address2; echo "<br />"; echo $city; echo "<br />"; echo $state; echo "<br />"; echo $zip; echo "<br />"; echo $referral; echo "<br />"; echo $email; echo "<br />"; echo $promo; echo "<br />"; echo $lubricant; echo "<br />"; echo $customerID //header("Refresh: 2; URL=http://www.sliquid.com/protected/adminLogin.php"); //echo " "; // NN4 requires that we output something... //exit(); ?>[/code] backup your old code and try the above.  Tell us what it say's/
  6. Based on my original css knowledge, it went up almost 85 percent, within the past 4-5 day's.  I got a subscription online to safari books, infinite reading, permanent resources. At this point after reading over halfway through css the missing manual, I have learnt a lot.  I started learning how to do shorthand, decendent selector's, making coding quicker, faster, and more cross browser compatible.  Atleast 45 percent overall of the browser problem's I use to have I found out are easy to overcome with knowledge. I ran into one problem I was unable to figure out.  I was reworking a lot of the css on my website www.freelancebusinessman.com starting with getting it looking like the original template, and frmo there making modifications based on advice from critique.  Right now I redid a lot of the coding, to match what I had learnt, making it more readable, and better looking, and actually better functioning and easier to mantain. A this point, when I was redoing part of the css for the logo, I decreased the width and height, and got it almost perfect, I redid the css for the footer nav, and made it a lot better looking. At this point I have the footer set to a height of pixel's.  It looks perfect(almost 99% like I want it in firefox and opera, but in internet explorer, it's not showing the right height.  I also learnt about the thing where sometimes margins, or padding I Don't remember can either 1. collapse, or 2 get combines, that helped most of my issue's I was having, this one isn't seem to be related to that.  any advice [code]body { /* Body Styles */ margin:0px; padding:0px; background-color:#FFFFFF; color:#000000; } #header { width:100%; background-color:#f2faf5; color:#000000; height:25%; float:left; } #leftnav { float:left; width:19%; height:75%; background-color:#f2faf5; color:#000000; overflow:visible; } /* left nav links */ #leftnav ul { padding-left:5px; list-style:none; } #leftnav a:link { background-color:#f2faf5; color:#006600; } #leftnav a:visited { background-color:#f2faf5; color:#333300; } #leftnav a:hover { background-color:#f2faf5; color:#003300; } #rightcontent { background-color:#FFFFFF; color:#000000; height:50%; width:70%; float:left; } #footer { background: url(../images/bottombar.gif) repeat #FFFFFF; color:#FFFFFF; width:99.3%; height:29px; text-align:right; float:left; border-left: medium solid #cccccc; border-right: medium solid #cccccc; border-top: thick solid #cccccc; border-bottom: thick solid #cccccc; } /* footer links */ #footer ul { list-style-type:none; margin-top: 2px; } #footer li { display:inline; } #footer a:link { color:#FFFFFF; } #footer a:visited { color:#666666; } #footer a:hover { color:#CCCCCC; } /* Quick styles */ .bold { /* Specific text in left nav that needs bolded */ font-weight:bold; font-size:0.9em; } h1, h2, h3, h4, h5, h6 { background-color: #f2faf5; color: #000000; font-family: "Courier New", Courier, monospace; } /* Style related to links spread throughout pages */ .links { list-style:none; } .links a:link { background-color:#FFFFFF; color:#006600; } .links a:visited { background-color:#FFFFFF; color:#333300; } .links a:hover { background-color:#FFFFFF; color:#003300; } .links2 a:link { background-color:#FFFFFF; color:#006600; } .links2 a:visited { background-color:#FFFFFF; color:#333300; } .links2 a:hover { background-color:#FFFFFF; color:#003300; } /* For displaying code */ .specialtext { font-size:12px; background-color:#999999; } /* End displaying code */[/code] Edit - also I noticed my left nav, doesn't go down all the way to the footer, I need the actual background color, and border I am going to create to go all the way down to the foot of the page, is there a way to do this with css? if so how?
  7. I finally started tryign to get into shorthand and have a bad experience with it first thing. I tried turning this [code]h1 { font-size:1.5em; background-color:#f2faf5; color:#000000; } h2 { color:#000000; font-size:1.3em; background-color:#f2faf5; } h3 { color:#000000; font-size:1.2em; background-color:#f2faf5; } h4 { color:#000000; background-color:#f2faf5; font-size:1.1em; } h5 { color:#000000; background-color:#f2faf5; font-size:1em; } h6 { color:#000000; background-color:#f2faf5; font-size:0.8em; } [/code] into [code]h1 h2 h3 h4 h5 h6 { color: #000000; background-color: #f2faf5; }[/code] The problem nwo though is, with the long drawn out style's it put's a background color with all of them, with this it doesn't put a background color with any of them.
  8. ok, that will work.  Thanks again.
  9. It sound's to me like a server configuration. if your on a shared host, could it be something strange, maybe you picking up information on another website or something.  Very strange. might be a hacking attempt also next time don't use cap's for the title it's against the rule's
  10. Oh I didn't realize what you wanted.  I question whether this is possible.  If it's going to your server email, I would guess set up a cron job 30-46 minutes after the email come's in to open all your email's or a bot with access information, I really have no idea.
  11. I want to restrict a directory where no-one can get into it from the browser.  Certain folder's however, when restricted using htaccess don't work.  Like my include's or other related folder's.  I was wondering if I go ahead and just put an index.php page in every directory, including CSS, atleast that will prevent them from going to the directory and getting a directory view of the folder along with server information.  I know how to stop them from going to htaccess, and php.ini and also how to restrict file's if needed, like important documentation. Ok so images, I tried restrictiing it, no images appear on the page. So I can just create an index.php page in there that say's, You are not allowed to directly view this directory. Then the include's, I tried it but don't remember the results. The css pages where the same though they couldn't be pulled into the page. Ok, in my folder I am using for my framework I have master/ inside it there's css, javascript, includes, config, portable and a few other folder's. I wanted to atleast keep people from going to www.domainname.com/master and getting into a directory to see all the file's and structure.  So do I just put a protection file into each one.  also if I block off the whole folder, so they can't call specific pages.  I don't want them trying to pull up anything under /master/config because in there are all my functions, and system file.  ANy ideas?  At that point if they open my config file, and start feeding it variable's, who knows.  NEver thought about that, any advice?  Thanks?
  12. I was already fully aware of that specific point.  The thing I was wondering, whether someone use's mysql_real_escape_string or addslashes is subject to opinion it seems most of the time. What I was wondering is, aside from whether you choose A. mysql_real_escape_string() B. add_slashes() is there something else, or some other things you can use along with A or B that can make it even safer? Than just using A or B alone.
  13. Ok. thanks for the advice. I will keep these both in mind. Thanks again.
  14. I have rewritten a huge skeleton for a framework. My own personal portable framework I am reusing in all my projects. Some of the first few functions I came up with I intended to deal with some issue's i was running across.  I find myself fiddling with php.ini sometimes.  So I wrote some functions to deal with these, I was wanting to get some advice on these, or ideas on increasing functionality of these functions.  Or if someone thinks these are faulty what they would suggest. THe first takes a number.  When the number is taken, it put's it into the case switch statement. when I first start up it defaults at error(5); so I can see all errors then when I am done, I change it to error(0) which automatically set's it all back to the securest settings. The second function is what I use with databasing. I get tired of cutting off magic quote's, and I alway's like working with that off, so I can do it myself, I had issue's with it in the page, so with this, I end up having it do just that. When I pass inisettings("safe"); it turns off the magic quotes, and make's sure that register globals is off, it start's off at that value if for some reason I needed the register global's on for a 3rd party(don't normally use them), then I can just pass inisettings("no"); well tehcnically there's no point for the other so I will probably take that off later.  But for now, this is the general idea [code] <?php // The following function set's the level of error display.  function error($elevel) { switch ($elevel) { case 0: error_reporting(0); // off ini_set('display_errors', 'Off');     ini_set('log_errors', 'On'); case 1: error_reporting(E_ERROR | E_WARNING | E_PARSE); // simple running errors case 2: error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); // most errors case 3: error_reporting(E_ALL ^ E_NOTICE); // all except notice, php.ini default case 4: error_reporting(E_ALL); // all errors case 5: error_reporting(E_ALL | 'E_STRICT'); // all with strict } } // This can be set to safe or not, safe makes the safest php.ini settings // not, does not. function inisettings($inisettings) { switch ($inisettings) { case "safe": ini_set("magic_quotes_gpc", 0); ini_set("register_globals", 0); case "not": ini_set("register_globals", 1); } } ?> [/code]
  15. hmm ok. This should help me make things more re-usable, and less work. Thanks again.
  16. I am writing up a function, I can use on all variables before database entry. It's definitely going to perform mysql_real_escape_string() I had a few questions about it first. I have been using it awhile but never really saw anything beyond what they say on php.net 1. I know it escape's some things but does it escape everything that addslashes does.  Everything? 2. When it comes down to the functionality, is there anything safety related that mysql_real_escape_string doesn't do.  Meaning are there other function's I can run a variable through along with mysql_real_escape_string() to make them even safer?  If so like what? 3. Would mysql_real_escape_string allow html to get put through, the reason I am wondering, is I am going to have 2 functions.  One will just purge anything bad from it, the secnod is also going to strip all xhtml, css, and check for php programming, or javascript.  It's goign to test the variable for a lot, to make sure it's not got anything in it.  I was wondering though does mysql_real_escape_string do this, or wuold I have to do all of that seperate.  Because i wanted my one function to be ran through mysql_real_escape_string and whateverelse you suggets, but I wanted to be able to store xhtml or whatever else in the db when it come's to another function I would take care of all of that. Any advice/feedback would be appreciated.
  17. That solved a shitload of problems. Now what about using this for css and image names. like I tried <link rel="stylesheet" type="text/css" href="<?php echo $docroot; ?>/css/global.css" /> I tried that and it didn't work, it wasn't reading the style's why. That's not what I was originally using it for, but it was idea, unless you don't think it's worth the time? I was going to try the same thing for javascript, and css. IS that going to work, or are there going to be different affect's with those.
  18. Thank's that's just what I needed.
  19. I never had this problem With includes.  I have my config.php and a few include's on it The thing I don't get, when it's connected to the root directory pages it works, but now I am starting to get inclusion errors when adding it to processor's in the processor folder I have my general include like this for the root folder's [code]<?php require_once './master/config/config.php'; ?>[/code] Now on my config page I have one's like [code]// Handling php security issues include './master/config/functions/security.inc.php'; // include file with security functions error(5); // function to set error level, defaulted to all and strict. inisettings("safe"); // include master function controller include './master/config/functions/master.inc.php'; [/code] The current problem though, this all work's properly with the other.  It come's down to the fact that there are a few problem's with something like a page within the master folder like /master/includes/meta.inc.php in this one, Ihave the include's but it's not working in that folder, it give's me inclusion errors is there a way I can setup those include's to make them work I just want to be able to use 1 require statement for all pages at the top, and it automatically include all the other pages without me having to modify all my include's for each page specifically, that wouldn't be possible anyway?
  20. That link was exactly what I was looking for.  Thank you for the extra advice too.
  21. Actually these are all very valid helpful points.  I will keep all the extra advice in mind for the future.  Even when it come's to php
  22. Thank you for the help Also I was sorry if I was rude, when I read it I felt a little offended, I apologize for my response.
  23. [quote]oh great. in a week or 2 are going to list this on your resume as something you're expert in too?[/quote] I also don't need you popping in my post's and making rude comments.  I never popped into your post's and berated things you said, and questioned your intelligence.  You had no reason to come on here and do that.  I don't claim perfection in anything. I know the languages I have listed, and I have known them for that period of time, I redid my whole list a few day's ago to make sure it was accurate.  THose languages I listed as studied I did just that, and I am at that point.  I don't pop up and claim to know any of these, so that was unneccessary. [quote]http://wiki.novemberborn.net/sifr Do any of you have experience working with this, what do you think about it, is it trustworthy? Or are there still limitations on the font's[/quote] Thank you, what I gathered from this url/program it told me that (when I was studying), that with css, this was a technique that could be used where if you picked a font family that was not supported in a browser, then this advanced method "sifr" would do something with the css using javascript to make it to where the browser could see the font anyway, this is what I had understood from the book I was reading when I got that link.
×
×
  • 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.