+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: need php help

  1. #1
    sen01dj is offline x10Hosting Member sen01dj is an unknown quantity at this point
    Join Date
    May 2009
    Posts
    40

    Unhappy need php help

    function __connect() {
    mysql_connect(CONFIG_SQL_DBHOST,CONFIG_SQL_DBUSER, CONFIG_SQL_DBPASSWORD)
    or die ('Could not connect: '.mysql_error());
    $this->setDBName(CONFIG_SQL_DBNAME);
    $this->Query("SET CHARACTER SET utf8;");
    }
    if my host name:ruwan
    database name :shout
    password :789

    how can I fill this
    pls help me

    http://www.sensitivedjs.co.cc

  2. #2
    diabolo's Avatar
    diabolo is offline Community Advocate diabolo is on a distinguished road
    Join Date
    Nov 2007
    Location
    Jersey Shore
    Posts
    1,683

    Re: need php help

    first things first, NEVER post up your password.

    and where did you get this script, it might help me make sure i got things correct.

    Code:
    function __connect() {
    mysql_connect(ruwan, CONFIG_SQL_DBUSER, 789)
    or die ('Could not connect: '.mysql_error());
    $this->setDBName(shout);
    $this->Query("SET CHARACTER SET utf8;");
    }
    where it says "CONFIG_SQL_DBUSER" just put in your username that you use to access the db. I couldn't do that for you since you didn't supply it

  3. #3
    espfutbol98's Avatar
    espfutbol98 is offline x10 Sophmore espfutbol98 is an unknown quantity at this point
    Join Date
    Apr 2009
    Location
    Zagreb... želim
    Posts
    200

    Re: need php help

    Usually usernames for free hosting are [your_cpanel_login_username]_[user_you_created].
    For example, mine is: mason_mason
    Not sure if that will help.
    By the way, you might want to edit the post with your password.
    Last edited by espfutbol98; 06-25-2009 at 09:11 PM.

  4. #4
    sen01dj is offline x10Hosting Member sen01dj is an unknown quantity at this point
    Join Date
    May 2009
    Posts
    40

    Unhappy Re: need php help

    i need to add shout box to my site i got code from
    http://www.flashdevs.com/shout_box/features/

    i made mysql database also but others very complicated

    i dont have php knowledge

    this is instalation help


    Installation:

    STEP 1: Install server side scripts to your server

    1. Copy server and js folders to the web server where you are going to install shoutbox;

    2. Execute dump.sql script in your database admin panel in order to create necessary databases for shoutbox;

    3. Change login and password in server/php/settings.php file for accessing to your database.
    Open this file and find the code:
    define('CONFIG_SQL_DBUSER', login);
    define('CONFIG_SQL_DBPASSWORD', password);

    In the code:
    login (String, required) specifies login to your database;
    password (String, required) specifies password to your database;



    STEP 2: Include the SWFObject JavaScript library in the head of your HTML page
    <head>
    <title>Your Page Title</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript" src=swjobjectUrl></script>
    </head>

    In the code:
    swjobjectUrl (String, required) specifies the URL of swfobject.js file.



    STEP 3: Shoutbox is embedded in HTML page using SWFObject with the following code:
    <script type="text/javascript">
    swfobject.embedSWF(swfURL, id, width, height, version, bgColor);
    so.addVariable("serverURL", serverURL);
    so.addVariable("refreshTime", refreshTime);
    so.write("id");
    </script>

    In the code:
    swfUrl (String, required) specifies the URL of shoutbox SWF file;
    id (String, required) specifies the id of the HTML element (containing your alternative content) you would like to have replaced by shoutbox;
    width (String, required) specifies width in pixels of shoutbox;
    height (String, required) specifies height in pixels of shoutbox;
    version (String, required) specifies the Flash player version your SWF is published for (format is: "major.minor.release");
    bgColor (String, required) specifies HEX color of shoutbox background;
    serverURL parameter – relative to path to shoutbox.php server file;
    refreshTime specifies time in seconds for refreshing shoutbox;
    Edit:
    3. Change login and password in server/php/settings.php file for accessing to your database.
    Open this file and find the code:
    define('CONFIG_SQL_DBUSER', login);
    define('CONFIG_SQL_DBPASSWORD', password);

    In the code:
    login (String, required) specifies login to your database; (what is string,required ? )
    password (String, required) specifies password to your database;

    I chage that

    define('CONFIG_SQL_DBUSER', database user name);
    define('CONFIG_SQL_DBPASSWORD', password database password);



    STEP 2: Include the SWFObject JavaScript library in the head of your HTML page
    <head>
    <title>Your Page Title</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript" src=swjobjectUrl></script>
    </head>

    In the code:
    swjobjectUrl (String, required) specifies the URL of swfobject.js file.

    I change this
    create new html file
    <script src="shoutbox/js/swfobject.js" type="text/javascript"></script>

    STEP 3: Shoutbox is embedded in HTML page using SWFObject with the following code:
    <script type="text/javascript">
    swfobject.embedSWF(swfURL, id, width, height, version, bgColor);
    so.addVariable("serverURL", serverURL);
    so.addVariable("refreshTime", refreshTime);
    so.write("id");
    </script>

    Ichange this

    <script type="text/javascript">
    swfobject.embedSWF("shoutbox/shoutbox.swf");
    width=300
    height=500
    bgcolor='#FF5400'
    so.addVariable("shoutbox/server/php/shoutbox.php");
    so.addVariable("2");
    so.write("id");
    </script>


    but my shout box not working

    pls help me
    thank you
    Last edited by sen01dj; 06-25-2009 at 11:20 PM. Reason: Automerged Doublepost

  5. #5
    nirajkum is offline x10 Sophmore nirajkum is an unknown quantity at this point
    Join Date
    Mar 2008
    Posts
    161

    Re: need php help

    I hope issue is not with the database its some configuration issue . I can help you with the setup of shout box on this weekend . PM me

  6. #6
    sen01dj is offline x10Hosting Member sen01dj is an unknown quantity at this point
    Join Date
    May 2009
    Posts
    40

    Re: need php help

    Thanks nirajkum
    I re create mysql database and after that shoutbox.php running probably
    earliya I enter path to shoutbox.php in browser
    it shows sum erros (culd not connect to database)
    now no error message

    now I have this problem how can I embedding shout box to my html page
    (Step 3)



    http://www.sensitivedjs.co.cc
    Edit:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script type="text/javascript" src=(/public_html/shoutbox/js/swfobject.js></script>
    </head>

    <body>
    <script type="text/javascript">
    swfobject.embedSWF("shoutbox/Shoutbox.swf,id="Shoutbox",width="300" height="400",color: #FFF);
    so.addVariable("shoutbox/server/php/shoutbox.php");
    so.addVariable("2sec", refreshTime);
    so.write("id");
    </script>

    </body>
    </html>

    this is my page
    Last edited by sen01dj; 06-28-2009 at 04:05 AM. Reason: Automerged Doublepost

  7. #7
    diabolo's Avatar
    diabolo is offline Community Advocate diabolo is on a distinguished road
    Join Date
    Nov 2007
    Location
    Jersey Shore
    Posts
    1,683

    Re: need php help

    okay, I don't really know the heirarchy for your files, but im pretty sure you don't need the public_html

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script type="text/javascript" src=(/shoutbox/js/swfobject.js></script>
    </head>

    <body>
    <script type="text/javascript">
    swfobject.embedSWF("shoutbox/Shoutbox.swf,id="Shoutbox",width="300" height="400",color: #FFF);
    so.addVariable("shoutbox/server/php/shoutbox.php");
    so.addVariable("2sec", refreshTime);
    so.write("id");
    </script>

    </body>
    </html>

  8. #8
    sen01dj is offline x10Hosting Member sen01dj is an unknown quantity at this point
    Join Date
    May 2009
    Posts
    40

    Re: need php help

    Thanks diabolo
    I change the path
    I know its dificult to answer my qustion
    I am using adobye dreamwiver .I drag swf file into html page
    now it says connecting to server

    this is page http://www.sensitivedjs.co.cc/test.html

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script type="text/javascript" src=(/shoutbox/js/swfobject.js></script>
    </head>

    <body>
    <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="500" height="375">
    <param name="movie" value="shoutbox/Shoutbox.swf" />
    <param name="quality" value="high" />
    <param name="wmode" value="opaque" />
    <param name="swfversion" value="9.0.45.0" />
    <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
    <param name="expressinstall" value="Scripts/expressInstall.swf" />
    <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
    <!--[if !IE]>-->
    <object type="application/x-shockwave-flash" data="shoutbox/Shoutbox.swf" width="500" height="375">
    <!--<![endif]-->
    <param name="quality" value="high" />
    <param name="wmode" value="opaque" />
    <param name="swfversion" value="9.0.45.0" />
    <param name="expressinstall" value="Scripts/expressInstall.swf" />
    <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
    <div>
    <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
    <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
    </div>
    <!--[if !IE]>-->
    </object>
    <!--<![endif]-->
    </object>
    <script type="text/javascript">
    so.addVariable("shoutbox/server/php/shoutbox.php");
    swfobject.registerObject("FlashID");
    </script>

    </body>
    </html>

  9. #9
    diabolo's Avatar
    diabolo is offline Community Advocate diabolo is on a distinguished road
    Join Date
    Nov 2007
    Location
    Jersey Shore
    Posts
    1,683

    Re: need php help

    i think you need to place
    <script type="text/javascript">
    so.addVariable("shoutbox/server/php/shoutbox.php");
    swfobject.registerObject("FlashID");
    </script>

    before this

    <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="500" height="375">

    so that javascript can flash before it runs to user shoutbox.php as server

    but then again Im not good with JS/Flash interactions

  10. #10
    sen01dj is offline x10Hosting Member sen01dj is an unknown quantity at this point
    Join Date
    May 2009
    Posts
    40

    Re: need php help

    define('CONFIG_SQL_DBHOST', 'localhost');

    db host :my usre name,or public_html path or just localhost? How can I fill this
    help me
    thanks

    http:www.sensitivedjs.co.cc
    http:www.sensitivedjs.co.cc/test.html

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Ever Been Suspended For Using PHP?
    By dragoneye_xp in forum Off Topic
    Replies: 26
    Last Post: 08-16-2009, 07:17 PM
  2. [PHP] Variables in PHP
    By Bryon in forum Tutorials
    Replies: 15
    Last Post: 01-29-2009, 09:46 AM
  3. currently have an application pending php
    By biomasti in forum Free Hosting
    Replies: 1
    Last Post: 09-03-2008, 01:58 PM
  4. php errors galore
    By DMG Online in forum Scripts & 3rd Party Apps
    Replies: 9
    Last Post: 05-17-2008, 06:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers