PHP/HTTP Linking Pages

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default PHP/HTTP Linking Pages

    I need a little help here. I've been able to link from one page to the
    next in one of four ways:
    1-your basic anchor tag
    2-form with get
    3-form with post
    4-redirect using location header

    Now the form with post (3) seems to be the best way because it hides
    your data. The other methods put the data into the URL: the form does
    it for you, and in the anchor tag and redirect you have to construct it
    yourself.

    So my question is: Is this it? Are there any other ways of getting to
    another page? And most importantly: Is there any way to perform what
    would amount to a POST, without using a form? (i.e. can I perform a
    post through an anchor or redirect?)

    Thanks for the help!
    --
    A. Alfred Ayache
    The Apartment Database - [url]http://rentersPlus.com[/url]
    The Last Byte, Inc. - [url]http://lastbyte.ca[/url]
    A. Alfred Ayache Guest

  2. Similar Questions and Discussions

    1. Linking pages
      hi, i am not able to view the pages that are linked in the web site design file. I have set up hyperlinks to each page through hyperlinked words...
    2. linking text in master pages
      When I create master pages with text areas, and I use these master pages to compose a document, it seems not possible to link text between the...
    3. Linking to specific pages within a document
      Hi I am creating a CDRom using dreamweaver and linking to acrobat files which open in internet explorer. All files (xhtml pages, acrobat documents...
    4. button click ... linking of 2 pages :-(((( --pls help!
      hey hi... this in in continuation to my other post. i am trying hard and cannot find out whats the problem. i am getting crazy...please asp...
    5. linking pages using flash buttons
      you can't use <a></a> with a flash object. the link needs to be added to the flash movie: on (release) { getURL ("theurl.html"); } check...
  3. #2

    Default Re: PHP/HTTP Linking Pages

    On Fri, 13 Feb 2004 03:00:18 GMT, A. Alfred Ayache
    <x_alfred_X@nospam.lastbyte.ca> wrote:
    >I need a little help here. I've been able to link from one page to the
    >next in one of four ways:
    > 1-your basic anchor tag
    > 2-form with get
    > 3-form with post
    > 4-redirect using location header
    >
    >Now the form with post (3) seems to be the best way because it hides
    >your data. The other methods put the data into the URL: the form does
    >it for you, and in the anchor tag and redirect you have to construct it
    >yourself.
    >
    >So my question is: Is this it? Are there any other ways of getting to
    >another page? And most importantly: Is there any way to perform what
    >would amount to a POST, without using a form? (i.e. can I perform a
    >post through an anchor or redirect?)
    >
    >Thanks for the help!
    Getting another page:
    - include
    - fopen, fread
    - fsockopen
    - eval field from database table
    - more that don't come to me at the moment ;-)

    Posting:
    - cURL
    - fsockopen

    Tyrone Slothrop Guest

  4. #3

    Default Re: PHP/HTTP Linking Pages

    "Tyrone Slothrop" <ts@paranoids.com> wrote in message
    news:nloo20db6t75n49clnkgpr12d8gv55ppgb@4ax.com...
    > Getting another page:
    > - include
    > - fopen, fread
    > - fsockopen
    > - eval field from database table
    > - more that don't come to me at the moment ;-)
    >
    > Posting:
    > - cURL
    > - fsockopen
    >
    I think what Alfred is looking for has more to do with opening a different
    page in the browser window than importing content into the currently opened
    page. Well, judging by the example he cites anyway.

    Alfred : I'm a complete newb, but wouldn't the 'session id' concept be what
    your looking for? Basically, what it does is setting a cookie (and id
    string) and then automagically either post (priority), or get, the session
    id string to the next page which can then grab them off the post, get or
    cookie array (I don't remember).

    Anyway, check up on that, I think that's near what you want.


    PaulPosition Guest

  5. #4

    Default Re: PHP/HTTP Linking Pages w/POST Data

    Thanks Tyronne and Paul. What I'm interested in is getting to a page
    after a REQUEST from the user, and how to convey data as part of that
    REQUEST. A friend of mine suggested you could do it from the anchor tag
    using Javascript; but even if that were possible, it would confuse the
    searchbots.

    As for the $_POST array, I believe that's a one-way thing. PHP provides
    that for you to read the POST data. It doesn't ...

    You know, I've just had a moment of clarity. Clicking on an anchor
    requests the page in the link. The only ways of getting data to that
    link are either loading the link with parameters after the ?, or setting
    a cookie before-hand.

    OK, next question: How can you determine whether a user has enabled
    cookies?

    In article <yh%Wb.61046$tk6.775314@wagner.videotron.net>,
    [email]afournelleSPAMNOT@yahoo.ca[/email] says...
    > "Tyrone Slothrop" <ts@paranoids.com> wrote in message
    > news:nloo20db6t75n49clnkgpr12d8gv55ppgb@4ax.com...
    > > Getting another page:
    > > - include
    > > - fopen, fread
    > > - fsockopen
    > > - eval field from database table
    > > - more that don't come to me at the moment ;-)
    > >
    > > Posting:
    > > - cURL
    > > - fsockopen
    > >
    > I think what Alfred is looking for has more to do with opening a different
    > page in the browser window than importing content into the currently opened
    > page. Well, judging by the example he cites anyway.
    >
    > Alfred : I'm a complete newb, but wouldn't the 'session id' concept be what
    > your looking for? Basically, what it does is setting a cookie (and id
    > string) and then automagically either post (priority), or get, the session
    > id string to the next page which can then grab them off the post, get or
    > cookie array (I don't remember).
    >
    > Anyway, check up on that, I think that's near what you want.
    --
    A. Alfred Ayache
    The Apartment Database - [url]http://rentersPlus.com[/url]
    The Last Byte, Inc. - [url]http://lastbyte.ca[/url]
    A. Alfred Ayache Guest

  6. #5

    Default Re: PHP/HTTP Linking Pages w/POST Data


    "A. Alfred Ayache" <x_alfred_X@nospam.lastbyte.ca> wrote in message
    news:MPG.1a969e13bba1d41f9896ac@nntp.ym.phub.net.c able.rogers.com...
    > You know, I've just had a moment of clarity. Clicking on an anchor
    > requests the page in the link. The only ways of getting data to that
    > link are either loading the link with parameters after the ?, or setting
    > a cookie before-hand.
    >
    > OK, next question: How can you determine whether a user has enabled
    > cookies?
    Alfred,

    I strongly suggest you go and have a look (or google for) 'Session
    Variables'. Here's an excerpt from an excellent article at PHPFreaks :
    [url]http://www.phpfreaks.com/tutorials/41/0.php[/url]
    [HereIStartQuoting]
    You may be thinking right now, well that's nice, but I can do this with
    Cookies! This may come to you as a suprise, but Cookies are about 30%
    unreliable right now and it's getting worse every day. More and more web
    browsers are starting to come with security and privacy settings and people
    browsing the net these days are starting to frown upon Cookies because they
    store information on their local computer that they do not want stored
    there. PHP has a great set of functions that can achieve the same results of
    Cookies and more without storing information on the user's computer. PHP
    Sessions store the information on the web server in a location that you
    chose in special files. These files are connected to the user's web browser
    via the server and a special ID called a "Session ID". This is nearly 99%
    flawless in operation and it is virtually invisible to the user.
    Sessions can be used for a wide variety of purposes. On PHP Freaks.com we
    use them to identify a user, aide in the input of form information and
    determine user rights on the website. Based upon the information that is
    extracted about a user during the signup and login process we can do many
    cool things. If you are logged in as a Member right now, take a look on the
    left side where it says "Logged in as xxxxx". That's your first name and
    it's being read directly from your Session. Pretty cool eh? Well, enough
    babbling, let's show you how to do all of this cool stuff

    [/HereIStopQuoting]

    The idea is that it makes use of ONE cookie (to store the ID assigned to the
    user) if cookies are enabled. If they aren't, it automagically uses either
    GETS or POSTS (I'm still unsure) to keep track of it. - All your variables
    are still on the server, waiting for you to pull them.

    Give the tutorial a chance :)




    PaulPosition Guest

  7. #6

    Default Re: PHP/HTTP Linking Pages

    A. Alfred Ayache a écrit:
    > I need a little help here. I've been able to link from one page to the
    > next in one of four ways:
    > 1-your basic anchor tag
    > 2-form with get
    > 3-form with post
    > 4-redirect using location header
    >
    > Now the form with post (3) seems to be the best way because it hides
    > your data. The other methods put the data into the URL: the form does
    > it for you, and in the anchor tag and redirect you have to construct it
    > yourself.
    Ther is no such thing as a best method for all situations.

    Sometimes it is better not to hide the url.

    When the data is not sensitive and you want to make it publicly available:

    - Users can't easily bookmark a page accessed by the POST method.

    - They even can't reload the page properly.


    --
    Les hommes ont une vie plus agréable que les femme. Premièrement,
    ils se marient plus tard et, deuxièmement, ils meurent plus tôt. H.L.
    Mencken

    Marc Nadeau Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139