Jump to content

need some help with showing info from my db on website


bamfon

Recommended Posts

So now i set up my db and got the form to send the data the user inputs to the database

 

 

but now i was wondering

database

ID      int(255)
Title 	varchar(255) 		
Type 	varchar(8000) 	 	
Episodes varchar(255) 		
Year 	varchar(8000) 	
Genre 	varchar(8000) 	
Status 	varchar(8000) 	
Summary varchar(8000) 	
pic 	varchar(8000) 	 	
dataadd 	date 

 

so i was wondering.

 

let say i enter info in to the database using the form.

and now i wanted the info to show on a page

 

so if i ented this in

 
ID 	Title 	Type 	Episodes 	Year 	Genre 	Status 	Summary 	pic   dataadd
1 	king 	TV Series 	12 	1992 	anime 	ongoing 	i can fly 	 ww.dddddfd 	2010-02-05

 

and i wanted to show on a page but i did not want it to show next to each other

like i wanted title to show at the top and type near the bottom of the page how would i go about doing that      ( something like how it shows on this site here http://www.animeseason.com/ookami-kakushi/ )

sorry if i cant explain it that well. lol not really good at explaining stuff well

Using the queries you can select specific fields from the tables so lets say you wanted to

display three columns to display out of the table.

 

You could then dump each column in an array

$titles = mysql_query("SELECT title FROM my_table");

then just display using whatever method you want them to be formatted in.

This way each column could be stored in seperate arrays to display when and where it pleases u.

 

See http://www.w3schools.com/php/php_mysql_intro.asp for some good reference. If you have any specific problems let us know.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.