By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,664 Members | 1,643 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,664 IT Pros & Developers. It's quick & easy.

Building a PHP website

nomad
Expert 100+
P: 664
Hello Everyone:
I might need your help in the coming months.
I will be helping build a website for a on-line School written in PHP, SQL, HTML, XML and flash
I know some PHP and SQL enough to get into trouble.
What I'm looking for is how to or templates on how to design the following.
Register forum: Client fill in their personal info. once complete sends a comfirmation by email.
My Account info- shows Member ID, Password, couse took/taken currently, test scores....
Test Completion page: interactive test (will be written mostly in XML and Flash) need to some how transfer test results to db. if pass prints out certficate. Show all test results.
Course Catalog; Subject, title of book, movie, download info, sign up for course, who taking what couse. payment (paypal)

Any leads or ideals would be great.
thanks
nomad
Feb 21 '08 #1
Share this Question
Share on Google+
9 Replies


P: 5
Hello Everyone:
I might need your help in the coming months.
I will be helping build a website for a on-line School written in PHP, SQL, HTML, XML and flash
I know some PHP and SQL enough to get into trouble.
What I'm looking for is how to or templates on how to design the following.
Register forum: Client fill in their personal info. once complete sends a comfirmation by email.
My Account info- shows Member ID, Password, couse took/taken currently, test scores....
Test Completion page: interactive test (will be written mostly in XML and Flash) need to some how transfer test results to db. if pass prints out certficate. Show all test results.
Course Catalog; Subject, title of book, movie, download info, sign up for course, who taking what couse. payment (paypal)

Any leads or ideals would be great.
thanks
nomad
for he register form you basicall got to just create a form in html:
ex:
Expand|Select|Wrap|Line Numbers
  1. <form action="" method="POST">
  2. <input name="username" size="15" />
  3. <input type="password" name="password" size="8" />
  4. <input type="submit" name="login" value="Login" />
  5. </form>
  6.  
Like that and the PHP part would be something like:

[PHP]
<?php
if( isset($_POST['login']) ){

// Check if they entered anything in the inputs
if (!$_POST["username"] || !$_POST["password"]) {
die("You need to provide a username and password.");
}

// Create query
$sql0 = "SELECT * FROM `members` "
."WHERE `username`='".$_POST["username"]."' "
."AND `password`='".$_POST["password"]."' "
."LIMIT 1";
// Run query
$sql = mysql_query($sql0);

if ( $create = @mysql_fetch_object($sql) ) {
// Login was successful, create the session variables
$_SESSION["uid"] = $create->id;
$_SESSION["uname"] = $_POST["username"];
$_SESSION["utime"] = time();

// Redirect to member page
header("Location: memberspage.php");

} else{
// Login has failed
die("Login was unsuccessful, Wrong login information.");
}

}
?>
[/PHP]

And for all the member pages you can put this in the header:

[PHP]
if (!$_SESSION["uid"])
{
// User not logged in, redirect to login page
header("Location: login.php");
}
[/PHP]
Feb 22 '08 #2

nomad
Expert 100+
P: 664
Nadeem0319:
Thanks for the help...
The hard part for me will be:
1. recording the course, test scores into the clients account.
2. payments for Downloading material and tests
3. admin maintenance ie keeping the website up and running.
keeping track of the clients. ie like a blog site where the admin can see whos on line and has the ability to change info, delete info on clients.

thanks
nomad
PS Was wondering if any of you are familiar with ZenCart would like to use that ideal of a website.
Feb 22 '08 #3

ronverdonk
Expert 2.5K+
P: 4,258
<snipped>
Almost everybody here can build a website for a price!

Paramount is that this is a website where members help each other with questions or problems. I am sure most of them can work 'for a price', but that is not the reason for tem to help in this forum.

Ronald
Feb 22 '08 #4

P: 5
Nomad,
Recording the test scores and writing the data into the DB shouldn't be that hard. You should probably get used to session variables if you aren't already and if you are planning to have tests soread out across multiple pages.

You can get a developers account from Authorize.net at no charge and they will provide a sample script(s) to show you how to connect to their server to process payments, it's not very hard but it's nice when you have a developers account where you can learn without any worries. Also, Authorize.net has a great recurring billing feature for subscriptions if they are important for your site.
Feb 23 '08 #5

Banfa
Expert Mod 5K+
P: 8,916
Nadeem0319, please note that the only type of advertising we allow on this site is the advertising of jobs and the advertising of services. However both of these types of adverts MUST appear in our Jobs forum which has guidelines covering post there.

Please do not advertise you services in this manor again, it may lead to a site ban.

Banfa
Administrator
Feb 23 '08 #6

harshmaul
Expert 100+
P: 490
Register forum: Client fill in their personal info. once complete sends a comfirmation by email.
My Account info- shows Member ID, Password, couse took/taken currently, test scores....
Test Completion page: interactive test (will be written mostly in XML and Flash) need to some how transfer test results to db. if pass prints out certficate. Show all test results.
Course Catalog; Subject, title of book, movie, download info, sign up for course, who taking what couse. payment (paypal)
Hi,
We'll go through this step by step.

First off you will need a decently normalised table structure. Normalising is different for everybody. but what i would do is this....

Expand|Select|Wrap|Line Numbers
  1. tblMembers
  2. MemberID
  3. UserName
  4. Password
etc.....

Expand|Select|Wrap|Line Numbers
  1. tblCourses
  2. CourseID
  3. CourseName
etc.....

Expand|Select|Wrap|Line Numbers
  1. tblTests
  2. TestID
  3. TestName
Once this is done, you will need a few tables to link them all together.
Each member can have many courses in their catalog, so a many to many relation ship.....

Expand|Select|Wrap|Line Numbers
  1. tblMembersLinkToCourses
  2. MembersLinkToCoursesID
  3. MemberID
  4. CourseID
Like wise, each member can take many tests.....

Expand|Select|Wrap|Line Numbers
  1. tblMembersLinkToTests
  2. MembersLinkToTestID
  3. MemberID
  4. TestID
Once this is done, i would fill out the tables Courses and Tests (manually).

BTW, i;m sorry if this bit was too basic, and if its too advanced let me know.

Once this is done you will need to implement and interface.
My rule of thumb is at least one interface per table.. we have 5 tables so will need at least 5 interfaces. So rather than me writing a "blog" on the problem make the tables, and possibly give us the table structure and we can start helping you make the UI!

:)

incase i don't help nomore (cos i'm quite crap) good luck, and i hope i will help more soon!
Feb 23 '08 #7

nomad
Expert 100+
P: 664
Hello Everyone;
Thanks for the help so far. I'm reading some info on some websites and a book on php and MYSQL as well.
Will get back to you if I need more help
You guys and gals are great.

nomad
Feb 23 '08 #8

harshmaul
Expert 100+
P: 490
Hi,
Completely off topic, but my girlfriend laughs like mutley (in your avatar). I mean properly, its well funny.
Feb 23 '08 #9

nomad
Expert 100+
P: 664
Hi,
Completely off topic, but my girlfriend laughs like mutley (in your avatar). I mean properly, its well funny.
I love that comic when I was a kid. That one reason I chose that avatar because of his laugh...

nomad
Feb 23 '08 #10

Post your reply

Sign in to post your reply or Sign up for a free account.