$_GET...again?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
pleigh
Forum Contributor
Posts: 445
Joined: Wed Jan 19, 2005 4:26 am

$_GET...again?

Post by pleigh »

i have an edit page here that has a query

Code: Select all

$query = &quote;SELECT comment FROM comments WHERE postID = '&quote;.$cid.&quote;'&quote;;
$result = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_assoc($result) or die(mysql_error());
$cid is

Code: Select all

$cid = $_GETї'cid'];
the cid is from another page that handles the edit link....

Code: Select all

$edit = '<a href=&quote;reportcommentedit.php?cid='.$_GET&#1111;'pid'].'&quote; class=under>EDIT</a>';
my problem is that this procedure prompts an error
Undefined index: cid in c:\inetpub\wwwroot\mysample\reportcommenteditbody.php on line 10
i cannot spot the problem....any help from you guys is much appreciated
User avatar
pleigh
Forum Contributor
Posts: 445
Joined: Wed Jan 19, 2005 4:26 am

[SOLVED]$_GET...again?

Post by pleigh »

solved
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

pleigh, seriously, start using [syntax=php]when you post php code.[/syntax]
Post Reply