Re: I have a problem with dynamicly updating files...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2008-11-07 at 03:18 +0530, satinder singh wrote:
> I got a lot through a tutorial, but problem is when i tried to insert,
> problem occured using following code:
> 
> $query = "INSERT INTO contacts VALUES
> ('','$first','$last','$phone','$mobile','$fax','$email','$web')";
> mysql_query($query);
> 
> But when i used a code provided by my server for same purpose was
> sucessful, which was:
> 
> $sql = 'INSERT INTO `server account_database name`.`table name` (`id`,
> `first`, `description`, `mobile`, `fax`, `email`, `web`) VALUES (NULL,
> \'first\', \'$description\', \'$mobile\', \'$fax\', \'ghjhjhg\',
> \'ghgjghjghkgk\');';
> 
> Now My problem is that :-
>   It supports only a single or static  record at a time & from my
> cpanel, but I want that the users of my website can
> fill that form and when the click "submit query", then their input
> should be added to the table and they can view their data...
> 
> I think that , here is a trouble in diff. version. Please If you give
> me the code(query").
> With this hope that you will surely reply me at lali399@xxxxxxxxx
> 
You can only omit the fields you are adding data to in an INSERT query
if you are inserting data into ALL the fields, and in the order they
occur in the table.

However, I'm not sure quite what your problem is, could you give some
more details?


Ash
www.ashleysheridan.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux