View Full Version : how to view data?

01-04-2008, 09:25 AM
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 =============

$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";


===[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..


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