|
Posted by J.O. Aho on 01/02/06 02:17
emmakane@gmail.com wrote:
> Yes, this is exactly what I need, I am obviously being really stupid,
> but it is not the finding of such commands is the implemetation of
> them. This example on the page you referenced is obviously intended to
> be really helpful
>
> Example 1. urlencode() example
> <?php
> echo '<a href="mycgi?foo=', urlencode($userinput), '">';
> ?>
>
> But I don't get how to implement it at all and thats whats doing my
> head in. Adding what I think this means to my script e.g
>
> <?
> require "config.php"; // All database details will be
> included here
> $page_name="test.php"; //
> $query="SELECT name FROM database1 ";
> $result=mysql_query($query);
> echo mysql_error();
> while($get = mysql_fetch_array($result))
> {
//Try with
echo "<a
href=\"http://www.myurl.com/search.php?q=".urlencode($get[name])."&Search=Search\">$get[name]</a><br>\n";
> }
> ?>
//Aho
Navigation:
[Reply to this message]
|