마지막 변수의 OTHER 변수를 포함하는 URL에 대상 변수를 전달하려면 어떻게해야합니까? 내가 index.php?year=2014&month=3
에있어 그리고 난 edit.php 링크를 클릭하면 내가 원하는 때
기본적으로는 (index.php?year=2014&month=3
)를 기억하는 그래서 편집 한 후 다시 저를 거기 반환 ... 나는 $destination
이 배치하지만과의 충돌 내 URL 변수 ...
SERVER['REQUEST_URI']
반환 : index.php?year=2014&month=3
내 PHP 코드 :
$destination = $_SERVER['REQUEST_URI'];
$edit_url = "edit.php?id=$id&proj=$proj&t=$t&year=$year&month=$month&day=$day&destination=$destination";
내가 편집 링크를 클릭,536
이<input type="hidden" name="destination" value="/index.php?year=2014">
이 표시되어야한다 :
<input type="hidden" name="destination" value="/index.php?year=2014&month=3">
나는 그것이 있기 때문에 알고는 edit.php
에 나를 필요하면http://www.site.com/edit.php?id=5&proj=3&t=1&year=2014&month=4&day=13&destination=/index.php?year=2014&month=3
나는 그것을 보여줍니다의 소스에 숨겨진 입력 &month=3
을 포착하지 발견 이것의 원인이되는 &
기호의 ... url.php?blah=1&destination=/page.php?var=1&var=2
을 만들 수 있습니까 ??? 그렇다면 누군가가 어떻게 말해 줄 수 있습니까?
아름답다. 고맙습니다! 사이트에서 나를 허용 할 때 몇 분 안에 받아 들일 것입니다. – rubberchicken