...

View Full Version : how to view data?



angelstar
01-04-2008, 09:25 AM
hi,
just want to know on how can I view the data that I have save into the database into another page which is in a table format..

========this is the save code =============
mysql_select_db('dbmonitoringsystem',$connect);

$sql="INSERT INTO tblmasterinvent (department, userName, dateissued, form, brand, model, serial, datepurchased, processor, system, usb, memory, harddisk, phone, cost, remarks) VALUES ('$_POST[department]','$_POST[userName]','$_POST[dateissued]','$_POST[form]','$_POST','$_POST[model]','$_POST[serial]','$_POST[datepurchased]','$_POST[processor]','$_POST[system]','$_POST[usb]','$_POST[memory]','$_POST[harddisk]','$_POST[phone]','$_POST[cost]','$_POST[remarks]')";

if (!mysql_query($sql))
{
die ('Error: ' . mysql_error());
}
echo "1 record added";

mysql_close($connect)

===[B]want to view the data that save into the database in this table====
<table border=1>
<th class="td1">Department</th>
<th class="td1">User Name</td></th>
<th class="td1">Form</td></th>
<th class="td1">Type/Model</td></th>
<th class="td1">Brand</td></th>
==========
I want all the data that I've added and save into database to appear also here..in this table..

thanks

abduraooft
01-04-2008, 09:30 AM
See the examples from www.tizag.com/mysqlTutorial/mysqlfetcharray.php



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum