Jump to content

RussellReal

Members
  • Posts

    1,773
  • Joined

  • Last visited

Everything posted by RussellReal

  1. Duly noted, however, I feel that certain things like this don't affect your site in the slightest, and should be cross-browser compatible. If it takes you an extra 3 seconds to do this, and have a larger audience see it exactly the way it was intended to, I honestly see no harm in it. If it was a 4 hour fix for IE6, than yes, its most likely better to drop support for IE6. Unless ofcourse IE6 is a requirement, there are a lot of what-ifs out there. The bottom line here really is that as you're developing a website from the ground up, knowing what is or isn't fully supported is the key to NOT having to do as many fixes in the long-run, almost all of my work is IE6+ compatible, but I mark it as IE7+ compatible, because I look forward to the day that IE6 is not even remembered anymore, however, it is still there now, as much of a shame as that may be. - Russell
  2. Yes, that approach is what Jessica outlined in her post and I outlined in my follow-up post. - Russell
  3. Yes, but the only reason people will use the same page to process form data is if they're trying to use the form data collected in targeting erroneous fields. (For example: Long Profile Detail Pages -- which should use AJAX of some sort to be quite fair) While that is a decent approach, for that application, in almost every other application its best to process on separate pages, atleast in my professional experience. - Russell
  4. Nope, usually on Error you will forward the user back to the page with the form like: header('Location: index.php?err=1');
  5. Well, I'll be quite fair, if you're going to be submitting multiple forms or just 1 form, you're best running the processing code in a separate file "process.php" or similar. The reason I say this, is because if you use the same page as the recipient, its very hard for you to avoid accidental form resubmission (hitting the refresh button) You could also use the same page as the processing page (If you absolutely MUST) aslong as you redirect the user to a "confirmation" page, and get them away from that page AFAP (sounds dirty huh!) But to answer your question, yes -- running your form processing code before ANY character data (even spaces and new lines) will avoid the "headers already sent" error, but if you echo, print, etc, information to the browser before you call header() you will receive that error anyway. - Russell
  6. Jessica, that is not necessarily a cross-browser solution at the moment. (IE6 Is almost out the door completely, however, a large population around the world still uses IE6 -- Don't believe me, check out the IE6 map created by microsoft themselves.) It would be best to give the "for" attribute value to a class like Jessica originally suggested, for best results across all browsers. - Russell
  7. You cannot JUST use CSS and HTML for this. Unless everything you have in mind for getting changed during this hover, is within the hoverable element, it will not work. abc:hover is now focusing on ABC which is currently being hovered, so any extra stylings such as: .ahri:hover .frizz { } will not work if .frizz is not within the .ahri element. what I will suggest however, would be to use javascript and onmouseover and onmouseout toggle the appropriate class names to be appended to the intended elements. If you need any help, I will gladly help you for free, if you add my skype: RussellReal - Russell
  8. okay, well, if it works for the other two filters, then maybe you're supplying the wrong column id?
  9. Hey, anytime, thats what we're here for! Can you please mark the topic as Solved! Thank you kindly, Russell
  10. Have you checked to see if getSimList() pulls the proper data? Hop on google chrome and do a console.log() on the variable in there before you process it or return it..
  11. Pounds doesn't use $usd in the calculation, infact it doesn't use $pound in the calculation for pounds.. I'll explain:) $pound=$price*$euro; $pound=number_format($pound); $euro never gets changed, $price changes in the increment the you want it to (from the loop) so everything is controlled properly in this $usd=$price*$usd; $usd=number_format($usd,2); $usd IS getting assigned to the value of ($price * $usd), $usd originally (before the first loop), $price is controlled it increments the way you want it to. AFTER the first loop $usd will equal something absurd and will screw up your calculations.. try this code instead: if($pound==0 && $price >0 && $price <90000000){ $pound=$price*$euro; $pound=number_format($pound); $usd2=$price*$usd; $usd2=number_format($usd2,2); $price=number_format($price); echo "<p>£ $pound approx</p><p>US $ $usd2 Approx </p>\n"; }
  12. If it is a local server that your Client operates, he should be able to give you access to it. If he is able to give you access, you can most definitely connect to that "local server" as a remote server, as local to your php script the server that it is on is "local" and anything NOT LOCAL will be remote. You will not need a cron job if you have direct access to the local server's database, The local server will most likely need static IP and it will need to accept remote connections, if it doesn't accept remote connections you will need to configure that, you can do this thru ftp with the database configuration files, you could even do it with SSH, but that has a bit of a learning curve! If your client does not have access to this local server or he doesn't own it, I wouldn't take the job, because if you do parse the site, you're stealing their bandwidth. and although they will most likely not attack you for it, you are definitely doing something unethical, and they CAN come after you for damages if you do get discovered. - Russell
  13. Please enclose your javascript in a code tag and your php code in a php tag, I would love to help you but I find this post a little hard to read -- sorry . - Russell
  14. You are compounding $usd You should if anything set $usd back to zero after the output, or it's default value, after the output! You're welcome <3 - Russell
  15. php itself has functions which do this aswell, stream_select to name one
  16. what is the error you're getting? [Edited This Block Out -- I overlooked the last block of code] The JSON Response doesn't look much like JSON, although that really doesn't matter too much.. Please respond with the PHP Error Message, and I'd be happy to assist you! - Russell Crevatas
  17. Wow such hate on w3schools When I first started (7 years ago) I used w3school's html reference sheet... I also tried the tutorials, but I hated learning from examples, I like just experimenting, but w3schools was probably invaluable to my starting in web development.. Honestly I wouldn't use w3schools for PHP, and tizag isn't all that great either, I'm lucky I learn well by myself.. All you REALLY need is an online reference, even after 7 years, sometimes I find myself on google from time to time, you're never going to fully memorize a language.. Thats why I say that as a web developer, you're honestly not gonna be an encyclopedia with a heartbeat, As a web developer its more important to be able to think of a construct and implement it, you need to be able to think about potential issues, before you even get to them, you need to be able to think outside the box.. The best web developers are the ones that can think the best, not the ones that know everything there is to know about a language.. Honestly, I know probably like the most common and important functions in php, but even though I've done things with PHP:GD, a bunch of times to be exact, I don't use it that often, so its just one of those things that get purged from memory, so I end up going to php.net and searching 'imagecreate', because the parameters for the image functions are freaking outrageous LOL I hope I helped and made becoming a web developer less of a nightmare, dw about general knowledge too much, worry about how well you brainstorm, and your problemsolving. - Russell
  18. You can most likely change the bookingindex.php include to like.. include('loginsplash.php'); then in loginsplash.php, write up some html to show images in <a> tags, and link to the respective posts
  19. I'm sorry, I didn't quite understand the question.. Can you please post maybe some: 1. Better details on what you're trying to accomplish 2. Code you've done to try to accomplish this 3. Maybe a link of something similar to what you want to accomplish? - Only if 1 and 2 cannot be supplied. Thanks! Russell
  20. You are not selecting a database, you need to use mysql_select_db
  21. Well, If you're using WAMP, you probably don't have MySQL running, try restarting everything, if not, dump some errors and see exactly why its not working, and post the errors here and I can help you out further.
  22. <input type="text" name="type" value="typeAll"<? echo ($_GET['type'] == 'typeAll') ? ' checked="checked"':''; ?> />
  23. #1, why are you storing your date values in mysql as timestamps, when you could use a DATETIME type, and use the date functions in mysql.. #2, why aren't you using mktime like this: <?php $N = 23; $day = date('j'); $month = date('n'); $year = date('Y'); // get exactly $N years ago $year = $year - $N; $stamp = mktime(0,0,0,$month,$day,$year); ?>
  24. If you are just hiding and displaying these inputs, then they both will come through the request... So basically to be safe, you'd want a hidden input that is javascript toggled named residentTrue, if you are to do it this way.. there could be other ways to do this, however, if you don't have a certain value telling you which was used, technically speaking there could be an instance where both fields are filled out, and then, you can't use this to dependably rely on.. so I mean, with alot more thinking I'm sure you could figure it out, but I'd advise on a simple hidden flag which is true or false, that you can use that to compare
  25. <?php public function getTable($product = false) { if (!$product) return false; $childProducts = $this->getMatrix(null, $product); $x = array(); $r = ''; foreach ($childProducts as $children) { $x[$children->getAttributeText('quantity')][$children->getAttributeText('size')] = array('id'=>$children->getId(), 'price'=>number_format($children->getPrice(),'2'), 'name'=>$children->getName()); } ksort( $x ); $r .= '<table class="matrix"><tr><th></th>'; foreach( array_keys(current($x)) as $size ) { $r .= '<th>'.$size.'</th>'; } $r .= '</tr>'; foreach( $x as $quantity => $data ) { $r .= '<tr><th>'.$quantity.'</th>'; foreach( $data as $item ) { $r .= '<td><a href="/checkout/cart/add?product='.$item[id].'" title="Add '.$item[name].' to basket">£'.$item[price].'</a></td>'; } $r .= '</tr>'; } $r .= '</table>'; return $r; } ?> add this to file2.php and use it like <?php echo Mage::getModel('catalog/product_type_configurable')->getTable($_product); ?>
×
×
  • 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.