RE: [PHP-DB] Simple database error (SPACE)

From: Date: Fri, 31 Aug 2001 00:17:43 +0000
Subject: RE: [PHP-DB] Simple database error (SPACE)
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-12010@lists.php.net to get a copy of this message
DW was correct, Nagasea. The way to do what you want to do is to use the urlencode (and perhaps the urldecode) PHP command(s). They are in the PHP manual. I don't understand what it was that DB told you to do, so I cannot comment on that, but the correct solution to your problem lies with urlencode. Additionally, you will want to put quotes around the HREF in your anchor tag. Perhaps if you rewrote your echo to something like this (WARNING:untested!): echo "<a href=\"m_template.php?nick="; echo urlencode($myrow[3]); echo "\">"; echo $myrow[3]; echo "</a>"; Oh, yeah, and I broke it apart for easy reading. You could concatenate it all in one big echo, but think maintainability. Hope this helps, Doug At 05:01 PM 8/30/01 -0700, Nagasea wrote: >it's still not working :( > >maybe u need my script to see > >$db = mysql_connect("localhost", "xxxx","pass"); > >mysql_select_db("mydatabase_com",$db); >$result = mysql_query("SELECT * FROM big_member WHERE position='Squads' ORDER by first LIMIT 0,300",$db); > >while ($myrow = mysql_fetch_row($result)) { >echo(" ><a href=m_template.php?nick=$myrow[3]>. $myrow[3] ."</a>"); > >} > [--snip--] --Doug's Signature File---------------------------------------- ~ ~ ~ I'm proud to work for GLISnet, Michigan's best ISP ~ ~ ~ --1.888.445.4763---8am to 8pm every day---http://www.glis.net-- The views and opinions expressed in this email are my own and may not be those of my employer.

« previous php.db (#12010) next »