How to go back previous ajax url in codeigniter? - php

When page loaded http://something.com/user/mycourses address in the browser url. In the page there are two ajax requests are there. One is http://something.com/user/learnnow address(Shows learning courses) and http://something.com/user/teaching(shows teaching courses). If I click on teaching, ajax will load the page. If I click on browser back button to go to learnnow page, it takes me another url before mycourses page. I want when user click on browser back button it should go to learnow page from teaching page. How to do this please help me.

Related

Show image on button pressed in another page php

I would like to show certain image on a page which is open in a tab, only when the other page press a button. I know I can post on the other page, but is it going to be live? Because I am not gonna be refreshing the page at all. My whole plan is to press a button on one page and show live result on an another page without refreshing it. How can I make it possible? I just need the basic idea behind it. Sorry if I made it sound complicated.
Thanks

document expired after pressing back button

I have a page called a.php . It has a form and submit data via POST to same file (a.php) . Page loads with no error. Then I click any link (b.php or b.html) on that page . it directs to any page as usual. Then when I click back button from b.php or b.html it does not show previous page.
Any help to solve this matter ?
Thanks
About Method
The $_POST Method used for SUBMITTING FORMS something Create or Modify it is a secure method.In other words POST is sending data to server from browser
FOR EXAMPLE
Creating Articles
Editing Articles
File Uploading
In your case you are getting values POST is not for getting values Use $_GET method for this
Why Document Expires ?
I taken this Image from wikipedia.
Why Browser Do this?
It is because it prevent from duplicate submission.
For Example : On any shopping site there are payment options user buy a product and pay for it , now if he/she(user) refresh page again the payment done two times .
according to your question, page a.php is submitting data (post) to the page itself, so if you go to other page and then want to back again to page a.php (by clicking the back button on browser) it causes document expired because when you click it you are not submitting any data (post) to page a.php.

How to reload a parallax page to the top section on browser back button In parallax?

I have implemented parallax in my website with animation and dynamic data in down section. But when I move to another page and come back to same page with browser back button i lost all my dynamic data and animation, I brought from DB.
I want to reload a page when user clicks back button so that user will be in top section.

during button click load the same page using php

I have a signup page designed with PHP and HTML for back end connectivity.
After the button click is made entering the details, I display the message Success on the same page with the help of JavaScript.
I need the details to get stored after the button click (its working fine), what I want is after the button is clicked and the PHP database page is opened. I don't want that page to be opened after the button click.
The same signup page should be retained with the entered information saved in the database.
Is there any way to do this?
So right now, on submit, it goes to a page that stores all the data and displays a "database page". But you don't want it to do that, you just want it to go back to the index page, or to a page that says success. Correct?
If that's the case, you can use this on your "database page".
header('Location:http://yoursite.com/path/to/login.php');

php back navigation issue

I am building a php web app and I am having some trouble with the navigation. It seems the user have to hit back twice to get past one of my apparent traps. . .
Consider this situation. The user wants to upload a file with a description, so he hits upload and gets directed to the upload.php page. He fills out the form and submits the form to uploader.php. Uploader.php redirects him back to upload.php?yay=true.
From here, he needs to hit back twice to get back to the page where he hit the upload button.
Is there a clever way to keep track of which page he originally came from (this case, 2 pages back) or do i need to keep his navigation story in say the session variable?
I could also just redirect to the page from where the user hit the upload button, but this means that the back button will take him to the fileupload.php page instead of the page previously to the one that had the upload button.
Any help appriciated!
Simple after doing upload stuff, justt redirect him to the original page like
// do the upload stuff
header('location:the_page_name.php');//the page where user originaly came from

Categories