Hi all,
Hopefully something simple that I don't know!
I have this:
Code: [Select]<div id="marquee">
<?php
$query = mysql_query("SELECT stock_id, stock_code, t_val, y_val FROM stocks");
while($rows=mysql_fetch_array($query))
{
$stock_code = $rows['stock_code'];
$t_val = $rows['t_val'];
$y_val = $rows['y_val'];
$stock_id = $rows['stock_id'];
echo "<marquee>";
echo "<span style='color:#09F'>$stock_code</span>";
echo " ";
echo "<span style='color:#0F0'>Todays Price = $t_val</span>";
echo " ";
echo "<span style='color:#F00'>Yesterdays Price = $y_val</span>";
echo "</marquee>";
}
?>Which simply displays the output of a database in a scrolling marquee, which almost works! However the problem I have is that it displays like this:
ROW1
ROW2
How can I make it display like this:
ROW1 ROW2
Many thanks
Why is the logic of this simple code not working?
Hey, I'm trying to determine if a table already exists in mysql, but doing a query first with mysql_query, then checking $sql as if it a were TRUE of FALSE. Which I though it would be. My Code
Multiple forms on the same page (safari)
Hello everyone,I have 3 forms on the same page, that opens in a new window and submits to a php file, this works great in IE8 but I can not get it to work in safari, I can click on the first submit
The control with ID 'ace' requires a ScriptManager on the page
I'm trying to add a simple AlwaysVisibleControlExtender to my page, but it's not working. I get the following error:The control with ID 'ace' requires a ScriptManager on the page. The
Embedding flash object in Else statement
This is my first major project in PHP and I'm having some trouble embedding a flash object in an Else statement. I've googled it several times, and looked at several sites and they all seem to
Multiple while loops
I have several DB queries that I know should be returning results and aren't. I have a feeling it has to do with the several while loops that should be outputting the data. One more issue is that
Functions Not Loading Into Div
I had some help doing some of this but what I'm trying to do is get my functions to retrieve its values from the backstagefunctions.php file and place the contents in the content div but when you
Opening Multiple Files/Links in Order.
I want to open links in order/one-by-one and check each for a specific string.Example: If i open CL, search for ads pertaining to video games. Returns 20 results. I grab these links. Now i want to
The type or namespace name 'ServiceModel' does not exist in the namespace 'System'
When I locally run the website, it works just fine, but when I uploaded it to the hosting environment, I receive the following error, can you help?
How to load mysql (and other) extensions into PHP
How to load mysql (and other) extensions into PHP PHP Development forum discussing coding practices, tips on PHP, and other PHP-related topics. PHP is an open source scripting language that has taken
What is SAP Avatar ?
Hi All,