[PHP] INSERT into mysql from dynamic drop down

2004-01-06 Thread irinchiang
Hi all, Right now i would like to INSERT the values from a dynamic drop down menu into mysql database but encountered some problem here. Values in the drop down menu are retrieved from DB as follows: SNIP SELECT NAME=tutor_name CLASS=textarea ? $sql = mysql_query(SELECT DISTINCT

[PHP] Problem with INSERT Query

2003-12-30 Thread irinchiang
Hi all: Well, when i bring out the page with the drop down list it was able to display all tutors' names from tutor_name column. Anyway here's a review of my code (snip) again before i continue: --- snip $sql = INSERT

[PHP] Undefined index???

2003-12-12 Thread irinchiang
Hi all, I keep getting this error: Notice: Undefined index: tutor_id in /usr/local/.. What does undefined index exactly mean?? I did a search on the web but couldn't find any solutions. The line that cause this error is as follow: $tutor_id = $_POST[tutor_id]; . . . .if($action

Re: [PHP] Undefined index???

2003-12-12 Thread irinchiang
On Friday 12 December 2003 15:43, [EMAIL PROTECTED] wrote: I keep getting this error: Notice: Undefined index: tutor_id in /usr/local/.. What does undefined index exactly mean?? I did a search on the web but couldn't find any solutions. Basically it means you're trying to

[PHP] Need help with UPDATE and DELETE

2003-12-11 Thread irinchiang
Hi all, I am trying to do a Modify(UPDATE) and DELETE but I keep on getting DB ERROR whenever I clicked on the links to Modify and Delete...Gone thru my code a few times but can't spot any error. Anyone can help?? Below is a snip of the code:

[PHP] Display Query Result As Editable Form

2003-12-10 Thread irinchiang
Hi all, I am creating a user form whereby I will do an INSERT , SELECT , UPDATE and of course DELETE for the form. Right now I am trying to create a form whereby when user choose to update their info, they wil be directed to a form where the fields region are EDITABLE , before that, the

Re: [PHP] Constraint Violation when INSERT

2003-12-10 Thread irinchiang
Hi all, I got the error Constraint Violation when I did an INSERT . Gone thru the code umpteen times but to no avail..Wondering where my error was??...Below is a snip of the block of code: ? $dsn = mysql://root:[EMAIL

Re: [PHP] problem with INSERT query

2003-12-09 Thread irinchiang
This is what I get after I echo my query statement: INSERT INTO tutor (tutor_name, tutor_contact, tutor_email, tutor_profile) VALUES ('NULL', 'NULL', 'NULL', 'NULL') How come the value is null??? In my INSERT query, I already state my value variable to be the name of the fields in my html.

Re: [PHP] problem with INSERT query

2003-12-09 Thread irinchiang
Well, I tried that and this is what i got: INSERT INTO tutor (tutor_name, tutor_contact, tutor_email, tutor_profile) VALUES (''irin'', ''788798878'', ''[EMAIL PROTECTED]'', ''no profile'') DB Error: syntax error well, when I echo again, i can successfully see the values I entered. But this

Re: [PHP] problem with INSERT query

2003-12-09 Thread irinchiang
Well, I tried that and this is what i got: INSERT INTO tutor (tutor_name, tutor_contact, tutor_email, tutor_profile) VALUES (''irin'', ''788798878'', ''[EMAIL PROTECTED]'', ''no profile'') DB Error: syntax error well, when I echo again, i can successfully see the values I entered. But this

Re: [PHP] problem with INSERT query

2003-12-09 Thread irinchiang
Thanks alot for your help!!! It was only a spacing mistake... There should have no spacing in between each variables: VALUES ($tutor_name,$tutor_contact,$tutor_email,$tutor_profile); Thanks a million. Irin. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Constraint Violation when INSERT

2003-12-09 Thread irinchiang
Hi all, I got the error Constraint Violation when I did an INSERT . Gone thru the code umpteen times but to no avail..Wondering where my error was??...Below is a snip of the block of code: ? $dsn = mysql://root:[EMAIL

RE: [PHP] Constraint Violation when INSERT

2003-12-09 Thread irinchiang
Hi all, I got the error Constraint Violation when I did an INSERT . Gone thru the code umpteen times but to no avail..Wondering where my error was??...Below is a snip of the block of code: ? $dsn = mysql://root:[EMAIL

Re: [PHP] problem with INSERT query

2003-12-09 Thread irinchiang
[EMAIL PROTECTED] schrieb: Thanks alot for your help!!! It was only a spacing mistake... There should have no spacing in between each variables: VALUES ($tutor_name,$tutor_contact,$tutor_email,$tutor_profile); hi, a space after a comma shouldn't be a problem. your problem were

[PHP] problem with INSERT query

2003-12-08 Thread irinchiang
Hi all, I am trying to do a simple INSERT data into the database using the following php script but the problem here is that whenever I click submit, the script only insert a NULL value into the columns into the datadase instead the value I enter in the forms fieldSELECT query was

[PHP] Doubts With Select Queries

2003-12-03 Thread irinchiang
Hi all: Having some doubts with sql select queries here : Right now, I have a student and a withdraw tables. For example, when student John has withdrawn, his name will be inserted into withdraw table but John's record will be kept in student table for a period of 30 days before it is

Re: [PHP] Doubts With Select Queries

2003-12-03 Thread irinchiang
On Wednesday 03 December 2003 17:30, [EMAIL PROTECTED] wrote: Having some doubts with sql select queries here : Right now, I have a student and a withdraw tables. For example, when student John has withdrawn, his name will be inserted into withdraw table but John's record will be kept

[PHP] FLAG

2003-11-25 Thread irinchiang
On Tue, Nov 04, 2003 at 03:19:20PM +0800, [EMAIL PROTECTED] wrote: : : Hi calling out to all programmers: : : I heard that there is a term used by most programmers called FLAG . : Anyone aware of that?? Its a kinda Indicator eg. I have a table with : YES column equal to 1 and NO

[PHP] PHP to create Printable format

2003-11-20 Thread irinchiang
Hi all.. Right now, I am trying to do generation of report using PHP in which the report should be in a printable format later on. Is there any solution to use PHP to accomplish such task?? The report is viewed in a web browser and how should I create a navigation link or something whereby

[PHP] create a php timetable problem.

2003-11-05 Thread irinchiang
Hi all: A question to ask all PHP programmers out there... Right now I am doing a timetable system whereby in each cell, it will display a class code eg.3PE1234. But right now I want it to be in the way that I want the user to be able to add the class code to the table cell through a

[PHP] FLAG

2003-11-04 Thread irinchiang
Hi calling out to all programmers: I heard that there is a term used by most programmers called FLAG . Anyone aware of that?? Its a kinda Indicator eg. I have a table with YES column equal to 1 and NO column equal to 0. Does anyone know of any useful links with regards to that?? Hope

Re: [PHP] FLAG

2003-11-04 Thread irinchiang
I see, thanks for the short introduction of FLAG ... Anyway do u know of any useful links that has more info on FLAG ??? Regards, Irin. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Create Popup Window using PHP

2003-10-23 Thread irinchiang
Hi all, I have a Delete function here whereby when I click on Delete it will actually have some kinda popup window to prompt user whether they are sure to delete the following data.So, anyone have any idea how to create this popup window using PHP?? Appreciate very much for any

[PHP] gmdate problem

2003-10-20 Thread irinchiang
Hi all, Having some problem with 'gmdate' here. However, the time doesn't match with the current time on the system. What could be the problem? Do I have to set any timezone or stuff like that?...Hope to get some help here. Tue, 21st Oct 2003, 04:25 ?php echo gmDate(D, dS M Y, H:i);

[PHP] Dynamic tables

2003-10-17 Thread irinchiang
Hi all, Having a slight problem with dynamic tables here. I am trying to create a timetable using PHP, HTML, and MySQL, where all the cells in the table are coloured and that the colour of the cells can be changed using a drop down menu. Here's a snip of the code that I have done: td

[PHP] Select Query problem

2003-10-06 Thread irinchiang
Hi all, Having a slight problem with mysql select query right here. I've learnt that if I were to select a particular data within the last 30 days, this is what my select query should be like: SELECT something FROM tablename WHERE TO_DAYS(NOW(()_TO_DAYS(date_column)=30; (This query

Re: [PHP] Select Query problem

2003-10-06 Thread irinchiang
n Mon, 6 Oct 2003 14:22:59 +0800, you wrote: Now my question is: What if I would like to display data for the CURRENT MONTH and the last 11 months???(May also said to be the LAST MONTHS) HOw should my select query be like?? On Mon, 06 Oct 2003 07:30:26 +0100, David Otton [EMAIL PROTECTED]

Re: [PHP] Select Query problem

2003-10-06 Thread irinchiang
Now my question is: What if I would like to display data for the CURRENT MONTH and the last 11 months???(May also said to be the LAST MONTHS) HOw should my select query be like?? On Mon, 06 Oct 2003 07:30:26 +0100, David Otton [EMAIL PROTECTED] wrote: This question isn't on-topic for this

[PHP] dynamic table problem

2003-10-03 Thread irinchiang
Hi all: Having some problems right here. Below are a snip my codes: td bgcolor=? echo$_POST[colour]? class=Devi width=15% align=center valign=middlea href=class.php2PE1012/a/td . . . select name=colour class=textarea option name= Grey value=#dededeGrey/option option name=Pink

[PHP] Dynamic tables-Change cell colour with drop down menu

2003-10-02 Thread irinchiang
Hi all: I am doing a dynamic kinda timetable where all the cells are uniquely coloured. And then for each cell, I would like to change its colour through a dropdown menu. This dropdown menu should of course have a list of colours for me to choose. Once I have selected the colour I want, the

Re: [PHP] Dynamic tables-Change cell colour with drop down menu

2003-10-02 Thread irinchiang
I want it to be available on the SERVER side too.. For this, javascript is unable to do it. That is why I want to use only PHP to the the dynamic table which I have mentioned. Any idea how can I change the colour of the cell from a drop down menu? Regards, Irin. -- PHP General Mailing List

RE: [PHP] Dynamic tables-Change cell colour with drop down menu[Scanned]

2003-10-02 Thread irinchiang
Hi : I have tried using the methos you have mentioned. But it was not successful as the cell doesn't seem to be able to GET the COLOUR selected from the drop down menu. This is a small part of my code : td bgcolor=$colour cell1 /td select name=colour option value=#ffRed/option option

Re: [PHP] Dynamic tables-Change cell colour with drop down menu[Scanned]

2003-10-02 Thread irinchiang
On Fri, Oct 03, 2003 at 11:27:25AM +0800, [EMAIL PROTECTED] wrote: : : I have tried using the methos you have mentioned. But it was not : successful as the cell doesn't seem to be able to GET the COLOUR : selected from the drop down menu. This is a small part of my code : : : td

Re: [PHP] Dynamic tables-Change cell colour with drop down menu[Scanned]

2003-10-02 Thread irinchiang
On Fri, Oct 03, 2003 at 11:27:25AM +0800, [EMAIL PROTECTED] wrote: : : I have tried using the methos you have mentioned. But it was not : successful as the cell doesn't seem to be able to GET the COLOUR : selected from the drop down menu. This is a small part of my code : : : td

[PHP] Accumulated Information in DB??

2003-10-01 Thread irinchiang
Hi all, I am having some doubts here and hope to hear some advices/solutions from all of you out there. Right now, I have a daily, weekly, monthly and yearly reports which stores information on all my customers. These info will of course, be stored in the DB.(MySQL). As all these reports

[PHP] Select multiple payment mode

2003-10-01 Thread irinchiang
Hi all, I am working on a receipt payment system whereby there is a select box with a list of payment mode: eg.By cash, By Nets, By Cheque etc...for customers to select the kinda payment mode they going to make their payment. How ever, there is cases in which instead of selecting only

[PHP] Calculate total amount from input

2003-10-01 Thread irinchiang
Hi all, A PHP question to ask: I am using PHP to do a calculation of the total of fields where user actually input the amount into the text field and I will calculate the TOTAL from the fields as well as the GST. Wonder how should I go about doing that? I did something like :

[PHP] if..else condition for checkbox

2003-10-01 Thread irinchiang
Hi all, May I just ask how do I do a if..elseif..else condition to check if a checkbox have been checked. For some reference, I have attached my HTML code and PHP code below: HTML: html head titlePayment Mode/title style type=text/css @import url(receipt.css); /style /head

[PHP] problem with if..else condition

2003-10-01 Thread irinchiang
Hi all, I'm having some problem with my PHP script here. Do hope to receive some help. I have written the script with a if..elseif..else ...condition to check if my checkbox have been checked. There is 3 radio button to be clicked: eg button1 , button 2 and button3.Only one to be

[PHP] Output data repeatedly more than once

2003-09-30 Thread irinchiang
Hi all, I am creating a simple receipt system whereby user will enter relevant info via a text form and using echo method to output and print the receipt data. I've used CSS as the front-end . My question is, is it possible to output the receipt information more than once on a single

[PHP] Generate Receipt Number

2003-09-30 Thread irinchiang
Hi all, I am doing a receipt system whereby it can auto generate a unique receipt number for each receipt. It will be an increment of number eg.01, 02, 03, and so on.Wonder how should I go about doing this using PHP? Do need some help here..technologies used are:PHP and

[PHP] Change cell colour with selection from a drop down menu

2003-09-29 Thread irinchiang
Hi all, I would like to create a dynamic kinda Timetable whereby I can add, del, and modify the data contained in each cell. Besides that, each cell in the table should have its unique colour in which this unique colour can be modified anytime to a different colour through an interface,