-
Posts
198 -
Joined
-
Last visited
Posts posted by kamal213
-
-
Genius I follow!
So what i should be doing is set it to 0 for example then update it to 1
Genius! will try it out.
I've finished work now..gotta beat the traffic.
If your online tonight or tommorow I let u kno how I get on.
Thanks buddy u've been a revelation.
speak 2 u soon
-
Yeah..am with you.
Does it mean I have to create field in my table called booked?
Do I need an if and else statement? could you give a simple example of how it would look like.
Thanks alot fugix
-
sure fugix
$getquery=mysql_query("SELECT * FROM book_appointment WHERE c_id='$check_id'"); while($rows=mysql_fetch_assoc($getquery)) { $b_id = $rows['b_id']; //appointment id $manager = $rows['username']; // the admin who booked the app. i.e. me $b_date = $rows['b_date']; //app date $b_time = $rows['b_time']; //app time $c_id = $row["c_id"]; //customers id $b_datestamp = strftime("%b %d, %Y - %X", strtotime($rows["b_datestamp"])); echo '<p></p><strong><a href="viewdiary.php">Appointment Booked</a></strong> for <strong>' . $b_date . '</strong> - ' . $b_time . ' - by:<strong>' . $manager . ' </strong> on <em>' . $b_datestamp . '</em> </p>' ;}
Let me know if its ok.
Thanks
-
No problem Maq. I'm not sure wat it does but I will check it out.
Thanks
-
Thanks for you reply fugix.
Yeah I think you are right, if customer appointment booked remove else display..somethang like that.
The problem is I havent designed a system like this before so am not sure how you would code it.
I am using a simple php form and once the user fills in the date and time and hit submit the details are store in the database, please see my php code below (its quite long that why I was not sure in I should send it but I guess you can copy and paste if that helps).
Apologies if its too long..let me know if you need more info.
<form action="customers.php?id=' . $pageid . '" id="form2" name="form2" method="POST" target="_self" onsubmit="return validate_form ( );"> <table> <tr><td><input type="hidden" name="username" value="' . $manager . '" readonly/></td></tr> <tr><td><input type="hidden" name="c_name" value="' . $c_name . '" readonly/></td></tr> <tr><td><input type="hidden" name="c_address" value="' . $c_address . '" readonly/></td></tr> <tr><td><input type="hidden" name="c_city" value="' . $c_city . '" readonly/></td></tr> <tr><td><input type="hidden" name="c_id" value="' . $pageid . '" readonly/></td></tr> <tr><td><input type="hidden" name="c_postcode" value="' . $c_postcode . '" readonly/></td></tr> <tr><td><input type="hidden" name="c_telephone" value="' . $c_telephone . '" readonly/></td></tr> <tr><td><input type="hidden" name="c_email" value="' . $c_email . '" readonly/></td></tr> <tr><td><input type="hidden" name="c_preference" value="' . $c_preference . '" readonly/></td></tr> <tr><td><strong>Appointment Time</strong> <select name="b_time"> <option></option><option value="1pm">1pm</option><option value="2pm">2pm</option> <option value="3pm">3pm</option><option value="4pm">4pm</option><option value="5pm">5pm</option><option value="6pm">6pm</option> <option value="7pm">7pm</option><option value="8pm">8pm</option></select></td></tr> <tr><td><strong>Appointment Date</strong> <input type="text" name="b_date"/></td></tr> <tr><td colspan="2"><input type="submit" name="submit" value="Book Appointment"></td></tr> </table> </form>' if(isset($_POST['submit'])) { $manager= mysql_real_escape_string($_POST['username']); $c_name = mysql_real_escape_string($_POST['c_name']); $c_address = mysql_real_escape_string($_POST['c_address']); $c_city = mysql_real_escape_string($_POST['c_city']); $pageid = mysql_real_escape_string($_POST['c_id']); $c_postcode = mysql_real_escape_string($_POST['c_postcode']); $c_telephone = mysql_real_escape_string($_POST['c_telephone']); $c_email = mysql_real_escape_string($_POST['c_email']); $salesman = mysql_real_escape_string($_POST['salesman']); $b_date = mysql_real_escape_string($_POST['b_date']); $b_time = mysql_real_escape_string($_POST['b_time']); $c_preference= mysql_real_escape_string($_POST['c_preference']); $submit= mysql_real_escape_string($_POST['submit']); if($submit) { if($manager) { $insert=mysql_query("INSERT INTO book_appointment (username,c_name,c_address,c_city,c_id,c_postcode,c_telephone,c_email,salesman,b_date,b_time,c_preference,b_datestamp) VALUES ('$manager','$c_name','$c_address','$c_city','$pageid','$c_postcode','$c_telephone','$c_email','$salesman','$b_date','$b_time','$c_preference', now()) "); } else { echo "please fill out all fields"; } } header("location: customers.php?id=$check_id"); }
-
Hi guys,
I am currently building a customer appointment booking system with PHP.
Customers who are added are store on a customer database and displayed or listed as links dynamically in a 'customer.php' page. So you can click on a customer to view their profile i.e. name, address, time added, an so on.
Also there is a button to 'create appointment' for the customer. Click the button, a form appear, select a day and time the click submit. It all works fine.
The problem is once the appointment is booked I dont how to remove the customer from the list on the customer.php page. So am looking for something like what they have on e-commerce sites e.g a customer buys an item and that item is no longer available for another customer.
Please guys am calling for your expertise, any ideas, inputs or suggestions you may have are more than welcome.
Thanks
-
Hi BluB,
What can I say, Your a genius and you were born that way!!
Thanks buddy that was precisely wat I need - works perfectly.
Thanks once again
-
Hi guys,
I am looking for a <script> which will display a link after 5secs/5day/5months. I got a script of the w3c tutorial see below.
<html>
<head>
<script type="text/javascript">
function timeMsg()
{
var t=setTimeout("alertMsg()",3000);
}
function alertMsg()
{
alert("Hello");
}
</script>
</head>
<body>
<form>
<input type="button" value="Display alert box in 3 seconds" onClick="timeMsg()" />
</form>
</body>
</html>
The issue is that just displayes an alert box - I would prefer a link to be displayed instead.
Please guys your ideas, scripts or suggestion are more than welcome.
Thanks
-
yes all appointments have a primary key id. I will try it out in let you kno how I get on
Thanks phppaper
-
Thanks for your reply undrium
Soz for sounding daft but I have never designed something like that befere..how would go about doing that?
Thanks buddy.
-
Thanks for gettin back to me phppaper.
How do I code it so sends all the deleted appointments to the log table?
Thanks
-
Hi guys,
I have a PHP site where logged user can book appointments.
I would like the system to be able to monitor which users edited and deleted an appointment or appointments (e.g 'appointment edited/last edited by...').
I already understand how to edit and delete appointments from the MySQL, but the problem is how do I display who deleted/edited the appointment/s.
Please your ideas and suggestions a more than welcome.
Thanks
-
I spend all weekend analyzing your script and I finally figure how to get it to work..mostly had to set some variables and write new queries to suite my need am it worked like a house on fire!!
So thanks for your help bro..You is a STAR
Kamal
-
Lol!
It was not my proudest moment getting his name wrong lol!
Yeah I will use it as a guide to my system tho its not exactly what am looking for it works perfectly.
Thanks for you help tho spiderwell
-
Thanks drisate,
This is great stuff bro, I am definately way below your level of coding! lol!
My version of php is php5 so had to make few twirks to the code and it works thanks bro.
Though the code works perfectly its not exactly what am looking for, nevertheless I will use this as a guide. Its gonna help alot!
Thanks for your help bro!
-
Apologiez bro, I obviously had a big blondie moment.
Yeah I kinda noticed it, i'll make tha change now.
Will be in touch soonest.
-
Thanks spiderwell for your reply bro.
U won't believe how long its took me to get suggestions.
Am just having a look at your code, will get back to you as soon as am through.
Thanks again bro
Kdiamonds
-
Hi guyz,
I am looking to create a dymanic comment box for my website where already logged in users can comment on webpages.
It is quite a challenge getting to dynamically display only the comments a particular user posted on a web page.
What I mean is I would like to be able to click on a page, see only the comments logged users posted on that page, and then post my own comment on that page. At the moment I created a comment box for my webpages but the issue is my posted comments on one particular page is displaying on all web pages with is comment system..This is the problem and it is very difficult to find helpful material hopefully you guyz can come to the rescue.
Please guys any help or suggestions are more than welcome.
Thanks
Kdiamonds
-
Hi freemancomputer,
We have exactly the same problem, How are you getting on?
Got to the following link: http://www.htmlcommentbox.com/ See if it helps you simply copy n paste the html on you webpage, it is fully dynamic.
If you have already done yours please could you let me know how you did it.
Thanks n Goodluck
Kamal213
Removing objects from a list
in PHP Coding Help
Posted
Thanks alot fugix for your time and effort.
Problem solved!!!!!