Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: [PHP-DB] Names with apostrophe's
You need to use the urlencode() function



On Wed, 29 Sep 2004 13:23:07 -0500, Craig Hoffman <choffman@eclimb.net> wrote:
> Hello,
> I could use some help here.  I have an entry in the MySQL, that use an
> apostrophe,  for example lets call it "O'Reilly".  I have added
> addslashes to my insert statement so MySQL accepts it with out
> complaining.
>
> The problem I am having is I use this information "O'Reilly" in a GET
> URL somewhere else in the site.
> For example here's my link:
> echo("<td><a
> href='user_book_results_detail.php?book=$row[book]>$row[book]</a></
> td>");
>
> When I mouse over and view the URL, PHP thinks the apostrophe (single
> quote) is the end and quits.   I know I need to include a back slash or
> escape this character  but I am not entirely sure how I do it?
> Suggestions?
>
> Sample URL:
> http://user_book_results_detail.php?book=O
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
Gh
09-30-04 01:03 AM


Re: [PHP-DB] Names with apostrophe's
Thanks everyone.
urlencode worked like a charm.
On Sep 29, 2004, at 3:53 PM, GH wrote:

> You need to use the urlencode() function
>
>
>
> On Wed, 29 Sep 2004 13:23:07 -0500, Craig Hoffman
> <choffman@eclimb.net> wrote: 
>

Report this thread to moderator Post Follow-up to this message
Old Post
Craig Hoffman
10-01-04 01:56 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP DB archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:38 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.