PHP/Mysql

Associate
Joined
14 May 2008
Posts
130
Ok did a uni project that i finished last week =D but never finished the program and wanting to get it to work so i can use it as referance.

with this i was displaying info from the last 3 fields and wanted to get them to update. Using a button at the bottom of the page. so far i have

PHP:
<?php

include("dbinfo.inc.php");
		
mysql_connect($host,$username,$password);
@mysql_select_db($db_name) or die( "Unable to select database");

$result = mysql_query("SELECT * FROM logs WHERE date_checked = ''");

echo "<table border='1'>
<tr>
<th>Log ID</th>
<th>ID</th>
<th>Module</th>
<th>Assignment Ref</th>
<th>set_by</th>
<th>resubmission</th>
<th>student_comments</th>
<th>date_handin</th>
<th>date_checked</th>
<th>checked_by</th>
<th>staff_comments</th>
</tr>";

while($row = mysql_fetch_array($result))
   {
  echo "<tr>";
  echo "<td>" . $row['log_id'] . "</td>";
  echo "<td>" . $row['id_number'] . "</td>";
  echo "<td>" . $row['module_code'] . "</td>";
  echo "<td>" . $row['assignment_ref'] . "</td>";
  echo "<td>" . $row['set_by'] . "</td>";
  echo "<td>" . $row['resubmisson'] . "</td>";
  echo "<td>" . $row['student_comments'] . "</td>";
  echo "<td>" . $row['date_handin'] . "</td>";
  echo "<td>" . $row['date_checked'] . "</td>";
  echo "<td>" . $row['checked_by'] . "</td>";
  echo "<td>" . $row['staff_comments'] . "</td>";
  echo "</tr>";
  }
echo "</table>";

mysql_close;
?>

Anyone know where i can look to get started on this.

Kind regards
 
Last edited:
you sure you finished this last week and not next week but getting us to do it for you?

if you understood PHP and MySQL (you just finished a unit i assume you do?) then this should be easy work.
 
ofc im sure :)

Well i never learnt PHP / MYSQL on the course i did, We did Java to MS DB which i hated since they decided last minute to change from php to java -.-.

The project was to create an app in any language and be useful and thought i would challenge myself to something i didnt know too much about.

I did it in php since i hated java and everthing i learned so far was from w3schools and other sites which i managed to get the:
Login working
submit working
cookies / session data working

But then got kinda confused which way to do this was thinking an array which stores count but then would need another field i think or serialize (which i was reading up on now).

EDIT: wasnt gettin you to do it :) was wondering for some links to where i can learn more on it / guidelines if im on the right track
 
im not expert on php/mysql either but i'd an auto_increment field into the database and use that to reference the date, should have to use an array for it afaik.

afaik its something like.


CREATE TABLE database_tablethingy (logID int unsigned not null auto_increment primary key, id_number, module_Code etc etc);

you can find some good video tutorials from 3DBuzz which teach you the basics on how php/mysql work along with some guides on creating a working guestbook and stat tracker.

EDIT: linky - http://www.3dbuzz.com/vbforum/sv_video.php?v=545
 
Last edited:
Back
Top Bottom