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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.