Reply to Re: QUERY AND UPDATE PROBLEM

Your name:

Reply:


Posted by Kimmo Laine on 02/23/06 10:20

"Lag" <lagoron@gmail.com> wrote in message
news:1140671438.716831.205800@u72g2000cwu.googlegroups.com...
> Having a problem updating my database from a web page, through a
> submission form. Can anyone help?
>
> ----THIS IS MY CODE IN update.php----(user, pass, and database are
> typed in directly, I changed them here for securiy reasons :) )
>
> <?php
>
> /*---CONNECT TO DATABASE---*/
>
> $conn = mysql_connect("localhost", "user", "pass") or
> die(mysql_error());
> mysql_select_db("database",$conn) or die(mysql_error());
>
> $event = $_GET["id"];
> $title=$_POST['title'];
> $date=$_POST['datetime'];
> $desc=$_POST['desc'];
>
> //---UPDATE ENTRY IN DATABASE---
> $query = "UPDATE 'calendar_events' SET 'event_title' = '$title',
> 'event_start' = '$date', 'event_shortdesc' = '$desc' WHERE 'id' =
> $event";
>
> //LIST ITEMS
> echo "$event $title $date $desc";
>
> mysql_query($query)

put:
or die(mysql_error());
here and see what the problem is.

Debugging is a difficult skill to learn.

--
"En ole paha ihminen, mutta omenat ovat elinkeinoni." -Perttu Sirviφ
spam@outolempi.net | Gedoon-S @ IRCnet | rot13(xvzzb@bhgbyrzcv.arg)

[Back to original 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

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация