need php help

sen01dj

New Member
Messages
40
Reaction score
0
Points
0
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
 

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48
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
 

espfutbol98

New Member
Messages
200
Reaction score
2
Points
0
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:

sen01dj

New Member
Messages
40
Reaction score
0
Points
0
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:

nirajkum

New Member
Messages
159
Reaction score
0
Points
0
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
 

sen01dj

New Member
Messages
40
Reaction score
0
Points
0
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:

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48
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>
 

sen01dj

New Member
Messages
40
Reaction score
0
Points
0
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>
 

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48
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
 

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48
I decided to read some of your past post, and wondering if you still have this piece of code:
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>
if so...you are butchering the code. and its really annoying me.

anyway with your current question:
it will just be localhost. like you have it now
 
Top