fj1200 Posted October 23, 2008 Share Posted October 23, 2008 I'm writing a dispatch note app, all working fine but having problems with job names coming out of a MySQL database text field with spaces in them. So for example, "TEST JOB 001" comes out as "TEST". Had a look through this forum, tried one or two suggestions but not working. tried all sorts of combinations with double and single quotes but still not working. Can anyone assist? I have: echo "<option value=$SITE_ID"."."."$nt[EXPR3]"."."."$nt[EXPR2]"."."."$JOBTYPE>$nt[EXPR2]</option>"; I split the option apart at insert with $JOB = explode(".",($_POST[JOBNAME])); (may not be pretty but it works well) EXPR2 - job description - is the one causing problems. We have an internal job code (held in EXPR3) that will be meaningless to the dispatch guys and drivers so the need the description. It's pulled out of our live SQL Server production database from a read-only view. Quote Link to comment Share on other sites More sharing options...
gaza165 Posted October 23, 2008 Share Posted October 23, 2008 Is a very messy way to look at it but if it works for you try this code echo "<option value='".$SITE_ID.".".$nt['EXPR3'].".".$nt['EXPR2'].".".$JOBTYPE."'>".$nt['EXPR2']."</option>"; let me know how u get on. Garry Quote Link to comment Share on other sites More sharing options...
fj1200 Posted October 23, 2008 Author Share Posted October 23, 2008 That's got it - probably the one combination of quotes I didn't try! Many thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.