|
Posted by no.mail.pls on 03/07/06 08:56
Hi Geoff,
Thanks. It worked after i changed it to \"
i agree that it is poor db design, by using such variable data as primary
key. But my purpose is to create a general method for anyone to create any
table with any number of fields of their own choice, and no assumption is
made regarding their knowledge of db design.
All they have to do is live with what they have created. :-)
cheers
"Geoff Muldoon" <geoff.muldoon@trap.gmail.com> wrote in message
news:MPG.1e77d1a3d56d871598977c@news.readfreenews.net...
> no.mail@st.peters says...
>
>> I can't send data over to another page, if the data has spaces
>> in-between,
>> eg.
>>
>> $row[0] = "Garden Party by the Sea" and i use the following code:
>>
>> <a href=deleterecord.php?id=$row[0]&tablename=$tablename>$row[0]</a>";
>>
>> then what is sent over is
>> $row[0]="Garden
>> and $tablename is not sent over at all.
>>
>> How can i send over the complete $row[0] plus another variable to the
>> next
>> page?
>
> This is not a PHP thing, it's a HTML thing. HTML property references (like
> href and value) which are not enclosed in double quotes will break at the
> first whitespace.
>
> Try using escaped quotes (/"):
> $link="<a href=/"deleterecord.php?id=$row[0]&tablename=$tablename/">$row
> [0]</a>";
>
> or I prefer to use single-quotes and concatenators for PHP and double-
> quotes only for the HTML bits:
>
> $link='<a href="deleterecord.php?id='.$row[0].'&tablename='.
> $tablename.'">'.$row[0].'</a>';
>
> Although the fact that you have such text in an "id" field indicates poor
> design.
>
> Geoff M
Navigation:
[Reply to this message]
|