shifty18 wrote:ahh ok wrong thing, ok ill deffently check that out i noticed when i first stated PHP and used the way dreamweaver added to help me learn that it seamed to add alot of stuff like that, i guess now I see why they made things to complex
thanks for the tips, deffently giving me a lot to work with
FYI: I update my previous post with the last paragraph.
If you're putting values in the URL to obtain it later with $_GET, you should really use urlencode(). But it's really only significat to use if the data is going to have special characters and spaces in the data.
To quickly build values to put in the URL (from an array) you can use http_build_query() (which automatically does a urlencode). This function is only available in PHP 5. So, here's a way of achieving the same thing in PHP 4:
if (!function_exists('http_build_query')) {
function http_build_query ($formdata, $numeric_prefix = '') {
$encoded_query = NULL;
if (is_array($formdata) && count($formdata) > 0) {
foreach($formdata as $key => $value) {
$key = ctype_digit((string) $key) ? $numeric_prefix . $key : $key;
$encoded_query .= '&' . $key . '=' . urlencode($value);
}
}
return $encoded_query;
}
}
π