Re[2]: [PHP] php link problem
| From: | WebDev | Date: | Wed, 17 Oct 2001 16:14:49 +0000 |
| Subject: | Re[2]: [PHP] php link problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-71352@lists.php.net to get a copy of this message | ||
Hello Caleb,
Wednesday, October 17, 2001, 12:44:58 PM, you wrote:
CC> Hi Dan,
CC> I am not sure as I'm new to php myself,
CC> the full code is
CC> <td>$row[product]</td>
CC> <td><a
CC> href=solution.php?id=$row[prob_title]>$row[prob_title]</a></td>
CC> <td>$row[description]</td><td> $row[solution]</td>
CC> </tr>
This is just html code, it will not get interpreted by php module. To
get vars executed they have to be enclosed in the php tags <? php code
to get executed within here ?>
Try something like this:
<td><? echo $row['product']; ?></td>
<td><a href=solution.php?id=<? echo
$row['prob_title'].">".$row['prob_title']; ?>
</a></td>
<td> <? echo $row['description']; ?> </td><td> <? echo
$row['solution'];?> </td>
</tr>
CC> now, if i put the double quotes, i get errors,
CC> the only problem is when the title have space in between i cannot get the
CC> full title and the rest of fields i.e description and solution do not appear
CC> in solution.php either, but without spaces it works fine,,
CC> Caleb Carvalho
CC> Application Engineer
CC> LoadRunner/APM
CC> -----------------------------------------------------------------------------------------
CC> Enterprise Testing and Performance Management Solutions
CC> -----------------------------------------------------------------------------------------
CC> Mercury Interactive
CC> 410 Frimley Business Park
CC> Frimley, Surrey. GU16 7ST
CC> United Kingdom
CC> Telephone : +44 (0)1276 808300
>>From: "DL Neil" <PHPml@DandE.HomeChoice.co.uk>
>>Reply-To: "DL Neil" <PHPml@DandE.HomeChoice.co.uk>
>>To: "Caleb Carvalho" <havanero@hotmail.com>,
>><php-general@lists.php.net>
>>Subject: Re: [PHP] php link problem
>>Date: Wed, 17 Oct 2001 16:34:09 +0100
>>
>> > I have the following problem
>> >
>> > <td><a
>> > href=solution.php?id=$row[prob_title]>$row[prob_title]</a></td>
>> >
>> > calling my solution file that display the selected title link, the
>>problem
>> > that i'm having is that when I have a title with no space example
>> > "clickhere" it works fine, bringing all information related the
>>selected
>> > title link i.e. description and solution,
>> >
>> > but if there is any space ex. "clik here" it brings only the
>> > "clik"
>>word as
>> > title and ignores the rest including the info related to the pro_tile
>>field,
>> > like description and solution,
>>
>>
>>
>>Caleb,
>>
>>Isn't it an HTML problem? (not PHP - remember PHP is here to render/output
>>HTML)
>>What happens if you put double-quotes around the URL?
>>
>>Regards,
>>=dn
>>
>>
CC> _________________________________________________________________
CC> Get your FREE download of MSN Explorer at
CC> http://explorer.msn.com/intl.asp