help!!
Error message: End of script output before headers: customer_add.py -
import psycopg2
-
-
con = None
-
import cgi;
-
data = cgi.FieldStorage();
-
-
try:
-
customer_id = data['customer_id'].value
-
customer_lname = data['customer_lname'].value;
-
customer_fname = data['customer_fname'].value;
-
customer_mname = data['customer_mname'].value;
-
customer_birthday = data['customer_birthday'].value;
-
customer_email = data['customer_email'].value;
-
customer_contact = data['customer_contact'].value;
-
customer_address = data['customer_address'].value;
-
customer_job = data['customer_job'].value;
-
customer_company = data['customer_company'].value;
-
customer = (
-
(customer_id, customer_lname , customer_fname , customer_mname ,
-
-
customer_birthday, customer_email , customer_contact, customer_address,
-
-
customer_job, customer_company)
-
)
-
con = psycopg2.connect(database='fhms', user='admin', password='admin')
-
cur = con.cursor()
-
query = """INSERT INTO t_customer(customer_id, customer_lname,
-
-
customer_fname, customer_mname, customer_birthday, customer_email,
-
-
customer_contact, customer_address, customer_job, customer_company) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)"""
-
cur.execute(query, customer)
-
-
con.commit()
-
print "Customer Successfully Added"
0 1623 Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Philip Ronan |
last post by:
OK, here's my 2p worth:
===
Q. Why am I getting the error message 'Headers already sent'?
A. PHP produces this error message when you try to set a header for a web
page after you have already...
|
by: lkrubner |
last post by:
I'm getting this error:
Warning: session_start(): Cannot send session cache limiter - headers
already sent in
/home/httpd/vhosts/publicdomainsoftware.org/httpdocs/pdsIncludes/McSessionInfo.php...
|
by: Morten Goodwin Olsen |
last post by:
Python, PostgreSQL and bytea
Hi
I am having a bit of trouble inserting images into a postgres database
using python. The images should be stored in a bytea field.
I have tried both with an odbc...
|
by: John Pawlicki |
last post by:
I did a new install of SuSE 9.1 and had SuSE do the install via it's rpm
packages install postgresql 7.4.2. I did a pg_dump prior to this and a
restore after the new install. The database is fine....
|
by: Jerry LeVan |
last post by:
Is it possible to build the python postgresql support library
on Mac OSX 10.3.5 with the default python install?
Adding "--with-python" gets an error message about libpython
not being a shared...
| |
by: jallam |
last post by:
Hi,
I have a Python script to upload the Invoice data which is in .csv file to OTM (GLOG) system. I'm running this script using the command(given below) using a shell script and capturing the...
|
by: sigkill9 |
last post by:
I'm trying to create a script that will accept a user entered integer and find only one set of prime numbers that add up to that integer but need some help. The script is supposed to only accept...
|
by: Keith Bailey |
last post by:
Dear All,
Any help on this would be hugely appreciated.
I have had a Python programme written for me, but when I try to run it,
I get the following error message:
/*Traceback (most recent...
|
by: stephen flacke |
last post by:
Hi, if anyone can help me unscramble this exception report from Python I'd be hugely grateful. All I'm trying to do is carry out is call VISUM and carry a flow bundle. I think the problem may be with...
|
by: myxenex |
last post by:
I GET THE ERROR MESSAGE:
Warning: session_start() : Cannot send session cache limiter - headers already sent (output started at /home/aagconsu/public_html/aplomarksdtc.co.za/login.php:15) in...
|
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...
| |
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,...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |