Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP header() and jquery mobile

I would like to use a php header('Location: newpage.php') to redirect.

I got no error, but Jquery mobile seems to fail loading the destination page and the address bar stays with the old address.

Do you have an advice please ?

Thanks!

like image 583
user1083877 Avatar asked Dec 06 '11 16:12

user1083877


Video Answer


2 Answers

try to add data-ajax="false" when you call that page, before redirecting using php header()

like image 105
Khairu Aqsara Avatar answered Oct 09 '22 02:10

Khairu Aqsara


That code sends a 302 redirect header to the user's browser, instructing it to redirect to the provided URL. It should work. Have you checked the syntax? Information here: http://www.php.net/manual/en/function.header.php

like image 35
James Avatar answered Oct 09 '22 02:10

James