Jump to content

Need Simple Code/ Course Register/frorm Newbie Exasperated! Help Please


terrancegavan

Recommended Posts

Here's my dilemma:

Using any text editor, create a file to store course name, course code, and maximum enrolment. Fields can be separated by a special character or special sequence of characters. The field separators must be character sequences that will not occur in a course name or a course code. Each line of the file is a separate course. Each course must have a unique name and a unique course code.

terry writes :

he says the form should be SIMPLe with three fields username: tgavan / stud#:1200/ course: arthistory

Examplecourse name: course number: max enrolment

arthistory::AH101::3

Politics::PS101::3

The reason for a low maximum enrolment in the example is to make testing easier.

Terry writes: THE SIMPLER THE BETTER BECAUSE I AM ON DEADLINE! AND AWAKE FOR 24 HOURS!!

Using any text editor, create a file to store student name and student number. Fields can be separated by a special character or special sequence of characters. The field separators must be character sequences that will not occur in a student name or a student number. Each line of the file is one student. Each student must have a unique student number. In real world enrolments, two or more students may have the same name. The application must be tested to handle that case.

terry writes :

pLEASE ADVISE OR GIVE ME AN EXAMPLE WITH 6 STUDENTS

RITE NOW I AM PLANNING THE TEST WITH TWO COURSES / MAX ENROLMENT OF 4 AND 3 IN EACH COURSE (curse??) AND SAY A TEST FIELD OF CANDIDATES WITH STUDENT IDS THAT TOTALS ABOUT 8?? dOES THIS SOUND GOOD?? hE SAYS WE NEED ONE FIELD FOR NAME NOT FIRST AND SURNAME

Example:

Robin Leach::12001

Chris Norris::12002

Terry Gavan::12003

etc

then this is the hard part writes terry:

Create any other file that may be needed to store data, for example, a file to list all students enrolled in each course. In a real world application, the code that enrols students may not have authorization to modify the student and course databases. Separating data by functionality simplifies code and maintains data integrity.

Operation

A visitor's initial access to the application will be through its main page. The main page will be named index.php.

terry writes:

i have a file called index.php and have started with an html

i know that i have to reference a php file for a _POST and that it should point toward sending the post from student name and number to the text file...

what is the best way to do that??

course requires:

The visitor will be allowed to select a course from a list.

The visitor will enter a student name and a student number. The visitor must not be shown a list of student names or student numbers.

If the student information does not match an existing student record, the visitor must not be told which part of the student information does not match.

If the student name and student number match an existing student record and if the course selected has not reached maximum enrolment and if the student has not enrolled in the course already, the student can be enrolled into the course.

The visitor must be informed of the results of the enrolment attempt and allowed to select from the course list again.

wow.. I found this mind-boggling....i need a delimiter that works in adding course and student name to the file .. and if the course is full???

we must send a reply that specifies echo "choose another course";

and this is the part where i get really lost

The objective of the assignment is to demonstrate PHP skills. To maintain focus on the server side objective, the client side must be easy to use but should not include any code except for HTML.

i taught myself html/css/html5 back in the late nineties early 200s by reverse engineering source code..

our course gives us exercises and i am obviously out of my depth here...

can anyone suggest some pathway to help...

it needs to be (pour moi) simple simple simple and adhere to what we received from those very basic instructions..

I got sidetracked adding a table to mysql with a login that required username/password (with username =>student_name and password=>student_number... and this screwed the pooch on my last 10 hours.. because we are not supposed to get into mysql or db's until end november and thus it was the wrong approach..

cheers

Terrance Gavan

here is my initial index file with log in info which was written long ago it seems ...

before i got lost in mysql db and tables

 

<html>

<head>

<title> Forms</title>

</head>

<body>

<h4>Hello First Term Students</h4>

 

<h4>This is your log-in and course selection Page</h4>

<br />

Enter your student name (given to you at registration) <br />

*Note: Your student name will take the form: tgavan wheret is the

first letter in your name and gavan is your last name. <br />

 

And then enter your student number (which is also your password)<br />

 

<br />

<form action="form_process.php" method="post">

Student Name <input type="text" name="student_name" value="" />

<br />

Student Number <input type="password" name="password" value="" />

<br /><br /><br />

Select a course:<br />

<select>

<option value="none">Pick a course from dropdown</option>

<option value="Fleming">Art101</option>

<option value="Sheridan">Politics101</option>

 

</select>

<br /> <br />

<input type="submit" value="SUBMIT" />

</form>

 

</body>

</html>

any help would be appreciated .. and i would even agree to buying you a beer or two or three!!!

i will be up all nite ... on this one as we have to test the code on the user server on Thursday!!

P{LEASE HELP!

thanks

terrance!

ps .. I received a reply from a very great guy in another appeal .. but the code was waaaaay above my pay grade and collective sensibilities.. so thank you in advance and thanks to whoever answered or answers my appeal...

terrance

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.