Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Please help on jquery-ajax sending php session variables

Featured Replies

Please help on jquery-ajax sending php session variables

 

 

I'm just practicing my php intermediate level. I would like to know how to send php session from one page to another page.

 

Like:

 

Page A = I want to send a data from this page A to admin/page B. Where Page B is inside admin folder and it is login projected, Page A is out of admin folder and it not login protected.

 

i'm using jquery-ajax to send data when link is clicked. From Page A to Page B.

 

$('.pageAlink').click(function() {

$.get('admin/pageb.php', 'id=1&action=clicked', function(data) {

// if works do something

});

});

 

By the above code i can send the data from Page A to admin/Page C which is in admin folder and NOT login protected. If i try to send the same data to admin/Page B, it will redirect to login page and it wont accept any data since it is login protected.

 

So if i want to send the data from Page A to admin/Page B i need to send session data too with the ajax request. I do i do that? Please show me the way.

 

Thank you..

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.