Jump to content

son.of.the.morning

Members
  • Posts

    292
  • Joined

  • Last visited

    Never

Posts posted by son.of.the.morning

  1. This sounds stupid, i know. I want to create a foreach loop that will display 3 records per row. For example when you go on play.com and you query something you get a tile view of items. Can anyone help me?

  2. When I scale the window it courses a horizontal scroll bar and created white space on the right hand side of the page.

    I cant seem to see were i have gone wrong here i have done this same structure a million times on other sites but this time round it playing up for me.

     

    This is the the site, if anyone can have a look at it and see if they can see whats going wrong.

    http://www.atkinsonworlddigital.com/test/

     

     

  3. I am having trouble having different layout for different actions from my controller

     

    <?php
    class ContactsController extends AppController {
    	var $name = "Contacts";
    	var $layout = "default";
    
    	function index() {
    	}
    
    	function edit_contacts(){
    		$this->set('contacts', $this->Contact->find('all'));
                            var $layout = "modal_box"; // i want this layout to have this action
    
    	}
    }
    ?>
    

  4. I am using cakephp to create a cms as i have properly said in numerous posts lol. I am totally new to MVC so it's quite a head fuck at the moment. I have followed a tutorial on how to create a blog using cakephp and from what i have so far i understand how to create a model for one table. In my cms i have multiple tables when i want to be able to interact with on a single page. I really don't no were to start with it at all so if anyone can give me a little help or a push in the right direction it would be much appreciated.

     

    Thanks 

  5. I am using cakephp to create a cms and i have used the html form helper method to create my form object to add a new news feed (Post). The code seems fine to me, however i still keep getting this error (unexpected T_DOUBLE_ARROW).

     

    Here is my code

    <?php
      echo $form=>create('Post',array('action'=>'add'));  
      echo $form=>input('title');
      echo $form=>input('body');
      echo $form->end('Add post');
    
    ?>
    

     

  6. can any one see anythin wrong with the syntax here i keep getting an error

    SELECT * FROM blog_posts ORDER BY id DESC LIMIT $start, $per_page INTER JOIN table2 ON blog_posts.id=table2.id
    

  7. <?php 
    
    if(isset($_GET['id'])) {
    	$id = $_GET['id'];	
    	$a = "SELECT * FROM blog_posts WHERE id = $id";
    	$query  = mysql_query($a) or die (mysql_error());
    	$return = mysql_fetch_array($query);
    }
    else {
    }
    ?>
    

     

    <select name="color" class="SelectColor">
            <option id="red" value="red">red</option>
            <option id="blue" value="blue">blue</option>
            <option id="green" value="green">green</option>
            <option id="grey" value="grey">grey</option>
    </select>
    

  8. I need my select dropdown to show the relevant option. I am using a GET action to pass the id of an article to another page (edit article page) with this i am selecting that specific record and passing it's data into form object in order to be modified and updated. The only issue is my category list is a dropdown and i need it to display the relivent category for that specific record.

     

    hope that makes sence

  9. Wouldnt focus work better?

     

    <script>
    $(document).ready(function(){
        $('input#btn').hide();
          $('textarea[id="text"]').focus(function(){
              if($(this).val().length > 10) {
                   $('input#btn').show();
              } else {
                  $('input#btn').hide();
              }
       });
    });
    </script>
    
    

  10. A framework is a library of re-usable bassline functions (methods) that can be genericaly invoked with a simplistic line of code, ultimately minimizing the development process. As a stand alone developer you would store re-usable code for futore work to speed up development (the faster the development the more money there is to be made!!)

  11. Could use a bit of JQuery to change the css.

     

    <?php 
    
        if(isset($_GET['id'])) {
           
             $id = $_GET['id'];
    
             if($id = "home") {
                  echo '<Script type="text/javascript">"$(''#IdorClassName).css('color','#666')</script>';
             }
    
              //and so on...
    ?>
    

     

    This can be reused then

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