Jump to content

Bendude14

Members
  • Posts

    411
  • Joined

  • Last visited

    Never

Posts posted by Bendude14

  1. if include_once and include fail to "include" the file then the page continues to render where as if require or require_once fail the whole page stops rendering.

     

    The difference between require and include and require_once and include_once is that using the "_once" functions means an extra look at the stack to ensure that these files have not already be included and is therefore slightly slower.

     

    require_once is often helpful inside an __autoload function used to include classes when designing an OO php system.

  2. Can people please share some experiences with shopping cart software they have used in the past. I don't have time to test them all so I am planning on just taking recommendations from here. It can be free or proprietary but it must have the feature to allow me to switch the "Cart" section off, so it simply looks like a catalog or products.

     

    Not sure if that is native to any shopping cart but maybe there is temp plugin i could use to disable prices / checkout etc.

  3. I don't really understand what your search is going to be based on, maybe an IP Address? I have done this once before using php and the free version of geocity database. www.maxmind.com/app/geolitecity

     

    The term you are after sounds like geocoding or geolocating. Googling these terms will probably reveal some more answers

  4. tableOne

    ==========

    tblOneID

    Name

    Value

     

    tableTwo

    =========

    tblTwoID

    ImageUrl

    Name

    tblOneID

     

    tableThree

    ==========

    tblThreeID

    Name

    Value

    tblOneID

     

     

    Ok so above is what the three tables are like and what I need to is duplicate a row in each table, obviously all data is related via "tblOneID"

     

    I retrieve the ID from my app for the record to duplicate but once I have duplicated the row in tableOne I need to use the newly generated ID (Its using autoincrement) to duplicate the data in tableTwo and tableThree

     

    tableTwo and tableThree may have mulitple records related to the record in tableOne and all Records would need to be duplicated.

     

    Make sense?

     

    Thanks

    Ben

     

  5. I have three tables which build information about one House, could someone please share some ideas on what would be the easiest way to duplicate a house and all its information in all three tables.

     

    I know I can execute 3 select statements get all the information I need then insert the new house, select its new unique ID and then insert the rest of the information into the last two tables with the correct ID.

     

    I just can't help but think this is a long way round?

     

    Maybe there is a SQL way with a temp table which would be more effective, if so I'm sorry for posting this in the wrong forum.

     

    Thanks

    Ben

  6. Please use code tags next time...

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <?php include ("login.php");?>
    
    <html>
    <head>
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    <title>Lock Table Head</title>
    
    <style type='text/css'>
    
    /* DIV container around table to constrict the height for IE (IE ignores the tbody height style) */
    div.FixedTableHead {
       overflow-y:auto;
       
       /* this fixes IE so container width is same as table width */
       width: expression( (this.childNodes[0].clientWidth + 24) + 'px' );
       
       /* This fixes IE so the container height is table height plus the height of the header */
       height: expression( (parseInt(this.childNodes[0].style.height) + this.childNodes[0].childNodes[1].offsetTop + 1) +'px' );
    }
    
    /* Scrollable Content */
    .FixedTableHead table tbody {
       height:100%;
       overflow-x:hidden;
       overflow-y:auto;
    }
    
    .FixedTableHead table tbody tr {
       height: auto;
       white-space: nowrap;
    }
    
    /* Prevent Mozilla scrollbar from hiding right-most cell content */
    .FixedTableHead table tbody tr td:last-child {
       padding-right: 20px;
    }
    
    /* Fixed Header */
    /* In WinIE any element with a position property set to relative and is a child of       */
    /* an element that has an overflow property set, the relative value translates into fixed.    */
    /* Ex: parent element DIV with a class of tableContainer has an overflow property set to auto */
    .FixedTableHead table thead tr {
       position: relative;
       height: auto;
       /* this fixes IE header jumping bug when mousing over rows in the tbody */
       top: expression( this.parentNode.parentNode.parentNode.scrollTop + 'px' );
    }
    
    /* Fixed Header */
    .FixedTableHead table thead tr td {
       border-bottom:1px solid #000000;
       background-color:white;
    }
    </style>
    
    </head>
    
    <body>
    
    Lock Table Headings<br />
    
    
    <div class='FixedTableHead'>
    <table cellspacing=0 style='height:100px;'>
    <thead>
    <tr><td>ID</td></tr>
    </thead>
    <?php
          $query =  "select id from master where period='09P3'";
          $result = mysql_query($query) or die(mysql_error());
       
    while($row = mysql_fetch_array($result)){
       echo"   <tbody><tr><td> {$row['id']}</td></tr>
       
          </tbody>";
       }
    echo"   </table>";
    echo"</div>";
    ?>
    
    </body>
    </html>
    

     

    The errors were been caused by your extra quotes on your attributes. I just moved them out of the php section for now. I also added single quotes to your array keys...

     

    Doh somoene beat me to it but im posting this anyway...

  7. that code works ok for me.

     

    you are selecting a radio button before submitting the form right? Maybe you should add a default selection.

     

    just add this to the default radio button

     

    selected="selected"

     

    Also add error_reporting(E_ALL) see if you get any errors...

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