Reply to Re: Display selected record that has been passed to URL

Your name:

Reply:


Posted by Johannes Wienke on 03/10/06 22:32

Am 10.03.2006 19:36 schrieb Ren:
> Thanks for the quick reply.
>
> It sounds easy from what you have stated but I still can't seem to get it to
> work.
>
> I think it may be something to do with my select statement. Here is a
> sample of the code.
>
> $RID = $_GET['recordID'];

For security-resasons this should be
mysql_real_escape_string($_GET['recordID']) if magic_quotes isn't active
(depending on your system).

> $query = "SELECT * FROM dvd WHERE id = '$RID'";
> $result = mysql_query($query);

mysql_qery() won't give you any printable result. You have to use
functions like mysql_fetch_assoc() or mysql_fetch_array().

> print ("$result[title]");
>
> Just to let you know that the table is called 'dvd' and 'id' and 'title' are
> column names in my table.
>
> I am just trying to display the 'title' of the selected record.

Take a look at http://php.net/mysql_fetch_assoc There are examples how
to do this.

[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

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