Jump to content

RussellReal

Members
  • Posts

    1,773
  • Joined

  • Last visited

Posts posted by RussellReal

  1.   $prices = array($price1,$price2,$price3,$price4);
      foreach ($prices as $k => $v) {
        if (preg_match(/^\s*\d*\.?\d{1,2}\s*$/,$v)) continue;
        $errors[] = 'price is invalid!';
        break;
      }
    

     

    basically all I did was I took YOUR code, threw a loop around it, and presto :)

  2. I don't believe this is an easy fix, its more or less, a photo with where the floor would be, its transparent, they edit in the shadows etc from the furniture, and then a php script mixes the background image (the floor) AND the chairs and stuff ontop.. its done in layers..

     

     

    I could probably do this if you're looking to hire somebody, but its not a quick thing to do :)

  3. you don't need regex :)

     

    try this..

    function cookies() {
      var x = document.cookie.split(';'), ret = new Object();
      for (i in x) {
        ret[x[i].split('=')[0]] x[i].split('=')[1];
      }
      return ret;
    }
    // untested
    

     

    now you can use that like this:

    cookies().NEW_LIST;
    

     

     

  4. the MySQL Query I have given you.. there are 3 parts to it..

     

    table a: your Cars table..

    table b: your Colors table..

    table c: your MFG table..

     

    yes it will still pull a.color (cars.color) which will be an integer, but b.shade should be the name of that color?

     

    if in the database that isn't how this will work, than you need to change the field names, to reflect what you want to happen...

  5. $mfg = mysql_query("SELECT a.*, b.shade, c.make FROM cars a JOIN color b ON (b.id = a.color) JOIN mfg c ON c.id = a.make WHERE a.make = '1'") or die(mysql_error());

     

     

    try this, and if I misnamed a field please try to correct it, but this should tell you where the problem is should you encounter one :)

  6. you aren't changing the query I've given you much...

     

    mysql_query("SELECT id, shade As (SELECT shade FROM color WHERE color.id = cars.color), carMake As (SELECT make FROM mfg WHERE make.id = cars.make) FROM cars WHERE make = '1'");

  7. onload you should read the hash and handle it the same way you would handle it when sum1 clicks that link :)

    document.onload = function() {
    var option = location.hash.replace('#','');
    ajaxObject.loadPage(option);
    }

     

  8. You could pull it off like this..

    SELECT id, color As (SELECT colorName FROM colors WHERE colors.id = colorId), manufacturer As (SELECT manuName FROM mfg WHERE mfg.id = manufacturerId) FROM cars WHERE id = '1'

     

  9. this is most definitely not a PHP problem, its an HTML problem.. That and possibly a JavaScript problem aswell, considering in IE there are two errors that occur :) syntax errors.

     

    My guess would be that you did not properly close an <a> tag somewhere.. For the most part modern browsers sometimes fix simple errors, where as IE doesn't try, it just makes the page however you tell it to be made :)

     

    also note: IE doesn't support CSS properties like min-height max-height, and all of the CSS3 properties.

  10. echo "<a href='". $row['img_path']."'><img border=0 src='". $row['thumb_bw_path']."' onmouseover='this.src=\"". $row['thumb_path']."\"' onmouseout='this.src=\"". $row['thumb_bw_path']."\"' />". "</a></td> \n";

     

    you can escape quotes to mean literal quotes instead of a string terminator..

     

    using \

×
×
  • 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.