Jump to content

alpine

Members
  • Posts

    759
  • Joined

  • Last visited

Posts posted by alpine

  1. I think you are over complicating this, here is another example on how you could run a post data check, should give you a pointer on how to do it a little easier - it is far from complete but thats not the point.

    <?php
    
    if(isset($_POST['submit']) || isset($_POST['preview'])){
    
    $req = array("name", "email");
    
    foreach($_POST as $key => $value){
    	if(in_array($key, $req) && empty($value)){
    		$err_empty[] = $key." is blank";
    	}
    	${$key} = $value; // Note that this is raw value not suited for direct db insert
    }
    if(!empty($err_empty)){
      $err_msg = "Following failed:";
      $err_msg .= "<ul><li>";
      $err_msg .= implode("</li><li>", $err_empty);
      $err_msg .= "</li></ul>";
      echo $err_msg;
    }
    else{
    	// treat data based on preview or save
    }
    }
    
    // show form and use posted values
    
    ?>
    

  2. already have that one, and have always used it - until now. :P

     

    Why should i use many (many! for me anyhow) hours working with css hacks for IE6 - and for nothing... i mean, its time to ditch IE6 imo. A proper message for IE6 users will do this time ;)

     

    When looking on the stats for another website i have, its the minority still running IE6 while most are on IE7, FF or Opera -and IE8 striking by.

     

    I wonder for how much longer horrible hacks for IE6 will continue....

     

    Anyhow - this post was just to get some more oppinions on this, so hit me!

  3. It seems that you do not want to take the time to make it work on all browsers thus you are alienating potential customers.

     

    Should i bother on a non profit service ? I've decided not to in this case. If i was to make money on it i would perhaps have to think twice - i agree.

     

    If more web developers ditched support for IE6 it would modernise the browsers faster, without doubt. Problem is that as long as the IE6 users have full functionality they see no reason for upgrading to a newer IE or changing to another browser.

     

    I still make sure it works in FF, IE7+ and Opera.

  4. I am currently building a web service (automotive data storage), open for anyone that wants to use it.

     

    I am working with CSS layout, and i dont bother adapting it to IE6 simply because i think its time to move on plus the fact that my CSS knowledge is intermediate - so all this hacks seems hopeless.

    It ain't critical to support IE6 in this particular web site, if you dont want to use a modern browser then don't use my web site service - so to speak ::)

     

    What are the general oppinion on ditching IE6 support ?

  5. Either you set different form actions on each form, or use a common page to send the user depending on where you want them to go, example

    <?php
    
    // login_router.php
    
    session_start();
    
    if(isset($_POST['submit'])){
    
    $_SESSION['area'] = $_POST['destination'];
    
    switch ($_POST['destination']){
    
      case 'area1':
      header('Location: http://www.example.com/area1.php');
      break;
      
      case 'area2':
      header('Location: http://www.example.com/area2.php');
      break;
      
      default:
      header('Location: http://www.example.com/area.php');
      
    }
    
    }
    
    ?>
    

     

    <!-- One of the tabbed pages form -->
    
    <form action="login_router.php">
    
    <input type="hidden" name="destination" value="area1" />
    
    <!-- or use a select drop down or whatever -->
    
    <input type="submit" name="submit" value="Log in" />
    
    </form>
    

  6. Depending on what level of protection you want on it, something simple might do what you need - but its not bullet-proof on this level

     

    <?php
    
    if(!isset($_POST['formdata'])){
      die("You cannot access this page without posting from form");
    }
    if($_POST['formdata'] <> "some access value"){
      die("Submitted data does not give access");
    }
    
    // Page content continues here
    
    ?>
    

  7. CSS isnt my strong side, and havent been touching it for a few years.

     

    Problem is that the next data row (or data header) doesnt appear where the last one stopped, its a gap between. Probably due to some divs taking space even if they are adjusted upwards.

     

    So, any tips on how to improve or correct this ?

     

    
    <style type="text/css">
    
    .checklist_data_container{
    position: absolute;
    top:0;
    left:0;
    width: 100%;
    background-color: #ddd;
    }
    
    .checklist_data_heading{
    position: relative;
    width: 100%
    height: 30px;
    background-color: blue;
    }
    
    .checklist_data_text{
    position: relative;
    width: 100%;
    height: 60px;
    background-color: green;
    }
    
    .checklist_data_options_container{
    position: relative;
    top: -60px;
    left: 80%;
    width: 20%;
    height: 60px;
    background-color: yellow;
    }
    
    .checklist_data_options_text{
      position: relative;
      height: 20px;
      text-align: left;
      background-color: grey;
    }
    
    .checklist_data_options_input{
      position: relative;
      height: 20px;
      top: -60px;
      left: 50%;
      width: 50%;
      background-color: purple;
    }
    
    .checklist_data_input_options{
      position: relative;
      min-height: 10px;
      top: -60px;
      text-align: left;
      background-color: pink;
    }
    
    </style>
    
    
    
    <div class="checklist_data_container">
    
    <!-- new header for data rows -->
    
    <div class="checklist_data_heading">Heading</div>
    
    <!-- new data row -->
    
    <div class="checklist_data_text">Text</div>
    
    <div class="checklist_data_options_container">
    
    <div class="checklist_data_options_text">text klikk</div>
    <div class="checklist_data_options_text">text klikk</div>
    <div class="checklist_data_options_text">text klikk</div>
    <div class="checklist_data_options_input">KLIKK</div>
    <div class="checklist_data_options_input">KLIKK</div>
    <div class="checklist_data_options_input">KLIKK</div>
    
    </div>
    
    <div class="checklist_data_input_options">hidden fields</div>
    
    <!-- new data row -->
    
    <div class="checklist_data_text">Text</div>
    
    <div class="checklist_data_options_container">
    
    <div class="checklist_data_options_text">text klikk</div>
    <div class="checklist_data_options_text">text klikk</div>
    <div class="checklist_data_options_text">text klikk</div>
    <div class="checklist_data_options_input">KLIKK</div>
    <div class="checklist_data_options_input">KLIKK</div>
    <div class="checklist_data_options_input">KLIKK</div>
    
    </div>
    
    <div class="checklist_data_input_options">hidden fields</div>
    
    <!-- new header for data rows -->
    
    <div class="checklist_data_heading">Heading</div>
    
    <!-- new data row -->
    
    <div class="checklist_data_text">Text</div>
    
    <div class="checklist_data_options_container">
    
    <div class="checklist_data_options_text">text klikk</div>
    <div class="checklist_data_options_text">text klikk</div>
    <div class="checklist_data_options_text">text klikk</div>
    <div class="checklist_data_options_input">KLIKK</div>
    <div class="checklist_data_options_input">KLIKK</div>
    <div class="checklist_data_options_input">KLIKK</div>
    
    </div>
    
    <div class="checklist_data_input_options">hidden fields</div>
    
    <!-- new data row -->
    
    <div class="checklist_data_text">Text</div>
    
    <div class="checklist_data_options_container">
    
    <div class="checklist_data_options_text">text klikk</div>
    <div class="checklist_data_options_text">text klikk</div>
    <div class="checklist_data_options_text">text klikk</div>
    <div class="checklist_data_options_input">KLIKK</div>
    <div class="checklist_data_options_input">KLIKK</div>
    <div class="checklist_data_options_input">KLIKK</div>
    
    </div>
    
    <div class="checklist_data_input_options">hidden fields</div>
    
    
    
    </div>
    
    

  8. This is perhaps what you are asking for when using your current code

    if(isset($_POST['signupID'])) {
    
    $cheater = false;
    
    foreach($_POST['signupID'] as $item) {
    $sql = "SELECT pagestate FROM postcode WHERE postcodeID=$item";
          mysql_query($sql) or trigger_error("SQL: $sql, ERROR: " . mysql_error(), E_USER_ERROR);
          $result = mysql_query($sql);
    
    $row2 = mysql_fetch_assoc($result);
    if($row2['pagestate'] === 'T') {$cheater = true;}
    else {everything is ok insert into database
    }
    }
    
    if($cheater == true){
      echo "You have tried to cheat!";
    }
    
    echo somestuff
    mail some stuff
    }
    

  9. I find it very hard to read, the colours makes it difficult to separate content from the surrounding layout.

    When looking at e.g. category listings, the main focus is given to the category (inside fieldset) (?) while the description sort of dissappears inbetween (?). Should be inverted IMO.

    In summary it just gives me too much headache trying to focus my eyes finding the stuff i would be looking for.

  10. When you are about to submit a new link, you are asked to add a generated meta-tag on the page you are submitting - sorry to say this but i doubt anyone at all would bother to do that (even if it is just for a one time validation or whatever..)

     

    Other than that i like the overall looks, still i find some problems in believing that this would appeal to the mass-submitting you would need in order for it to be even close to a handy search tool.

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