Ask a Question related to PHP Development, Design and Development.
-
A. Alfred Ayache #1
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
-
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... -
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... -
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... -
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... -
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... -
Tyrone Slothrop #2
Re: PHP/HTTP Linking Pages
On Fri, 13 Feb 2004 03:00:18 GMT, A. Alfred Ayache
<x_alfred_X@nospam.lastbyte.ca> wrote:
Getting another page:>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!
- 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
-
PaulPosition #3
Re: PHP/HTTP Linking Pages
"Tyrone Slothrop" <ts@paranoids.com> wrote in message
news:nloo20db6t75n49clnkgpr12d8gv55ppgb@4ax.com...I think what Alfred is looking for has more to do with opening a different> 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
>
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
-
A. Alfred Ayache #4
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...> I think what Alfred is looking for has more to do with opening a different> > 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
> >
> 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
-
PaulPosition #5
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...Alfred,> 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?
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
-
Marc Nadeau #6
Re: PHP/HTTP Linking Pages
A. Alfred Ayache a écrit:
Ther is no such thing as a best method for all situations.> 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.
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



Reply With Quote

