hi...
i'm new to the php and now i'm getting an error to insert my data inside the form..and also undefined index in latest_updated. .....
Now,i'm having trouble catching what i'm doing wrong....Here's my code to the query entry...
<?php
include 'config.php';
$pili_id=$_POST['pili_id'];
$branch=$_POST['branch'];
$zone=$_POST['zone'];
$location=$_POS T['location'];
$type=$_POST['type'];
$subtype=$_POST['subtype'];
$alamat=$_POST['alamat'];
$latest_updated =$_POST['latest_updated '];
$query = "INSECT INTO pili VALUES (pili_id, branch, zone, location, type, subtype, alamat, latest_updated)
('$pili_id', '$branch', '$zone', '$location', '$type', '$subtype', '$alamat', '$latest_update d')";
mysql_query($qu ery) or die('Error, insert query failed');
echo " '$pili_id' <b> '$branch' </b> ,'$zone', '$location', '$type', '$subtype', '$alamat','$lat est_updated'";
?>
Can anyone give me a clue..?
thanks...!!!!
3 2448
why do you want to put INSECTs into your DB ???
opps....sorry.. ..actually it is "INSERT",no t "INSECT"!!!!wro ng typing...
but after i change it to "INSERT"... it doest working too....
I am having somewhat of a similar problem, but the following should help out a bit... I can elaborate more once I get an answer to my own problem, lol.
[php]
<?php
include 'config.php';
$pili_id=$_POST['pili_id'];
$branch=$_POST['branch'];
$zone=$_POST['zone'];
$location=$_POS T['location'];
$type=$_POST['type'];
$subtype=$_POST['subtype'];
$alamat=$_POST['alamat'];
$latest_updated =$_POST['latest_updated '];
$query = "INSERT INTO pili (pili_id, branch, zone, location, type, subtype, alamat, latest_updated)
VALUES ('$pili_id', '$branch', '$zone', '$location', '$type', '$subtype', '$alamat', '$latest_update d')";
mysql_query($qu ery) or die('Error, insert query failed');
echo " '$pili_id' <b> '$branch' </b> ,'$zone', '$location', '$type', '$subtype', '$alamat','$lat est_updated'";
?>
[/php]
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Morten Gulbrandsen |
last post by:
mysql> USE company;
Database changed
mysql>
mysql> DROP TABLE IF EXISTS EMPLOYEE;
--------------
DROP TABLE IF EXISTS EMPLOYEE
--------------
Query OK, 0 rows affected (0.00 sec)
|
by: george |
last post by:
This is like the bug from hell. It is kind of hard to explain, so
please bear with me.
Background Info: SQL Server 7.0, on an NT box, Active Server pages
with Javascript, using ADO objects.
I'm inserting simple records into a table. But one insert command is
placing 2 or 3 records into the table. The 'extra' records, have the
same data as the previous insert incident, (except for the timestamp).
|
by: Bercin Ates via SQLMonster.com |
last post by:
I?m getting an error when I execute a stored procedure which is try to insert a row to a table.
The error is:
Server: Msg 1934, Level 16, State 1, Procedure SRV_SP_IS_EMRI_SATIRI_EKLE, Line 32
INSERT failed because the following SET options have incorrect settings: 'ANSI_NULLS.'.
In my sp, I insert an row to a table. But also I created a view which is select some fields from this table.
(Note: Some fields are calculated fields in this...
|
by: JNariss |
last post by:
Hello,
I have created a connection to one of my databases using DreamWeaver
and created a form. When I go to preview the form in a browser I can
see it and fill out fields. However when I click the submit button I
receive the following error:
Microsoft JScript runtime error '800a1391'
'MM_ITEmpStat_STRING' is undefined
|
by: technocraze |
last post by:
Hi guys,
I have encountered this error when updating the values to the MS Acess table.
Error : Update on linked table failed. ODBC sql server error Timeout expired. MS Acess is my front end and sql server is my backend server.
This error occured whenever i step through and when it reaches rs.update it jux hangs down there and thereafter it shwn the aforementioned error. I am using the RecordSet properties to add the values. Can I use...
| |
by: yogesh |
last post by:
mysql in c++ initialize error occurs a simple program is executed in
redhat9.0 , using gcc 3.2.2 compiler version ...
#include <stdio.h>
#include <mysql.h>
#include <string.h>
int main()
{
|
by: wizard |
last post by:
Hello dear friends,
I am writing a small program to test transactions in php. But when I
try to simulate an error condition during transaction, my php script
aborts. It does
rollback work, but I cannot continue the script. Please help. I am a
newbie to both php and postgresql.
PostgreSQL 7.4.17
PHP 5.1.6
|
by: anfetienne |
last post by:
i take information from a database and then have the collected values entered into a form with hidden fields.
<input type="hidden" name="returnURL" id="returnURL" value="<?php print $returnURL;?>"/>
<input type="hidden" name="tempID" id="tempID" value='<?php print $random_digit;?>'/>
<input type="hidden" name="htmlcss" id="htmlcss" value='<?php print $htmlcss;?>'/>
<input type="hidden" name="header" id="header"...
|
by: alexdavies82 |
last post by:
I am having a problem producing a relatively simple PHP code.
Whenever I run it it gives the following fault message:
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |