You are here: Re: Update query issue... « PHP Programming Language « IT news, forums, messages
Re: Update query issue...

Posted by Rik on 12/17/51 11:55

ZafT wrote:
> Hi all - thanks in advance for any help.
>
> I am trying to write a simple update script. In fact, I am re-using
> code that I've used before (successfully) but I can't figure out why
> it is not working. The script completes without any errors, but does
> not actually update the database.
>
> Also, the "check for same name" query works fine, and will return the
> proper error if a duplicate is found.
> <?PHP
> require('header.php');
> require('config.php');
>
> mysql_connect($dbserver,$username,$password)
> or die( "Unable to connect");
> @mysql_select_db($database)
> or die( "Unable to select database");
>
> $id=$_POST['id'];
> $name=$_POST['name'];
> $description=$_POST['description'];
> $show=$_POST['show'];


$id = mysql_real_escape_string($_POST['id']);//etc...

If that doesn't work: echo the built query, and any mysql_error();

Grtz,
--
Rik Wasmus

 

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

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