Only First Word In A Multi Word Variable Is Being Displayed
In my form I have the following values that are based on a standard PHP/MySql query. echo '\n Location
Solution 1:
You forgot quotes :
echo "<tr>\n
<tdalign='right'><b>Location</b></td><td><inputname='student_location'type='text'size='25'style='font-weight: 700'value=\"$location\"></td></tr>";
Without quotes, the first word will be noted, others will be interpreted as wrong attributes.
Solution 2:
You need to put your single quotes around it to make it a valid attribute. The HTML is being created as value=North Campus
which gets interpreted as value="North"
and some Campus
attribute that has no value. Use value='$location'
.
Solution 3:
you need to quote it by escaping the "
echo "<tr>\n
<tdalign='right'><b>Location</b></td><td><inputname='student_location'type='text'size='25'style='font-weight: 700'value=\"$location\"></td></tr>";
Post a Comment for "Only First Word In A Multi Word Variable Is Being Displayed"