respecttheplayer Posted December 30, 2008 Share Posted December 30, 2008 Server version: 4.1.22-standard MySQL client version: 4.1.22 Just the run of the mill pre-installed control panel for php & mysql ISSUE: I have never had an issue with outputting data from a database until today but then again i have never done anything complex either and this is not either.... http://www.thegreatestsave.org/events.php this is the page that is being displayed, simply its just events that are listed which is being populated via mysql.... the only issue is the mapquest field which is displayed under address. Take a look at the first URL where it says "CLICK FOR DIRECTIONS" the url clearly states "http://www.mapquest.com/maps?city=Palm" The url should be : "http://www.mapquest.com/maps?city=Palm Beach&state=FL&address=" as you can see most of them got cut off right away. The deduction was anytime i had a city, state, or address with a SPACE it would stop displaying the rest of the results. I know this has to be programmed somehow to allow spaces to be displayed? Anyways here is some basic code that makes it run and the table of course. PHP: echo ' <tr bgcolor="' . $row_color . '"> <td><p class=info>' .$results['Date'] . '</p></td> <td><p class=info><a href=' .$results['link'] . ' target=\"blank\">' .$results['City'] . '</a></p></td> <td><p class=info><b>' .$results['Event'] . ' </b><br><a href=' .$results['mapquest'] . ' target=\"blank\">click for directions</a></p></td> <td><p class=info>' .$results['Media'] . ' ' . $results['Sponsor'] . '</p></td> <td><p class=info>' .$results['Time'] . '</p></td> </tr>'; // Increment the row count $row_count++; TABLE: mapquest has been set to varchar, text and nothing has worked, any ideas? Sorry if i made it more complicating that it really is. Let me know if you need additional details. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/138918-outputting-half-of-url-that-is-in-field-listed-in-table/ Share on other sites More sharing options...
CroNiX Posted December 30, 2008 Share Posted December 30, 2008 Try running rawurlencode() on the address before displaying it in the browser. That should turn: http://www.mapquest.com/maps?city=Palm Beach into: http://www.mapquest.com/maps?city=Palm%20Beach Quote Link to comment https://forums.phpfreaks.com/topic/138918-outputting-half-of-url-that-is-in-field-listed-in-table/#findComment-726522 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.