Symfony 1.4 main console commands with propel

1) Build Schema from Database (Make sure config/database.yml is configure with the Database)
php symfony propel:build-schema
2) Build Models
php symfony propel:build –model
3) Build Forms
php symfony propel:build –forms
3) Build Filters
php symfony propel:build –filters
4) Cache Clear
php symfony cache:clear

For complete commands list vist http://symfony.com/legacy/doc/reference/1_4/en/16-Tasks.

Funtion to security all Form Post Data

<?php

function securityOnPost($array){ //$array
    foreach ($array as $key => $value){
        if(is_array($value)){ //If $value is an array
            securityOnPostKey($value,$key);
        } else {
            $_POST[$key] = mysql_real_escape_string($_POST[$key]);
}
    }
}

function securityOnPostKey($array, $key){ //$array
    foreach ($array as $keySub => $value){
        $_POST[$key][$keySub] = mysql_real_escape_string($_POST[$key][$keySub]);
}
}

if(isset($_POST['submit'])){
securityOnPost($_POST);
}
?>

How To Setup Apache Virtual Host Configuration in Three Steps with wamp

Step 1:

Open file host in the path “C:\Windows\System32\drivers\etc\” and add following at the bottom,

  • 127.0.0.1 mysite.local
  • 127.0.0.1 localhost

make sure 127.0.0.1 localhost at the bottom.