Results 1 to 6 of 6

Thread: can we create new php page in sugar

  1. #1
    prasannagowri is offline Senior Member
    Join Date
    Apr 2009
    Posts
    52

    Default can we create new php page in sugar

    hello,
    i am new to sugar,
    can we create new php file in sugar.
    if we can what are the conditions we have to follow for database connection,
    please help me
    thanks in advance

  2. #2
    akkimca's Avatar
    akkimca is offline Sugar Community Member
    Join Date
    Dec 2008
    Posts
    270

    Thumbs up Re: can we create new php page in sugar

    hi..
    i created new file in sugar like this way...
    i dont know its right or wrong but its work for me
    i write new code in new file like:
    PHP Code:
    define('sugarEntry',true);
    require_once(
    'config.php');

    $db=mysql_connect('localhost',$sugar_config["dbconfig"]["db_user_name"],'');
    mysql_select_db($sugar_config["dbconfig"]["db_name"],$db) or die("Error In Database."); 
    and called this file like this in javascript:
    PHP Code:
    window.location='../sugarcrm/comment.php'
    try this... may this code help you
    Regards
    ==========================
    akkimca
    Work as Sugarcrm Freelancer
    Feel free to Find me in skype. Its my pleasure to talk with you.
    ID: akshay.biztech

  3. #3
    prasannagowri is offline Senior Member
    Join Date
    Apr 2009
    Posts
    52

    Default Re: can we create new php page in sugar

    hi
    thanks for quick replay,
    in the new file what are the files need to include.
    can u please help me
    thanks in advance,

  4. #4
    akkimca's Avatar
    akkimca is offline Sugar Community Member
    Join Date
    Dec 2008
    Posts
    270

    Thumbs up Re: can we create new php page in sugar

    hi...
    its on you which sugar function are u using...
    just include the declaration file of function which are u going to use in ur new file....
    Regards
    ==========================
    akkimca
    Work as Sugarcrm Freelancer
    Feel free to Find me in skype. Its my pleasure to talk with you.
    ID: akshay.biztech

  5. #5
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: can we create new php page in sugar

    A better approach is:

    PHP Code:
    if(!defined('sugarEntry'))define('sugarEntry'true);
    require_once(
    'include/entryPoint.php');

    global 
    $sugar_config;

    $db = & PearDatabase::getInstance(); 
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  6. #6
    akkimca's Avatar
    akkimca is offline Sugar Community Member
    Join Date
    Dec 2008
    Posts
    270

    Thumbs up Re: can we create new php page in sugar

    thanks...

    i need this code to make my code proper....
    Regards
    ==========================
    akkimca
    Work as Sugarcrm Freelancer
    Feel free to Find me in skype. Its my pleasure to talk with you.
    ID: akshay.biztech

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 2009-01-16, 06:39 PM
  2. How to create a new page
    By Anjugam in forum Developer Help
    Replies: 2
    Last Post: 2008-12-30, 10:25 AM
  3. Create a drop down in create oppurtunities page
    By siva143viji in forum Developer Help
    Replies: 1
    Last Post: 2007-02-02, 03:14 PM
  4. Create Sugar User Wiki On Main Page
    By kpit in forum SugarWiki Discussion Forum
    Replies: 3
    Last Post: 2006-08-25, 03:58 PM
  5. Create role page is blank
    By rohitdsouza in forum Help
    Replies: 0
    Last Post: 2006-07-25, 04:55 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •