-
Updating Text From A MySQL DataBase ?
Hey,
I want to every second change the text that is displaid to what I have in my MySQL database using PHP. How on earth do I do this?
So far I have got..
<script type="text/javascript">
<!--
function updateMessage ( )
{
<?php
//This will load something like the time, mot saying I will use that query
$message = mysql_query("SELECT * FROM message WHERE username='admin'");
?>
document.getElementById("message").firstChild.nodeValue = "<?php echo "$message"; ?>";
}
// -->
</script>
<body onload="updateMessage(); setInterval('updateMessage()', 1000 )">
<span id="message"><?php echo "$message"; ?></span>
</body>
I am very greatful for any help you can give me, please note I MUST use PHP and MySQL.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks