| | |
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 |
apache api array beginner binary body broken buttons cakephp checkbox class cms code cron curl database date date/time display dynamic ebooks echo email error file files folder form forms function functions global google href htaccess html image include insert ip javascript joomla limit link list login mail mediawiki menu mlm msqli_multi_query multiple mycodeisbad mysql number oop parameter paypal pdf php phpincludeissue problem query radio random recourse recursion regex remote script search seo server sessions sms source sp space speed sql static subdomain syntax system table tag tutorial update upload url validator variable vbulletin video web webdesign white wordpress xml youtube





