Jump to content

Hailwood

Members
  • Posts

    51
  • Joined

  • Last visited

    Never

Everything posted by Hailwood

  1. nope tried that two, get Cannot use object of type Config as array ty anyway.
  2. hi guys, I need to know how to access these if im doing this: $this->config = Config::getInstance(); print_r($this->config); and its spitting out: Config Object ( [base] => Array ( [abs_path] => C:/server/xampp/htdocs/***/ [url_path] => http://localhost/***/ [temp_dir] => tmp/ [env] => dev ) [database] => Array ( [host] => localhost [user] => root [pass] => [name] => *** ) [mconnect] => Array ( [url=http://=> *** [appname] => *** [password] => *** [msgclass] => *** ) [interfax] => Array ( => *** [username] => *** [password] => *** [filetype] => HTML ) ) so what goes in place of this question mark if i want to get the database name? $this->config->? Ive tried $this->config->database['name']; but i get cannot access empty property] => *** [appname] => *** [password] => *** [msgclass] => *** ) [interfax] => Array ( => *** [username] => *** [password] => *** [filetype] => HTML ) ) so what goes in place of this question mark if i want to get the database name? $this->config->? Ive tried $this->config->database['name']; but i get cannot access empty property
  3. damn, well so if i am using jquery could i do something like. <script type="text/javascript"> $(function(){ <?php if(isset($_GET['url'])) { $url = $_GET['url']; echo "parent.location = 'http://'.$url.'";'; } ?> } </script>
  4. hi there, i have a php script inside an iframe, is it possible to redirect the parent instead of the iframe?
  5. hey guys if i have if($a==$b) if($c==$d) return true; else return false; (nb: the lack of indentation is intentional) so my question is how does php know if the else applies to if($a==$b) or if($c==$d)
  6. Is it possible to get an ajax response from this method?
  7. Hi there, If i have a form on one server (with no php support) which asks a user to upload a photo, is it possible to then send the data in that upload to a php script on another server which is setup to recieve this? so is it possible to send file data through ajax to a php script?
  8. so guys, im making an application and i need to know how to solve a problem such as below. can someone please solve this and post how to do so, or even just how to do so. Cheers. it is literally the maths i am stuck on. extracting the relevant parts i have done. 12% of voters in a recent election voted on the greens candidate, if 10 people were randomly selected what is the probability that exactly 4 people voted for the green candidate.
  9. Method I have used for what exactly? The 41 is coming from another site (not controlled by me) My job is to simply fetch it.
  10. yeah, I have no control over how they pass it to me, and this is the method they have chosen to use. With no actual named variable Thanks though. Any more ideas?
  11. Hi guys, If i have a url such as www.example.com?41 how do i get the 41? I ak as this is what i am passed from another site, so i do not know the actual value. I came up with: foreach($_GET as $k => $v) $id = $k; echo $id; but it is rather inefficient. any ideas?
  12. Hey guys, Well here is the error: Fatal error: Cannot redeclare local_time() (previously declared in C:\server\xampp\htdocs\******\charts\scripts\chartGlobal.php:7) in C:\server\xampp\htdocs\******\charts\scripts\chartGlobal.php on line 21 Now normally i would be fine solving this except, this time line 21 is the closing } of the only declaration... [attachment deleted by admin]
  13. Hi there, Thanks for the reply, however i was not wanting an incremental indentation, it was for the top element to overlap the bottom element slightly, i ended up doing it like so: #menu_left ul li { display: block; height: 39px; position: relative; margin-top: -18px; padding-top: 9px; }
  14. Hi there, Im creating an UL based menu, however for the design each li must be 9px under the previous this is to create an effect of them stacking ontop of each other. now the problem is i cant just move the up by 9px, i have to have an algorithm like this 1) i = 0; 2) Top = -(9*i); 3) i++; now i could do that with javascript, but is there a way to achieve this without javascript?
  15. Well, are you manually entering the data on the page, or is the data being pulled from a database?
  16. So If I put this code into a php file (with adding <? php on the top and ;?> on the bottom, "php include" this file into my site, what here defines my keywords and colors and links and so on? Is this code totally different from the previous code I got? and yes, I still don't have a clue... lol :-\ seriously... you have been given all the help you should need. these will do the formatting for you however YOU must define what context they are used in. how are we meant to know what your text is coming from? is it a string? what? please show us your attempt...
  17. Yeah cheers, i already know those, im talking about a function i could call anywhere on a variable and it will return it...
  18. Hi there, Is there any way in php to ask it to output the filename and line that a particular variable is defined? eg echo whereIs($date); would output test.php :391 or something similar, this is because i have a whole pile of includes (mostly from a framework) and i need to find out where a particular var is coming from!
  19. No problemo, dont forget to mark the topic as solved
  20. Sure is, Just put it inside <noscript></noscript> tags I like it, Only issue is, im assuming you are still working on the color styles... Green = nogo
  21. hey guys. What is the significance of the _ eg $_varname; is it like an internal variable or something?
  22. $sql = "update tbl_user set post=post+1 where id='".$user_id."' and code='".$user_code."'"; $result = mysql_query($sql); } try that. Regards, Hailwood
  23. Have a look into Jquery UI all its components are SEO friendly and will degrade nicely if javascript is disabled, which is good for those using screen readers ect. It also has the accordion component I was referring to. If you have any problems let us know and we will give you a hand. Regards, Hailwood
  24. Dito, Mind if I join you? Can save some $$ Actually its the photo's that make me want to go...
×
×
  • 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.