Reply to Re: change space to hyphen in sql query results

Your name:

Reply:


Posted by emmakane on 01/01/06 23:52

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))
{
echo '<a
href=http://www.myurl.com/search.php?q=$get[name]&Search=Search>$get[name]<br>',
urlencode($get[name]), '">';

}
?>

fails as I clearly don't understand what to do with the variable -
should this be on $get or $results, does it need to be a new variable i
reference from that line on - this is where I get totally confused and
none of the examples I can find or that are on this page clarify for
this me one little bit.

Could someone just show me exactly how to use this function? I'm stuck
on this and can't move on. Everything I try fails in an error.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация