473,507 Members | 8,335 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

am being unable to insert staff in my sql database using wamp server

7 New Member
k
am using php and mysql in dreamweaver.the thing is my code seems k and when running my webpage it is saying my staff are successfully inserted in mysql db.mysql database table has 4 columns ,productdescription,product quantity ,servicespecifications and requesyt id wc is auto increment.the auto increment is based on all the other columns being inserted .the problem is when when the staff is being dimmed as insertd in the database the request id auto increments its self,and nomatter wat qnty u enter it is displayed as 0.
here is my code:
<?php include('mysqlcon.php');

$ProdSpec= $_POST['ProdSpec'];
$ProdQnty= $_POST['ProdQnty'];
$ServDes = $_POST['ServDes'];
//select database
mysql_select_db($database_workplan_db, $workplan_db);
// create query
$query = "INSERT INTO request(ProdSpec,ProdQnty,ServDes)VALUES('$ProdSpe c','$ProdQnty', '$ServDes')";

$result = mysql_query($query,$workplan_db) or die ("Error in query: $query. ".mysql_error());
if($result) {
echo "request values successfully inserted, thank you.";
exit();
} else {
echo"cannot inserted request values";
}

?>
Sep 5 '08 #1
1 2627
r035198x
13,262 MVP
Where is the id being displayed as 0?
Sep 5 '08 #2

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

Similar topics

2
6884
by: Yogee | last post by:
Hello all, I dont know the exact group where I should post my questions. So, I m doing it on most of the groups which support components of LAMP stack. My client wants to use WAMP ( Windows +...
1
6112
by: sheenaa | last post by:
Hello Members, I m creating my application forms in ASP.Net 2005 C# using the backend SQL Server 2005. What i have used on forms :: ? On my first form i have used some...
1
2136
by: JanvanRooyen | last post by:
Please help. I am programming illiterate and am now stuck in an argument between a programmer and my ISP I have questionnaire operating through ASP and Access. I changed IPS and since then I...
6
8139
Cintury
by: Cintury | last post by:
Hi all, I've developed a mobile application for windows mobile 5.0 that has been in use for a while (1 year and a couple of months). It was developed in visual studios 2005 with a back-end sql...
1
4310
by: fatalparadox | last post by:
I had WAMP Server installed for a few months, everything was fine. Now all of a sudden it stopped working. It still executes the PHP but it doesn't allow me to write to a .txt file anymore. When...
2
3807
by: yashiro | last post by:
Hello , i am moving my server (php,apache (wamp 2c)) to a new machine. while executing my php file ,i get the warning : Warning : mssql_connect() : unable to connect to server ..... i dont...
3
7517
by: robin1983 | last post by:
Dear All, I am facing a problem with WAMP server. i dowonload the WAMP SERVER2.0c and installed in my system. But the problem is that none of the server is running. When i try to access the...
5
2642
by: cwjacklin | last post by:
Hi all, I use WAMP server 2, php 5.2.8 This code echo "1"; include(mnminclude.'html1.php'); echo "2"; prints out "1\r\n2" even though there are only functions in html1.php file but...
19
9080
by: obtrs | last post by:
I have some code for drop down its not working it gives the errors every thing looks fine to me help me out. Errors Notice: Undefined index: from in C:\wamp\www\site\booking.php on line 6 ...
0
7109
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7313
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5619
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5039
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3190
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
411
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.