RE: [PHP] insert not working
| From: | Mark Rees | Date: | Thu, 05 May 2005 10:57:13 +0000 |
| Subject: | RE: [PHP] insert not working | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-214510@lists.php.net to get a copy of this message | ||
-----Original Message-----
From: Ross [mailto:ross@aztechost.com]
Sent: 05 May 2005 10:16
To: php-general@lists.php.net
Subject: [PHP] insert not working
$query = "INSERT INTO sheet1 (title, fname, sname, job_title,
organisation,
street, postcode, city, telephone, mobile, fax, email, web, add_info)
VALUES
('$title', '$fname', '$sname', '$job_title',
'$organisation', '$street',
'$postcode', '$city', '$telephone', '$mobile',
'$fax', '$email', '$web',
'$add_info')";
$result= mysql_query($query);
if($result){
echo "sucess";
}
why yould this not work? I can retrievethe data but not write any data
to
the database??
--------------------------------
http://uk2.php.net/manual/en/function.mysql-query.php
Does the account you are using have INSERT permission on the database?
Does the insert statement work in mySQL's query window?
--------------------------------
R.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Gamma Global : Suppliers of HPCompaq, IBM, Acer, EPI, APC, Cyclades, D-Link, Cisco, Sun
Microsystems, 3Com
GAMMA GLOBAL (UK) LTD IS A RECOGNISED 'INVESTOR IN PEOPLE' AND AN 'ISO 9001
2000' REGISTERED COMPANY
**********************************************************************
CONFIDENTIALITY NOTICE:
This Email is confidential and may also be privileged. If you are not the
intended recipient, please notify the sender IMMEDIATELY; you should not
copy the email or use it for any purpose or disclose its contents to any
other person.
GENERAL STATEMENT:
Any statements made, or intentions expressed in this communication may not
necessarily reflect the view of Gamma Global (UK) Ltd. Be advised that no content
herein may be held binding upon Gamma Global (UK) Ltd or any associated company
unless confirmed by the issuance of a formal contractual document or
Purchase Order, subject to our Terms and Conditions available from http://www.gammaglobal.com
E&OE
**********************************************************************
**********************************************************************