You are here: build sql query struture and values from form fields « PHP « IT news, forums, messages
build sql query struture and values from form fields

Posted by "Andras Kende" on 10/20/01 11:24

Hello,


I would like to create the mysql insert query for my html form fields,
I have a small problem it will have an extra , at the end of $sqlstruct
And extra "" at $sqldata..

Anyone can give a hint ?

////////////
foreach ($_POST as $variable=>$value){
$sqlstruct.=$variable",";
$sqldata.=$value."\"','\"";
}

$query="insert into db ($sqlstruct) VALUES ($sqldata)";
////////////



Best regards,

Andras Kende
http://www.kende.com


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.13/78 - Release Date: 8/19/2005

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация