eagerlearner — 2010-12-06T16:39:17-05:00 — #1
Hello Sitepoint friends,
Below is the PHP script that the $GET['t'] will echo as "NOT SET" if the textarea string is too long, if it's shorter then only it will display. This problem happened ONLY in my remote hosting server. BUT the text was printed out completely & without any problem in my localhost. Is there any php.ini cofiguration that deals with the $GET variable ? Thanks. I know there's one for $POST like postmax_size in php.ini
echo "NOT SET";
<form action="<?php echo $_SERVER["REQUEST_URI"] ?>" method="GET">
<textarea name="t" cols="20" rows="30">
We are different
With JobsCentral, you are not just advertising in one job portal but within an expanding network of 17+ affiliate career portals. What you get is a distinct database largely composed of graduates from local universities, polytechnics and tertiary institutions.
Effective and easy to use, JobsCentral is always developing cutting-edge technology to improve the online hiring process and augment our broad suite of recruitment and branding solutions. Our advertising towards jobseekers is aggressive and innovative; we employ print, online and mobile media to reach out to jobseekers and reward employers with the brand equity they deserve.
Providing more than just a job portal, we enhance user experience with our JobsCentral Community. Developed as an interactive site that attracts usage even when jobseekers are not looking for a job, it provides a platform for JobsCentral members to come together to share and exchange views. In addition, JobsCentral Community is also a rich source of comprehensive and relevant career-centric information.
In short, no other job portal offers effective recruitment channels and robust content like JobsCentral.
<input type="submit" />
Or any ideas what is the cause of this effect ?
Thanks for reading until this end point
scallioxtx — 2010-12-06T18:29:08-05:00 — #2
If there is a setting for the maximum allowed length of the query string ($_GET), it's in the actual web server like Apache or IIS, not in PHP.
The maximum recommended length however is 255 characters because some older proxy servers cannot handle more than that.
For lots of data consider using $_POST instead.
eagerlearner — 2010-12-07T04:55:40-05:00 — #3
Thanks Boss, I follow your order, then it works
3dvector — 2010-12-07T16:05:14-05:00 — #4
w3c recommends that GET request should only be used for information retrieval, POST for sending info "as there name implies"
* imagine if some one put a link like "http://www.yousite.com?t=alotOfcharacters...." in any website "Digg for example" then search engines will open it and so this data will be submitted whenever a search engineS parse this site with the such links!!!
* You are also submitting a 'textarea'! which is a big string , so there is a cross browser , servers compatibility issue because each one has a max length ,different specification than the other see :
3dvector — 2010-12-07T16:55:37-05:00 — #5
don't forget the horrible CSRF "Cross-site request forgery"!