Sent data truncated?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I can't send data over to another page, if the data has spaces in-between,  

$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
and $tablename is not sent over at all.

How can i send over the complete $row[0] plus another variable to the next  


Re: Sent data truncated?

no.mail@st.peters says...

Quoted text here. Click to load it

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

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='.

Although the fact that you have such text in an "id" field indicates poor  

Geoff M

Re: Sent data truncated?

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. :-)


Quoted text here. Click to load it

Site Timeline