Hey, I know this seems very novice, but I've been in school/on vacation for past 4 months, and I'm very, very rusty. Please help me Okay, so basically I have a table with 3 columns: interestnp, interestrs, and interestwv. Each column has 1 row with a number in it. I basically want to know the php script that will let me pull up that number and display it. Like, on one part of my site I want only the interestrs number, but on the other I want the interestnp number. So I need to pull them up separately. Do I need to change my table format for this? Thanks for the help in advance.
nope, you dont have to do anything in the table.. you will do this in your query $result = mysql_query("SELECT * FROM tablename"); // to show all records on those 3 columns while($Fresult = mysql_fetch_array($result)) { echo $Fresult['interestnp'] . "<br>" . $Fresult['interestrs'] . "<br>" . $Fresult['interestwv']; } PHP: to seperate the two columns $result = mysql_query("SELECT interestnp AS name FROM tablename"); // to show all records on that columns while($Fresult = mysql_fetch_array($result)) { echo $Fresult['name']; } PHP: this is the simplest way of doing this,, hope this help.. ive done it in rush,, its lunch time here... keep posted if i have a bug on the script... gtg.. eat mode
K thanks. Haven't tried it yet, but when I do I'll post (unable to right now). Will this script work over and over on the same page? Like, if I put it on the top of the page, can I also run the script at the bottom. Interestnp at the top, and interestrs at the bottom? Thanks!
yep, you can put this script over and over again.. gudluck on your project! send us some news on your project! keep posted