Re: dynamic url from MySql field data

From: Date: Sat, 24 Mar 2001 00:42:36 +0000
Subject: Re: dynamic url from MySql field data
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-45382@lists.php.net to get a copy of this message
I'm guessing that the data you are getting has various funky characters in it that are not surviving the database or HTML Input/Output. Do you see the correct URL as the link? Or is there *nothing* for afl? -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: "Claudia" <claudiasmt@sprynet.com> Newsgroups: php.general Sent: Friday, March 16, 2001 2:49 PM Subject: [PHP] dynamic url from MySql field data > I am attempting to create a dynamic url from a field that has the value of > the dynamic url. > > Here is the scenario: > > 1 - Field in MySql database = $logo_link_var = > page.php3?afl=$afl&site=$site&page=contact&ad=$ad_type > 2 - Select logo_link_var from database and assign to $logo_link -- code is: > > $search_query = "select site.logo_link_var from site where ( $afl = > site.afl_name )"; > $result = mysql_query ( $search_query ); > > $logo_link = mysql_result ( $result, 0, "site.logo_link_var" ); (only 1 > record matches query) > $logo = "<a href='$logo_link'><img > src='../allimages/$logo_graphic' > width='$logo_link_width' height='$logo_link_height' border='0' > alt='$logo_alt_text'></a>"; > > When I click on the link I receive parse errors -- and the window displays > this section in the url: > > page.php3?afl=$afl&site=$site&page=contact&ad=$ad_type > > The program is not finding the $afl or $site values > > if I create the $logo variable as follows -- it works OK. > > $logo = "<a > href='page.php3?afl=$afl&site=$site&page=contact&ad=$ad_type'><img > src='../allimages/$logo_graphic' width='$logo_link_width' > height='$logo_link_height' border='0' > alt='$logo_alt_text'></a>"; > > Any suggestions? > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#45382) next »