![]() |
|
#1
|
|||
|
|||
fast info transfer to next page with $_GET?I transfer info to the next page using something like:
PHP Code:
on http://host/page2.php I use PHP Code:
My problem: $myarray[3] can contain a wole lot of info like an article with 1000 words. My question: is it good/fast to use this combination in my case? It seems that it all pops up in the command bar of the browser and it might make my precious visitors angry. Do I have to use $_SESSION? I learned CSS one week ago... Greetings Daniel Last edited by cable_guy_67 : 21-Jun-2006 at 18:19.
Reason: added [PHP] code tag. Added [NOPARSE] to show url example.
|
|
#2
|
|||
|
|||
Re: fast info transfer to next page with $_GET?Quote:
No, it is best not to transfer large blocks of text in a GET. HTTP 1.0 had a limit of like 1024 chrs for a querystring. 1.1 expanded that but it's not unlimited. You would be better off using a POST. HTH, =C= |
|
#3
|
||||
|
||||
Re: fast info transfer to next page with $_GET?1000 words in the URL??? Wow... CalEvans is right, it's a bad (BAD) idea.
Something to consider: http://support.microsoft.com/default...;en-us;q208427 FYI: you should also familiarise yourself with this function: urlencode() when you include (string) data in GET values. If you have a "&" somewhere within the 1000 word article, you're screwed! |
|
#4
|
|||
|
|||
Re: fast info transfer to next page with $_GET?Thank you for your fast reply! It took some time to figure it out.
I am not 100% sure, but I think POST needs a javascript to work with a href. Still I think POST is a good command to forward Data. But I didn´t use it. I used on page1: PHP Code:
and on page 2 (on same server!! using same database): PHP Code:
Have Fun Last edited by SumOking : 22-Jun-2006 at 18:10.
Reason: Please insert your PHP code between [php] & [/php] tags
|
|
#5
|
||||
|
||||
Re: fast info transfer to next page with $_GET?Yes, this is what people do normally. Send the ID in the url and on the landing page, use the ID to "SELECT" the data from the database.
It's very (VERY) important for you to validate/verify the $_GET['number'] before you insert it into the query. Usually, you would use the mysql_escape_string function but since you are expecting an integer in this particular instance, it is okay to simply to do this: PHP Code:
|
Recent GIDBlog
NARMY by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need-Space | Reseller and Shared Hosting Plans! | nsuk | Web Hosting Advertisements & Offers | 0 | 06-Jun-2006 13:43 |
| Do you need affordable, reliable, fast hosting? | nsuk | Web Hosting Advertisements & Offers | 0 | 29-Mar-2006 08:08 |
| Selling Server | darkneal128 | Managed / Dedicated Servers | 4 | 28-Mar-2006 17:01 |
| [script] E-mail webmaster error page | BobbyDouglas | PHP Code Library | 0 | 19-Aug-2003 20:10 |
| Search Engine Positioning 101 and 201 "How To" Tips... | 000 | Search Engine Optimization Forum | 0 | 29-May-2003 10:34 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The