Page 1 of 1

student in need of help

Posted: Wed Feb 09, 2005 8:03 am
by 2WiReD
really sorry if this is in the wrong area but been searching for thread that covered this and cant find any.

basically i have to design and implement an online student information system using php mysql and apache.

most of the marks here are gong for the project management side of it etc, but the guy who was supposed to be doing the code has dropped out leaving us in the lurch.

need to find a site that covers how to code in php the basic site, pulling info from the MySQL db (already fully formed and populated), but all th tutorials on books in the library/online/etc are on shopping carts etc.

can anybody please help??


much appreciated and thanks for taking the time to read this,
Yours
j

Posted: Wed Feb 09, 2005 8:14 am
by JayBird
Its really not that difficuly, even for a complete beginner.

Simple query, data extraction and display

Code: Select all

<?php
// Connecting, selecting database
$link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password')
   or die('Could not connect: ' . mysql_error());
echo 'Connected successfully';
mysql_select_db('my_database') or die('Could not select database');

// Performing SQL query
$query = 'SELECT * FROM my_table';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());

// Printing results in HTML
echo "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) &#123;
   echo "\t<tr>\n";
   foreach ($line as $col_value) &#123;
       echo "\t\t<td>$col_value</td>\n";
   &#125;
   echo "\t</tr>\n";
&#125;
echo "</table>\n";

// Free resultset
mysql_free_result($result);

// Closing connection
mysql_close($link);
?>
Read the manual for more information
http://uk.php.net/manual/en/ref.mysql.php

Mark

ammended post

Posted: Wed Feb 09, 2005 8:39 am
by 2WiReD
Firstly, thank you so much for the amazingly prompt reply.

Im afraid i wasnt specific enough in my request though.

Im pretty much looking for a site with goes through the construction of an application (like all tutorials do) but instead of ending up with a shopping cart etc i need have, basically, a college type student information system, with 4 different types of users each of whom have different acces rights (as determined by info @ the db side. each user will be able to view create edit delete different amount of data depending on thier level (student, staff, senior staff etc)..most of which i gather is fairly easy but i just cant get there from the shopping cart walk thoughs.

unfortuantly im not that up to speed with programming in general (always been one of my weaker areas) and i've gotten all the business case etc side done but need a working example of the finished product for the final presentation.

so, any of you guys come across such a walk-thourgh tutorial?

once again, many many thanks

Posted: Wed Feb 09, 2005 8:47 am
by feyd
Have a read through the Starter Pack, Code Snippets, Tutorial, and Useful Posts. Starter Pack is found in the PHP - Code board as well as Useful Posts. The other two are boards of their own. There should be a lot of information in the Databases board as well.


Moved to PHP - Code..

Posted: Wed Feb 09, 2005 8:51 am
by JayBird
I think you will be very lucky to find a tutorial that matches your exact needs.

What you need to do is break down you project.

Pulling in from a DB.

Storing info in a DB.

Editing info in a DB.

Then head out on the interweb and research each of the different things you need to achieve....eventually pulling them all together to complete your application

Posted: Wed Feb 09, 2005 10:59 am
by s.dot
As said above, you will not find a tutorial to meet your exact circumstance, although many tutorials exist on the web. Even if such tutorial did exist, you'd have a hell of a time finding it.

And it sounds like you know what you have to do, but are a newbie to PHP coding. My best advice would be to practice (not on the site you're working on) but on empty pages, so you can get the techniques right, and not mess up any coding that's already on your site.

Practice makes perfect, so they say, but in programming, it just makes you less likely to make mistakes. I first started HTML when I was 15, and now at 19, I have a very limited knowledge of PHP.

I don't know what your time frame is on getting this project done, but I'd suggest practicing coding some examples of what you need to do, and then applying what you do learn ( learn by searching for tutorials on the web for what you need to learn how to do, also mentioned above ) and then find someone who can tutor you on how to work out any kinks left in your programming. Or, if you're in college, just pay someone. :D They always need beer money, right?