Forum Moderators: coopster
The above code is a snippet from a page I am working on. It is designed to dynamicaly include another page based on qry value.
It works great when the qry value is one word. But if there is more than one word it causes php errors.
I assume I need to use urlencode. Does anyone have any idea how I could modify the code to acomodate this?
Thanks in advance.
Mack.
<?php
include "ht^p://www.domain.com/dir/include.cgi?query=".urlencode($qry);
?>
urlencode("http://www.domain.com/dir/include.cgi?query=$qry");
http%3A%2F%2Fwww.domain.com%2Fdir%2Finclude.cgi%3Fquery%3DHello+World
http://www.domain.com/dir/include.cgi?query=Hello+World
Notice the difference? Hope this helps -- coopster