Thursday, 19 September 2013

Create and Update a table from database using php

Create and Update a table from database using php

I have a database with the following fields:
-eventname (the name of the event - text)
-datestart (the start date of the event - e.g. ../../..)
-dateend (the end date of the event - e.g. ../../..)
I need to create a table with 3 columns, and however many rows depending
on how many events there are.
Here is the code I'm using at them moment to store the database data in an
array:
$allevents = mysql_query("SELECT * FROM Events ORDER BY datestart ASC");
while($event = mysql_fetch_array($allevents)){
As I said, I then need to to display the data in a table.
I'd really appreciate some help as to how to achieve this, as I'm very new
to PHP.
Thanks a lot, Joe

No comments:

Post a Comment