dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: Run script if you have come from another page...

  1. #1
    Join Date
    Oct 2005
    Posts
    593

    Run script if you have come from another page...

    Hi there... this is an example of a link on my website...

    http://loddonexplorers.co.uk/delete....=file_list.php

    If they went to that, then they could delete that page.... How can i make it so that IF they have come from the file, file_list.php they can click on the button in that page that runs the link, but IF they just go directley to that address then it displays an error message... im guessing it would be using sessions?

    Cheers,
    Scott

  2. #2
    Join Date
    Feb 2005
    Location
    Tauranga
    Posts
    2,062
    sessions or $_SERVER['HTTP_REFERER'] but read the docs abot it php.net.

  3. #3
    Join Date
    Jan 2005
    Location
    Alicante (Spain)
    Posts
    7,742
    Hi! I just went to your site and told that file to delete itself which it happily did. I hope you realise I've done you a massive favour here. Someone could have used that to delete your entire website. That is the second most insecure thing I have ever seen on this board. The award for the most insecure ever has to go to sheepo-designs for this clanger in his code: ($variable)?require($variable):null;

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles