Page 1 of 1

parameter passing - unwanted space

Posted: Wed Apr 11, 2007 3:58 pm
by slash_gnr3k
i am passing variables from a 'display' page to an 'edit' page as follows:

Code: Select all

	<?php
		echo '<p><a href ="../edit_pages/editrecipe.php?
		dishid=' . $dishid . '&
		name=' . $name . '&
		method='. $method . '&
		preptime=' . $preptime . '&
		cooktime=' . $cooktime . '
		">Edit</a>';

	?>
however on the edit page, for some reason the method parameter is given an extra space, this is proved by

Code: Select all

method=%20insert%20here
the extra %20 at the beggining. i really cant see why this is happening. can anyone see?
thanks

Posted: Wed Apr 11, 2007 4:06 pm
by feyd
$method is set "incorrectly"

Posted: Wed Apr 11, 2007 4:37 pm
by RobertGonzalez
We might be able to see, if we could see where $method is being set. Since we cannot see where it is getting its value from, we really cannot make any assessments of how the space is getting there.

Posted: Wed Apr 11, 2007 4:49 pm
by slash_gnr3k
sorted it thanks. it was passed to this page from another page which it was passed to(!) so the problem was two pages back in the chain. if that makes sense!