Jump to content

[SOLVED] field stops after space


BigTime

Recommended Posts

Hi everyone!

 

I have an issue where I am trying to create dynamic links on a page that are using a variable to populate that link.  However when that variable is pulled to use as part of that link it stops as soon as it encounters a space in the data.

 

So simply the link looks like this:

 

echo ("<td width=110><a href=http://www.mysite.net/ScheduleField.php?fieldname=$fieldname style=\"text-decoration: none\"><font face=arial size=1 color=#ffffff>$hometeam $homeconference</a></TD>\n");

 

Fieldname out of the table would be a multi word something like 'North High School'

 

However when trying to use that variable in a link, in real time it appears as:

http://www.mysite.net/ScheduleField.php?fieldname=North

 

It is essentially dropping everything after the first word.

 

It DOES however print out the full data when I use the $fieldname variable in a table during my while loop, this link appears IN my while loop, it just doesnt produce the full text for the link part.

 

The SQL (4.1.22-standard) db is set up on that field as text with no attributes and not null

 

Can anyone guide me to how I might ensure the full text might be implemented?

 

If I have not provided adequate information on the issue please let me know, and thanks in advance for any thoughts!

Link to comment
https://forums.phpfreaks.com/topic/122149-solved-field-stops-after-space/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.