Re: Multiple Values inserted into Table
| From: | Daniel Convissor | Date: | Mon, 09 Oct 2000 21:04:50 +0000 |
| Subject: | Re: Multiple Values inserted into Table | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-19247@lists.php.net to get a copy of this message | ||
Hi Ben:
There's lots wrong with your code. Sorry.
First off, it's strongly advisable to indent nested code to make it easier to
read. Easy to read code makes your life easier and the lives of people
trying to help you easier. For example, check out this extract from your
code:
if ($Submit) {
$query="SELECT Task from Tasks where Category='ProjDesc'";
if ($$value=="$idea") {
$sql = insert into projects ('project') values ('$idea');
}
}
The logical flow is easier to follow.
Okay, back to substance, rather than style...
> $idea="$idea$count";
> $idea="$myrow[0]";
Where was "$idea" in "$idea$count" set? It's not a field in your form or
set
in the PHP code.
Similarly, why are you setting $idea twice?
Anyway, what's the data type of the field(s?) you'll be inserting $ideas to?
See you,
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
More than just answers. Solutions. (SM)
http://www.analysisandsolutions.com/
4015 7 Av #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409