Current location: Hot Scripts Forums » General Community » Script Requests » Class reservation system - php


Class reservation system - php

Reply
  #1 (permalink)  
Old 07-19-03, 11:18 AM
wardazo wardazo is offline
New Member
 
Join Date: Jul 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Wink Class reservation system - php

Hi

Does anyone know where I could download a php script which would allow student to reserve a place in a class/course on a given day/time. I am not talking about booking the room itself - plenty of code for this on the net.

Can use MySQL.

Perl would be OK but php easier.

Thanks in advance.

Ward
Reply With Quote
  #2 (permalink)  
Old 07-20-03, 03:29 AM
Damian's Avatar
Damian Damian is offline
Wannabe Coder
 
Join Date: Jun 2003
Posts: 149
Thanks: 0
Thanked 0 Times in 0 Posts
hmmm... you mean like a form or something were the students fill it in and reserve ? if that's it. all you need is an html form and a php script to process the form. make an html form and post to mail.php

Here's the code for mail.php (I modified it already for you..but feel free to edit it yourself)

$header = "From: MyWebsite.com\r\n";
$header .= "Reply-To: $email\r\n";
$header .= "MIME-Version: 1.0\r\n";
$header .= "Content-Type: text/html; charset=iso-8859-1\r\n";
$header .= "X-Priority: 1\r\n";
$header .= "X-Mailer: PHP / ".phpversion()."\r\n";


$extra = "Reply-To: $email\r\n";
$subject = "Booking";
$mess = "<u><center>MyWebsite.com - Online Booking</center></u><br><br>Booking For Class : <b>$classname</b><br><br>First Name : <b>$firstname</b><br>Maiden Name : <b>$maidenname</b><br>Last Name : <b>$lastname</b><br>Address : <b>$address</b><br><br>Telephone Number : <b>".$telephone."</b><br>E-Mail Address : <b>".$email."</b>";
mail("myemail@mydomain.com", $subject, $mess, $header);

echo("Thanks. Your Booking Has Been Sent.<br><br><a href=\"".$HTTP_REFERER."\">Go Back.</a>\n");

?>

Be sure to make a form with the following textfileds/dropdowns :

classname
firstname
maidenname
lastname
telephone
address
email

The reply to address will be the E-mail address that they used.

Hope that helps
__________________
"My occupation now, I suppose, is jail inmate."
- Unibomber Theodore Kaczynski, when asked in court what his current profession was.
Reply With Quote
  #3 (permalink)  
Old 07-20-03, 04:28 AM
Henry's Avatar
Henry Henry is offline
Wannabe Coder
 
Join Date: Jul 2003
Location: Brisbane, Australia
Posts: 218
Thanks: 0
Thanked 0 Times in 0 Posts
Hey i have a similar request but i know absoulutelly no php i was looking for a javascript one but by the looks of it it doesnt exsist so if it couldn't be to hard could you modify it so it will fit this type of form.

If you could than thanks heaps or at least tell me how id be really gratefull!
<form action="mailto:members@gamehaven.cjb.net" method="POST" name="Member Apply" enctype="text/plain">
<table>
<tr>
<td>First Name:</td>
<td><input type="text" name="First Name "></td>
</tr>
<tr>
<td>Last Name:</td>
<td><input type="text" name="Last Name "></td>
</tr>
<tr>
<td>Email Address:</td>
<td><input type="text" name="Email "></td>
</tr>
<tr>
<td>Requested Username:</td>
<td><input type="text" name="Username "></td>
</tr>
<tr>
<td>Requested Password:</td>
<td><input type="text" name="Password "></td>
</tr>
<tr>
<td align="right"><input type="submit" value="Apply"></td>
</tr>
</table>
</form>
__________________
henerz
Reply With Quote
  #4 (permalink)  
Old 07-20-03, 10:37 AM
Damian's Avatar
Damian Damian is offline
Wannabe Coder
 
Join Date: Jun 2003
Posts: 149
Thanks: 0
Thanked 0 Times in 0 Posts
use the same form that you have just replace the action from the email address to the following :

action="mail.php"

put the following script in a file names mail.php

<?

$header = "From: MyWebsite.com\r\n";
$header .= "Reply-To: $email\r\n";
$header .= "MIME-Version: 1.0\r\n";
$header .= "Content-Type: text/html; charset=iso-8859-1\r\n";
$header .= "X-Priority: 1\r\n";
$header .= "X-Mailer: PHP / ".phpversion()."\r\n";


$extra = "Reply-To: $email\r\n";
$subject = "Booking";
$mess = "<u><center>MyWebsite.com - Online Booking</center></u><br><br>Booking For Class : <b>$classname</b><br><br>First Name : <b>$firstname</b><br>Last Name : <b>$lastname</b><br>Username : <b>$username</b><br><br><br>Password : <b>$password</b><br>E-Mail Address : <b>".$email."</b>";
mail("myemail@mydomain.com", $subject, $mess, $header);

echo("Thanks. Your E-mail Has Been Sent.<br><br><a href=\"".$HTTP_REFERER."\">Go Back.</a>\n");

?>

and then try it out

Damian
Reply With Quote
  #5 (permalink)  
Old 07-20-03, 04:23 PM
wardazo wardazo is offline
New Member
 
Join Date: Jul 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Hi

Not really what I had in mind, but that's my fault for not explaining things well enough. Sorry, but thank Damian.

I was thinking about something more like this:

Student logs in - presented with a calender. Chooses appropriate class on particular day. Classes can fill up; therefore, not all class places will be available. Furthermore, "level" (eg. beginner/intermediate/advanced") would further perameter which would block signing up to classes.

On top of this an admin page for each new week/month/term. I can't find anything like this on the net. If anyone has seen anything like this (free or not too expensive) please tell me.

Thanks
Reply With Quote
  #6 (permalink)  
Old 07-20-03, 05:03 PM
Damian's Avatar
Damian Damian is offline
Wannabe Coder
 
Join Date: Jun 2003
Posts: 149
Thanks: 0
Thanked 0 Times in 0 Posts
i honestly never found something like that. once i tried to search something like that for a friend of mine but then he decided not to use it after he had the horrible news that i found nothing hehe

best thing to do is create it yourself...maybe make some money of it aswell
__________________
"My occupation now, I suppose, is jail inmate."
- Unibomber Theodore Kaczynski, when asked in court what his current profession was.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and MySQL ? rob2132 Hot Scripts Forum Questions, Suggestions and Feedback 4 08-29-08 02:22 AM
Link system TAK PHP 3 08-17-03 11:17 AM
Good template system [PL]Greg PHP 3 06-28-03 04:09 AM


All times are GMT -5. The time now is 11:04 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.