Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - PHP Variables | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
Exadis

Double hammer
Level: 10

Posts: 14/32
EXP: 4327
For next: 87

Since: 04-10-04
From: Macomb, MI

Since last post: 432 days
Last activity: 339 days
Posted on 05-16-04 09:49 PM Link | Quote
Im trying to select two fields in my database, extract them, and display the two seprete feilds side by side on the webpage. I seem to be running into ALOT of parse errors when I do it, can anyone tell me what im doing wrong, i've been at this for some time now.
$name=mysql_query("SELECT id, name, post FROM test WHERE upost!='' ORDER BY id DESC LIMIT 0,10");
<br>while($info=mysql_fetch_array($name)) $display.="
<font face="verdana" size="3" color="000000">".$info[name]:",info[post]."</font>";
print " $display ";

Any insight on the problem would be very apreciated.

Edit:
By the way, that BR is not there in the script. O_o


(edited by Exadis on 05-16-04 12:50 PM)
(edited by Exadis on 05-16-04 12:50 PM)
Dragato

Goomba
Level: 9

Posts: 24/25
EXP: 3053
For next: 109

Since: 03-15-04
From: England

Since last post: 517 days
Last activity: 339 days
Posted on 05-17-04 01:08 AM Link | Quote
I think you want something along the lines of:

$name=mysql_query("SELECT id, name, post FROM test WHERE post!='' ORDER BY id DESC LIMIT 0,10");

while($info=mysql_fetch_array($name)){

echo" $info[name], $info[post]";
}

Try that, although I could be missing something
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Programming - PHP Variables | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.008 seconds.