Jump to content

mailing with a link


thmar

Recommended Posts

I'm doing an web application,sort of a loaning equipment application, shopping cart in another word. Now, i'm stuck and figuring out an issue. My application flow is lyk dis.

user apply loan->onClick submit button, a mail will be send to administrator to inform and in the mail, there is to be a link which allows the administrator to go straight into a page of my application to audit the stock(this is the step which i'm trying to figure it out)

 

How am i suppose to do such that i can provide the link in the mail to go straight to 1 of the page in my application securely??

 

Can any1 help me with this tnx alot!!

 

Cheers

Link to comment
https://forums.phpfreaks.com/topic/73166-mailing-with-a-link/
Share on other sites

  • 2 months later...

Add a $_GET variable onto the url that you email to the administrator, then add a check to see if that variable is set on the page that the administrator ends up at. If the variable is set, have the script react accordingly.

 

For example - someone orders item number 1. The page the administrator needs to look at is goods.php.

 

Send this link to the admin: http://www.yoursite.com/goods.php?item=1

 

Then in goods.php add this code:

 

<?php
    if(isset($_GET['item']))
        {
            $query = "SELECT something FROM sometable WHERE item_number='". $_GET['item'] . "'";
            ///query the database appropriately here
        }

Link to comment
https://forums.phpfreaks.com/topic/73166-mailing-with-a-link/#findComment-417729
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.