Re: Display records on form

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Ziggy Lubowa wrote:
On Tuesday 04 January 2005 10:10, David Ziggy Lubowa wrote:

Hey guys ,

I was wondering , i have 16 records within a table in my Database , i have
managed to have a form which can add and modify the records. My only
problem is how i can display on a form when i search. Can someone give me
heads up on how i can code this in php, to display the records in a tabular
manner when i search.

how does somebody manage to create a working script to insert/update data in a table and not be able to figure out how to output a simple HTML table listing the current records?????
I mean, do you want us to teach you how to write PHP? (My rate is 40euros/hour)


--
Sorry David but your email shows little to no effort on your part to:

a, define you problem succinctly
b, show context (e.g. code,SQL snippets)
c, show that you have made a decent effort to work the problem.

given those facts you can consider yourself lucky to recieve any replies at all.

ANYWAY... seeing as I'm bitchin' at ya I might as well give you a small clue....

the process, roughly speaking is:

1. do a SQL select query. (e.g. SELECT id,name FROM mytable)
2. loop thru the result, for each row output some HTML for a table row
	e.g.

	echo '
	<tr>
		<td><a href="/edit.php?id='.$row['id'].'">edit</td>
		<td>'.$row['id'].'</td>
		<td>'.$row['name'].'</td>
	</tr>'
3. don't forget to add begin- and ending TABLE tags.


try googling 'display a MYSQL result set with PHP':
I came up with:
http://juicystudio.com/tutorial/php/mysql.asp
(which is pretty funny cos the guy wrote a tutorial on mysql/php on an ASP based site!!)




sorry i meant 16 fields not records : )

whether you tables has 16 rows or fields seems to me to be completely irrelevant.



Any help is highly appreciated.


cheers

-Z



-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux