Jump to content

CroNiX

Staff Alumni
  • Posts

    1,469
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by CroNiX

  1. Also, if you want to remain legal, I suggest reading the Terms of Service before automating this process. Most informational sites like these have statements disallowing the use of a script to obtain information from their service.
  2. Not reading and following the forum rules before posting is also pretty rude IMO.
  3. In firefox, and I imagine other browsers, you just have to go to Tools/Page Info/Media and can download any pictures that appear in the page. No way around that....if its on the page being viewed via the browser, it is also already downloaded and stored on the users computer in the cache. There are also tools to download Flash files and view them locally.
  4. if you put this just before your extract($row); it should convert them to html spaces (which is required for an empty tabledata to display properly. foreach($row as $k => $v) { if($v == NULL) { $row[$k] = ' '; } }
  5. if(!function_exists(my_function)){ function my_function(){ .... } }
  6. Not surprising that gmail works in chrome, after all they are both google products. Also not surprising that hotmail, owned by MS and googles main competitor when it comes to free email services, doesn't work.
  7. It took me 5 seconds to find your problem, well the one you are talking about anyway. Searching your piece of code, you have 2 opening braces '{' and 3 closing braces '}'. Obviously you have a mismatch which would have been super easy for you to see (and probably wouldn't have done it in the first place) had you properly indented your code. You also have if(condition) ... else ... else ... You can't have 2 elses like that.
  8. with css you can set a width to the <td> like: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style> table td { width:50px; } </style> </head> <body> <table> <tr><td>test 1</td><td>test 2 test 2 test 2</td></tr> </table> </body> </html> results in: test 2 test 1 test 2 test 2
  9. Not sure why you are using tables for this, but try adding cellspacing=0, cellpadding=0, and border=0 to <table class='submenu' width='100'>
  10. Always make sure your site runs 100% before javascript is added. All validation etc must work with php. After that, you can use JS to spruce your site up with clientside validation and ajax/etc for a better user experience, but everything must function 100% if JS is disabled.
  11. Most of the stuff I write I sell to clients, so to help the dumb clients (most of them are anyway) I like to have just 1 file where they can change all major settings in so they don't have to go digging all over trying to find where to change stuff. It seems like your situation is different in that you use your own stuff, so you know where all of the changes need to be made.
  12. You can't have 2 actions. You could use sessions to store the data. On the page that the form action points to just store the variable in a session variable and recall it on the other page where you need it.
  13. Ah, well when I make a db class I instantiate it like the following: $db = new DBHandler(DB_HOST, DB_USER, DB_PASS, DB_NAME); so I can have a file with this outside of web root: define('DB_HOST', 'myhost.com'); define('DB_USER', 'username'); define('DB_PASS', 'password'); define('DB_NAME', 'database'); I think its much easier to maintain because you don't have to go manually changing the class (to change the host, user, pass)...just the config file.
  14. I usually just stick my connection definitions (host/user/pass/database) outside the web root. Not sure what benefit sticking the whole class there is, without the connection info they can't do anything if you have the rest of the server set up properly.
  15. You're using outdated session and post functions/globals. Try this: page 1: session_start(); if (isset($_POST['Address'])) $_SESSION['Address'] = $_POST['Address']; } page 2: session_start(); if(isset($_SESSION['Address'])) echo $_SESSION['Address'];
  16. I require 65% up front before I touch a thing. I require a signed contract before I touch a thing. All development work gets done on MY server. Client can view my work on my server. At the end of the job and they have paid the remainder, I transfer the work to their server. Never been screwed after I started doing things this way. Sure I have lost a few prospective clients who think this is a bit much, but they are the types who probably would have screwed me anyway, so who cares. After the work is released to the client, or scammer in your case, there is not much you can do if they don't pay except hire a lawyer and spend time in court. Its much better to protect yourself up front and retain 100% control until the final bill is paid.
  17. If it generates an error that would be helpful as well.
  18. CroNiX

    OOP

    You are missing a ">" in this line: echo $add->x." divided by ".$add-y." equals ".$add->divide()."<br />";
  19. CroNiX

    OOP

    A few suggestions... I'm not a pro PHP OOP guy, so take it with a grain of salt, but this is what I have learned. class classname { private $total; // using var is outdated (php4 style) look in to public, private, etc. variables public $var1; public $var2; function __construct($x,$y) { $this->total = $x*$y; $this->var1 = $x; $this->var2 = $y; } public function getTotal(){ //you should do the same thing with declaring methods, use public, private, static etc. //its also not a good idea to echo from a class, you should return the data so you can format it in your code and keep a separation of HTML and Data. return $this->total; } } $a = new classname('5','2'); $b = new classname('10','3'); //now you have more control on how you format your data via html echo $a->var1 . ' times ' . $a->var2 . ' equals ' . $a->getTotal() . '<br />'; echo $b->var1 . ' x ' . $b->var2 . ' = ' . $b->getTotal() . '<br />';
  20. Just noticed they released a new minor version yesterday, Dec. 8.
  21. Its different for different browsers. As you are seeing there is no way to accomplish what you are trying to do in all browsers, and even then different versions of the same browser handle it differently. Its not a standard, so there is no standard way to handle it. I am wondering why you are putting so much time into something that doesn't really need to be done anyway. If people know how to use a browser, the vast majority of them know how to bookmark. If they like your site, they will bookmark it without you prompting them.
  22. Oceans - At this point I think it would be much better if you would post your whole code so we can look at it.
  23. Firebug lets you edit css live in firefox, so you can tweak it and see the changes realtime. Then copy and paste to the css file when its how you want it.
×
×
  • 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.