i am having some problems using the get function. i aim using it in a href location. while the information is displayed in the url i am just having some problems extracting the required information. here is my code below

this is the code for my href location

echo"<tr><td>$row[0]</td><td>$row[1]</td><td><a href='myform.php?,mode=edit;coursecode=$row[0]'>edit</a></td</tr>";

this is the code where i need to use the value of the course code.

if ($_GET['mode'] == 'edit')
{	$c=$_GET['coursecode'];
	// editing an existing entity
	// check for value of id
	if (!$_GET['coursecode'])
		echo "error: no coursecode specified, <a href=\"{$_SERVER['PHP_SELF']}\">click here to continue</a>";	
	if (!$_POST['submit'])
		// first access to form
				// checking if the record is in the database 
		$query = "SELECT * FROM courses WHERE course_coode='$_GET[coursecode]'";	
		if (!$result=mysql_query($query))
			echo '<p>nice</p>';
			echo "error: user with id {$_GET['coursecode']} does not exist, <a href=\"{$_SERVER['PHP_SELF']}\">click here to continue							 				</a>";	
			echo 'good shit';	
				$row = mysql_fetch_assoc($result);
		// retrieve recored
		//$query = "SELECT * FROM courses WHERE course_coode =$_GET['coursecode']";
		//$result = ...;
		// if record does not exist
		/* if (... record not found ...)
			echo "error: user with id {$_GET['id']} does not exist, <a href=\"{$_SERVER['PHP_SELF']}\">click here to continue</a>";	
		// put existing record into $_POST
		/* $_POST['name'] = $row[0];
		   $_POST['id'] = $row[1];
		//$_POST['name'] = "user";
		//$_POST['id'] = "1234";
	if ($_POST['submit'] == 'Save')
		// user clicked save

		// validate submitted data
		$messages = validate_input();
		if (count($messages) > 0)
			// invalid data, print form for resubmission
			// data was good, update entry
			/* code to save entry */

				$con = mysql_connect("$hostname","$username","$password");
				if (!$con)
				  die('Could not connect: ' . mysql_error());
				mysql_select_db("$database", $con);
				$sql="UPDATE courses SET course_name=$coursename,level_no=$level,option_no=$optionnumber,compulsory=$comp, 	 																												
				sem_no=$sem_no,course_description=$description,credits=$credits WHEREcourse_code=$coursecode ";	
				if (!mysql_query($sql,$con))
				  die('Error: ' . mysql_error());
				//echo "1 record added";
				echo "user {$_POST['coursecode']} updated, <a href=\"{$_SERVER['PHP_SELF']}\">click here to continue</a>";
		// user clicked cancel (catch all)
		echo "operation cancelled, <a href=\"{$_SERVER['PHP_SELF']}\">click here to continue</a>";

this is what is displayed in the url when the link is clicked


can anyone offer any assistance in doing this.

You have a syntax issue ....

Try this and notice the changes I made:

echo"<tr><td>$row[0]</td><td>$row[1]</td><td><a href='myform.php?mode=edit&coursecode=$row[0]'>edit</a></td</tr>";