Click to See Complete Forum and Search --> : Advice on my script please


papa_face
02-20-2007, 10:43 AM
Hello,
I was wondering if someone can give me some advice on how to go about programming my shoutbox hosting script.
I know how to code the script itself but is there any way I can allow someone to put a peice of code on their website and have that connect to the hosting script and produce a shoutbox that they can post onto etc?

I need a way of doing this without using javascript.
Is it possible?

Any advice would be appreciated.

Sheldon
02-20-2007, 04:27 PM
they could load a page from your site that calls the latest entry in your shout box.

eg: they can include http://papa_face.com/shotbox.php

which could be

<?php

$s = mysql_query("SELECT * FROM shoutbox ORDER BY dateposted ASC LIMIT 1") or die ("Error:".mysql_error()):

$r = mysql_Fetch_assoc($s);

echo($r['name'] . " said: ". $r['shoutoxcomment'] ." on ". $r['dateposted']);
?>


Of course i dont no the structure of your database.

papa_face
02-20-2007, 04:59 PM
Yeah, I really need to be able to do it without PHP, I would prefer HTML. Someone suggested a iframe to me, but im not sure if that is the best was to do it....

nloding
02-21-2007, 08:47 AM
You can't do it with just HTML. You need something server-side, like PHP.

papa_face
02-21-2007, 09:06 AM
Well ive done it with HTML working with PHP, thanks for your input though

Sheldon
02-21-2007, 10:44 PM
That is exactly what i posted. The PHP is run on your site to return the databse info. It can be called by plain html/iframe/frame or a PHP include, whate ever you please