Go Back   Web Server Hosting Forum by BODHost > Support > PHP Forum
 

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 03-04-09, 04:45
BOD Member
 
Join Date: Mar 2009
Posts: 5
Default PHP full help part2....

good day experts... kindly help me with this situation.... i wanted to view/display all the inputted data of a certain student in table form.... how will i do it??? i am using PHP and MySQL,....and also am i able to do a SQL code creating a table??? pls help... thanks in advance....
Reply With Quote
  #2 (permalink)  
Old 03-04-09, 15:48
BOD Member
 
Join Date: Jan 2009
Posts: 98
Default

It's a bit unclear to me what you want to do, basically you're saying that you want to create a form so that a student can input their data, correct?

Then after they do that you want that data to be stored via SQL and then be able to view it.

Well once that data is stored onto the SQL, you just need access to the SQL to view the info. As for creating this, perhaps the following tutorial might help: SQL Form - SQL File - Upload File
Reply With Quote
  #3 (permalink)  
Old 03-04-09, 18:05
sam sam is offline
BOD Member
 
Join Date: Jul 2007
Posts: 141
Send a message via Yahoo to sam
Default

Quote:
if(isset($_POST['summary'])) {
$show_summary = true;
} else {
$show_summary = false;
}

< FORM method="POST" action="testpage.php" >
< INPUT type="submit" name="summary" value="Show Summary" >
< /FORM >

< ?php if ($show_summary == true) { ? >
< table border="1" cellpadding="3" >
<tr>
< td class="smallText" align="center" width="80%"><?php echo "URL" ;
?></td>
</tr>
</table>
<?php } ?>
Please check the above to insert table on your page:drunk:
Reply With Quote
  #4 (permalink)  
Old 03-04-09, 20:39
BOD Member
 
Join Date: Mar 2009
Posts: 5
Default hi laz...

ahm.... here is the situation... a professor will log in to the site then he will input students grade then save it to the database via SQL statement..... if the user is a student then he will log on to the site inputting his student number then automatically he will view his grades in a table form.... actually we wanted to have 3 type of users... the ADMIN, PROFESSOR, and the STUDENT.....
Reply With Quote
  #5 (permalink)  
Old 03-08-09, 07:52
BOD Member
 
Join Date: Jan 2009
Posts: 73
Smile

Quote:
Originally Posted by maze027 View Post
ahm.... here is the situation... a professor will log in to the site then he will input students grade then save it to the database via SQL statement..... if the user is a student then he will log on to the site inputting his student number then automatically he will view his grades in a table form.... actually we wanted to have 3 type of users... the ADMIN, PROFESSOR, and the STUDENT.....
ahh, for that you want to SELECT

so, lets say you have in your database a field called 'jobrole' inside the database called 'grades', then you would

Code:
SELECT * FROM grades.jobrole WHERE grades.jobrole = student
you can find a lot more info here
MySQL :: MySQL 5.0 Reference Manual :: 12.2.8 SELECT Syntax
Reply With Quote
  #6 (permalink)  
Old 03-09-09, 19:51
BOD Member
 
Join Date: Mar 2009
Posts: 5
Default hi PHP_RULES

SELECT * FROM grades.jobrole WHERE grades.jobrole = student


>>>> is this a direct code on the SQL statement????? actually i am really on a hard time doing PHP and MySQL....
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump


All times are GMT -6. The time now is 22:55.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Copyright © 1999-2012, BODHost Ltd. All rights reserved.