| | |
Redirecting to previous URL
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Mar 2009
Posts: 23
Reputation:
Solved Threads: 0
hi,
i am redirecting user to previous page after adding the data.
user has come from the url
where add data button is placed
to
for adding the data (add data page)
now i am rediirecting the browser to preview URL from where he came to add data page.
i am using header('Location:'.$_SERVER['HTTP_REFERER']);
but it's giving me URL like http://localhost/http://localhost/go...iewimage/54400
which is incorrect redirection
could anybody please tell me how can i make it woking like this URL
http://localhost/goaweb/admin/viewimage/54400 with $_SERVER['HTTP_REFERER']
Thanks.
i am redirecting user to previous page after adding the data.
user has come from the url
PHP Syntax (Toggle Plain Text)
http://localhost/goaweb/admin/viewimage/54400
where add data button is placed
to
PHP Syntax (Toggle Plain Text)
http://localhost/goaweb/admin/addpic/NTQ0MDA=
for adding the data (add data page)
now i am rediirecting the browser to preview URL from where he came to add data page.
i am using header('Location:'.$_SERVER['HTTP_REFERER']);
but it's giving me URL like http://localhost/http://localhost/go...iewimage/54400
which is incorrect redirection
could anybody please tell me how can i make it woking like this URL
http://localhost/goaweb/admin/viewimage/54400 with $_SERVER['HTTP_REFERER']
Thanks.
Rahul K
They say, its not possible. Well it is, and relatively easy to accomplish!
They say, its not possible. Well it is, and relatively easy to accomplish!
•
•
Join Date: Jul 2004
Posts: 234
Reputation:
Solved Threads: 8
Try this code
php Syntax (Toggle Plain Text)
header('Location: '.$_SERVER['HTTP_REFERER']);
•
•
Join Date: Mar 2009
Posts: 23
Reputation:
Solved Threads: 0
it's not working.
Rahul K
They say, its not possible. Well it is, and relatively easy to accomplish!
They say, its not possible. Well it is, and relatively easy to accomplish!
•
•
Join Date: May 2008
Posts: 232
Reputation:
Solved Threads: 19
php Syntax (Toggle Plain Text)
header('Location: '."http://".$_SERVER['HTTP_REFERER']);
My Blog, Life and everything that matters to me - SamRudge.co.uk
2x Macbook Pro's, 1x Mac Pro, 1x iMac, 2x Macbook's running Fedora linux - In conclusion, I hate windows =)
2x Macbook Pro's, 1x Mac Pro, 1x iMac, 2x Macbook's running Fedora linux - In conclusion, I hate windows =)
![]() |
Similar Threads
- Redirecting to another page with a message (PHP)
- locking webpage and redirect to another website without leaving the previous page (ASP.NET)
- Parse error: syntax error, unexpected $end (PHP)
- how to run simple c++ prog from another system? (C++)
- Help with 301 redirect code - jsp in url (JSP)
- SOMETIMES, my SID gets embedded in the URL (PHP)
- .htaccess mod_rewrite problem (Linux Servers and Apache)
Other Threads in the PHP Forum
- Previous Thread: Help with Dynamic Forms
- Next Thread: Netbeans problem with form
| Thread Tools | Search this Thread |
.htaccess alerts apache api archive array autocomplete beginner binary broken cakephp checkbox class cms code convert cron curl database dataentry date display duplicates dynamic echo email emptydisplayvalue error execute explodefunction file files firstoptioninphpdroplist folder form forms function functions google hack href htaccess html htmlspecialchars image include insert ip javasciptvalidation javascript joomla keywords limit link login mail matching menu methods mlm multiple mysql network object oop paypal pdf php problem query radio random recursion recursive redirect remote script search securephp server sessions shot sms source space sql subscription syntax system table tutorial tutorials update upload url validator variable video web youtube





