So this little problem has stumped me for close to an hour, and I know it's
something easy...
I'm using PHP to select field values from a record in a MySQL database, and
display those values inside of text boxes in a form (which is used to allow
folks to update records). The SELECT statement:
SELECT
`last_name`,`fi rst_name`,`stre et`,`city`,`sta te`,`zip`,`area _code`,`phone`, `
email`,`badge`
FROM $table
WHERE `last_name` = 'mccammon' AND `first_name` = 'keith'
This is called via a standard connect string, the functional portion of
which looks like this:
$result=MYSQL_Q UERY($query) or die(mysql_error ());
$data=mysql_fet ch_array($resul t);
This all works great, *but* the `street` value normally looks like this:
2000 L Street NW
And when I use <? print $data[street] ?> to print the `street` value within
the text box, all I see is:
2000
Apparently the first space in the field value is the end of the road, for
some reason. I'm guessing this is something easy to handle, but I'm a
novice here, so please go easy!
Thanks
Keith
something easy...
I'm using PHP to select field values from a record in a MySQL database, and
display those values inside of text boxes in a form (which is used to allow
folks to update records). The SELECT statement:
SELECT
`last_name`,`fi rst_name`,`stre et`,`city`,`sta te`,`zip`,`area _code`,`phone`, `
email`,`badge`
FROM $table
WHERE `last_name` = 'mccammon' AND `first_name` = 'keith'
This is called via a standard connect string, the functional portion of
which looks like this:
$result=MYSQL_Q UERY($query) or die(mysql_error ());
$data=mysql_fet ch_array($resul t);
This all works great, *but* the `street` value normally looks like this:
2000 L Street NW
And when I use <? print $data[street] ?> to print the `street` value within
the text box, all I see is:
2000
Apparently the first space in the field value is the end of the road, for
some reason. I'm guessing this is something easy to handle, but I'm a
novice here, so please go easy!
Thanks
Keith
Comment