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
Last character removed
I have created a string from an array. I have inserted commas from my form values. I am trying to remove the last comma from the string and can't seem to remove it. I have tried chop, rtrim, substr,
double and single quotes in text fields acting up... help please
Single quotes, when entered into a text field, create an sql error upon Submit. It seems to create the query OK but says there's an SQL syntax error and stalls out on that field.Also any time a
Anti Spam Code
Ok where do i start? Probably by telling you I have very little working knowledge of PHP and that I have been working on this problem for 3 days and have had no luck!Here we go:I have a rate and
Checking if field is empty AND using !is_numeric
Hi lads,Need to be able to display an error message (using isset?) that says "Cant leave field blank" when someone clicks on submit after leaving the field blank. The problem is that I'm
Loops and Classes
I am making a template system and everything seems to be going well up until I have to loop in a variable where things starts to go weird. I need ideas on how to solve this.It is not picking up
switch not getting value
what am i doing wrong?i want to populate the country list according to the categoryi want to switch in case CategoryID=1 and CatID2=2 in the country_list tablethen call on "alpha" to
SHOW TABLES Help
Hi allI have the followingCode: [Select]<?php$sql = "SHOW TABLES";$result = mysql_query($sql);while ($row = mysql_fetch_row($result)) { echo "Table:
bind error during socket programming
i am kinda new to socket programming. wrote the below code for a server. but getting the bind error everytime. i even tried changing the port number(currently is 13 daytime) but doesnt work. please
Blank record injected into database
I always found several blank records inside my database, although $SESSION is required to insert the data into database.Why can this happen? how to prevent this?
noob question
i traying to do a php form with auto replay for both(me and the user who send me a mail),a using this codeCode: <?php$contact_name = $_POST['emp'];$contact_email =