Results 1 to 4 of 4

Thread: Need some help Thx

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2003
    Posts
    148

    Post Need some help Thx

    Hi! all

    is there a way make my php pages to visit first page first

    like said i have this link on my site

    www.example.com
    www.example.com/index.php?id=news
    www.example.com/topic.php

    i want to make it they have to go www.example.com see main page before
    they visit other two.


    Thank you.

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Need some help Thx

    The best way to do this is to use a session cookie to identify it. Cookies are set and retrieved as follows:
    PHP Code:
    setcookie  'visited''1'0); // setting a cookie
    $visited = (bool) $_COOKIE['visited']; // getting a cookie (always cast) 
    You can check the cookie on your other pages to ensure the user has seen the index page. Why are you trying to do this, may I ask?
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 2003
    Posts
    148

    Post Re: Need some help Thx

    Oh i'm trying to make so the read the agreement first.

    thankx for your code

    but really don't know much about the php

    can you tell me more what i do with the code??


    thankx alot

  4. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Need some help Thx

    You put it in a PHP script i.e:

    index.php
    PHP Code:
    <?php
        
    // this checks weather id is set and that the agreed cookie is set
        
    if (isset($_GET['id']) && isset($_COOKIE['agreed'])) {

            
    // display notice and exit
        
    } else {
            
    // continue
        
    }
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

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



Click Here to Expand Forum to Full Width