Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #11485 > unrolled thread
| Started by | richard <noreply@example.com> |
|---|---|
| First post | 2013-10-20 12:27 -0400 |
| Last post | 2013-10-20 21:50 +0200 |
| Articles | 20 — 7 participants |
Back to article view | Back to comp.lang.php
how to change character to % character? richard <noreply@example.com> - 2013-10-20 12:27 -0400
Re: how to change character to % character? Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2013-10-20 12:40 -0400
Re: how to change character to % character? richard <noreply@example.com> - 2013-10-20 13:06 -0400
Re: how to change character to % character? Evan Platt <evan@theobvious.espphotography.com.invalid> - 2013-10-20 09:45 -0700
Re: how to change character to % character? richard <noreply@example.com> - 2013-10-20 13:04 -0400
Re: how to change character to % character? Evan Platt <evan@theobvious.espphotography.com.invalid> - 2013-10-20 10:22 -0700
Re: how to change character to % character? Jerry Stuckle <jstucklex@attglobal.net> - 2013-10-20 21:01 -0400
Re: how to change character to % character? richard <noreply@example.com> - 2013-10-20 21:57 -0400
Re: how to change character to % character? Jerry Stuckle <jstucklex@attglobal.net> - 2013-10-20 22:09 -0400
Re: how to change character to % character? Evan Platt <evan@theobvious.espphotography.com.invalid> - 2013-10-20 23:18 -0700
Re: how to change character to % character? Scott Johnson <noonehome@chalupasworld.com> - 2013-10-21 05:39 -0700
Re: how to change character to % character? Evan Platt <evan@theobvious.espphotography.com.invalid> - 2013-10-21 06:31 -0700
Re: how to change character to % character? Luuk <luuk@invalid.lan> - 2013-10-20 20:04 +0200
Re: how to change character to % character? richard <noreply@example.com> - 2013-10-20 14:50 -0400
Re: how to change character to % character? Jerry Stuckle <jstucklex@attglobal.net> - 2013-10-20 21:02 -0400
Re: how to change character to % character? Arno Welzel <usenet@arnowelzel.de> - 2013-10-21 11:55 +0200
Re: how to change character to % character? Jerry Stuckle <jstucklex@attglobal.net> - 2013-10-21 08:04 -0400
solved! richard <noreply@example.com> - 2013-10-20 15:11 -0400
Re: how to change character to % character? Arno Welzel <usenet@arnowelzel.de> - 2013-10-20 21:17 +0200
Re: how to change character to % character? Luuk <luuk@invalid.lan> - 2013-10-20 21:50 +0200
| From | richard <noreply@example.com> |
|---|---|
| Date | 2013-10-20 12:27 -0400 |
| Subject | how to change character to % character? |
| Message-ID | <z6vdxp5lrmnm.inx0tv64wlmj.dlg@40tude.net> |
I noticed that whenever a song is clicked on that has an apostrophe in the
name, an error is now being generated.
The song still plays and the name is reported correctly.
So how can I detect any and all 's within a string and convert them to the
%27 version?
I had a look at preg-match and don't think that will help.
www.mroldies.net/200/
<?php
if ($show="none"){$song=$playme[$number][4];}
if ($show!="none") {$song=$playme[$show][4];}
echo 'jwplayer("player").setup({';
echo ' file: "'.$song.'.mp3",';
echo ' width: 480,';
echo ' height: 30,';
echo ' autostart:true';
echo '});';
?>
[toc] | [next] | [standalone]
| From | Lew Pitcher <lew.pitcher@digitalfreehold.ca> |
|---|---|
| Date | 2013-10-20 12:40 -0400 |
| Message-ID | <cIT8u.91627$i75.12796@fx03.iad> |
| In reply to | #11485 |
On Sunday 20 October 2013 12:27, in comp.lang.php, "richard" <noreply@example.com> wrote: > I noticed that whenever a song is clicked on that has an apostrophe in the > name, an error is now being generated. > The song still plays and the name is reported correctly. > > So how can I detect any and all 's within a string and convert them to the > %27 version? Use the rawurlencode() function http://www.php.net/manual/en/function.rawurlencode.php [snip] -- Lew Pitcher "In Skills, We Trust" PGP public key available upon request
[toc] | [prev] | [next] | [standalone]
| From | richard <noreply@example.com> |
|---|---|
| Date | 2013-10-20 13:06 -0400 |
| Message-ID | <1gfmloz1jf2q2$.1gkcenlz3thxr$.dlg@40tude.net> |
| In reply to | #11486 |
On Sun, 20 Oct 2013 12:40:40 -0400, Lew Pitcher wrote: > On Sunday 20 October 2013 12:27, in comp.lang.php, "richard" > <noreply@example.com> wrote: > >> I noticed that whenever a song is clicked on that has an apostrophe in the >> name, an error is now being generated. >> The song still plays and the name is reported correctly. >> >> So how can I detect any and all 's within a string and convert them to the >> %27 version? > > Use the rawurlencode() function > > http://www.php.net/manual/en/function.rawurlencode.php > > [snip] But will the javascript accept that? We shall see.
[toc] | [prev] | [next] | [standalone]
| From | Evan Platt <evan@theobvious.espphotography.com.invalid> |
|---|---|
| Date | 2013-10-20 09:45 -0700 |
| Message-ID | <e32869lb9un4gq64sn9p7h1efrbiri2oqd@4ax.com> |
| In reply to | #11485 |
On Sun, 20 Oct 2013 12:27:17 -0400, richard <noreply@example.com> wrote: >www.mroldies.net/200/ Oh, so you ARE Mr. Oldies. Funny, you claimed you haven't posted with another nick in 3 years, yet you posted less than a month ago as Mr. Oldies. -- To reply via e-mail, remove The Obvious and .invalid from my e-mail address.
[toc] | [prev] | [next] | [standalone]
| From | richard <noreply@example.com> |
|---|---|
| Date | 2013-10-20 13:04 -0400 |
| Message-ID | <wad2ogzcw7hp.1r8w3rxvpr7p5.dlg@40tude.net> |
| In reply to | #11489 |
On Sun, 20 Oct 2013 09:45:13 -0700, Evan Platt wrote: > On Sun, 20 Oct 2013 12:27:17 -0400, richard <noreply@example.com> > wrote: > >>www.mroldies.net/200/ > > Oh, so you ARE Mr. Oldies. > > Funny, you claimed you haven't posted with another nick in 3 years, > yet you posted less than a month ago as Mr. Oldies. evan, go over to fisherman's wharf and try out a puffer fish. I hear they are delicious! But you have claimed I have posted using other nicks such as RD Sandman. Most people in this group and the other web help groups all know I am Mroldies as I have posted that website under this nick numerous times in the past. So what? Now take a one way trip to alcatraz.
[toc] | [prev] | [next] | [standalone]
| From | Evan Platt <evan@theobvious.espphotography.com.invalid> |
|---|---|
| Date | 2013-10-20 10:22 -0700 |
| Message-ID | <f8486953oa03ti5jc61p41i3o9qpquid8i@4ax.com> |
| In reply to | #11490 |
On Sun, 20 Oct 2013 13:04:46 -0400, richard <noreply@example.com> wrote: >But you have claimed I have posted using other nicks such as RD Sandman. >Most people in this group and the other web help groups all know I am >Mroldies as I have posted that website under this nick numerous times in >the past. >So what? > >Now take a one way trip to alcatraz. You've also posted as horse. Yes, everyone knows you are mr oldies, so you just admitted you lied. "I have not posted with another nick in 3 years." "yes, I posted as mr. oldies last week." So which one is it, bullis? How's that dome home coming along? -- To reply via e-mail, remove The Obvious and .invalid from my e-mail address.
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2013-10-20 21:01 -0400 |
| Message-ID | <l41ud8$6uc$2@dont-email.me> |
| In reply to | #11489 |
On 10/20/2013 12:45 PM, Evan Platt wrote: > On Sun, 20 Oct 2013 12:27:17 -0400, richard <noreply@example.com> > wrote: > >> www.mroldies.net/200/ > > Oh, so you ARE Mr. Oldies. > > Funny, you claimed you haven't posted with another nick in 3 years, > yet you posted less than a month ago as Mr. Oldies. > Why aren't you answering his question? Maybe because you are an ignorant troll? -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | richard <noreply@example.com> |
|---|---|
| Date | 2013-10-20 21:57 -0400 |
| Message-ID | <gd52wb230z63.1e8r19944vk8w.dlg@40tude.net> |
| In reply to | #11506 |
On Sun, 20 Oct 2013 21:01:32 -0400, Jerry Stuckle wrote: > On 10/20/2013 12:45 PM, Evan Platt wrote: >> On Sun, 20 Oct 2013 12:27:17 -0400, richard <noreply@example.com> >> wrote: >> >>> www.mroldies.net/200/ >> >> Oh, so you ARE Mr. Oldies. >> >> Funny, you claimed you haven't posted with another nick in 3 years, >> yet you posted less than a month ago as Mr. Oldies. >> > > Why aren't you answering his question? Maybe because you are an > ignorant troll? He is. He's been harassing me for 5 years over any little thing he can. even a simple typo will get his juices flowing for months.
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2013-10-20 22:09 -0400 |
| Message-ID | <l422c8$osn$1@dont-email.me> |
| In reply to | #11513 |
On 10/20/2013 9:57 PM, richard wrote: > On Sun, 20 Oct 2013 21:01:32 -0400, Jerry Stuckle wrote: > >> On 10/20/2013 12:45 PM, Evan Platt wrote: >>> On Sun, 20 Oct 2013 12:27:17 -0400, richard <noreply@example.com> >>> wrote: >>> >>>> www.mroldies.net/200/ >>> >>> Oh, so you ARE Mr. Oldies. >>> >>> Funny, you claimed you haven't posted with another nick in 3 years, >>> yet you posted less than a month ago as Mr. Oldies. >>> >> >> Why aren't you answering his question? Maybe because you are an >> ignorant troll? > > He is. He's been harassing me for 5 years over any little thing he can. > even a simple typo will get his juices flowing for months. > He's just a troll who knows even less than most people here, Richard. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Evan Platt <evan@theobvious.espphotography.com.invalid> |
|---|---|
| Date | 2013-10-20 23:18 -0700 |
| Message-ID | <vlh969l1g786k2hp42r1ofaqe57c9be1u3@4ax.com> |
| In reply to | #11513 |
On Sun, 20 Oct 2013 21:57:48 -0400, richard <noreply@example.com> wrote: >He is. He's been harassing me for 5 years over any little thing he can. >even a simple typo will get his juices flowing for months. Please show me where I've made fun of you for a typo. <crickets> Didn't think so bullis. -- To reply via e-mail, remove The Obvious and .invalid from my e-mail address.
[toc] | [prev] | [next] | [standalone]
| From | Scott Johnson <noonehome@chalupasworld.com> |
|---|---|
| Date | 2013-10-21 05:39 -0700 |
| Message-ID | <l4379i$vf0$1@dont-email.me> |
| In reply to | #11517 |
On 10/20/2013 11:18 PM, Evan Platt wrote: > On Sun, 20 Oct 2013 21:57:48 -0400, richard <noreply@example.com> > wrote: > >> He is. He's been harassing me for 5 years over any little thing he can. >> even a simple typo will get his juices flowing for months. > > Please show me where I've made fun of you for a typo. > > <crickets> > > Didn't think so bullis. > Is there a particular reason you like to answer your own questions? Scotty
[toc] | [prev] | [next] | [standalone]
| From | Evan Platt <evan@theobvious.espphotography.com.invalid> |
|---|---|
| Date | 2013-10-21 06:31 -0700 |
| Message-ID | <r4ba69lf8m5d3ast0adt1lfkt7mo81ld2a@4ax.com> |
| In reply to | #11528 |
On Mon, 21 Oct 2013 05:39:13 -0700, Scott Johnson <noonehome@chalupasworld.com> wrote: >Is there a particular reason you like to answer your own questions? Because I know bullis lacks the mental capability of answering the basic questions asked of him. -- To reply via e-mail, remove The Obvious and .invalid from my e-mail address.
[toc] | [prev] | [next] | [standalone]
| From | Luuk <luuk@invalid.lan> |
|---|---|
| Date | 2013-10-20 20:04 +0200 |
| Message-ID | <6jidja-ea4.ln1@luuk.invalid.lan> |
| In reply to | #11485 |
On 20-10-2013 18:27, richard wrote: > I noticed that whenever a song is clicked on that has an apostrophe in the > name, an error is now being generated. > The song still plays and the name is reported correctly. > > So how can I detect any and all 's within a string and convert them to the > %27 version? > > I had a look at preg-match and don't think that will help. > > www.mroldies.net/200/ > > Why do i see this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's Now Or Never ',' It's Now Or Never ',1) ON DUPLICATE KEY UPDATE hits=hits+1' at line 1 on this link: http://www.mroldies.net/200/audiox1.php?play=6 Can you not see that this is not a proper MySQL statement? Nut you better fix this now than never.......
[toc] | [prev] | [next] | [standalone]
| From | richard <noreply@example.com> |
|---|---|
| Date | 2013-10-20 14:50 -0400 |
| Message-ID | <tl4oa5agcfkl$.15luupt3h3ksi$.dlg@40tude.net> |
| In reply to | #11494 |
On Sun, 20 Oct 2013 20:04:54 +0200, Luuk wrote: > On 20-10-2013 18:27, richard wrote: >> I noticed that whenever a song is clicked on that has an apostrophe in the >> name, an error is now being generated. >> The song still plays and the name is reported correctly. >> >> So how can I detect any and all 's within a string and convert them to the >> %27 version? >> >> I had a look at preg-match and don't think that will help. >> >> www.mroldies.net/200/ >> >> > > > Why do i see this error: > You have an error in your SQL syntax; check the manual that corresponds > to your MySQL server version for the right syntax to use near 's Now Or > Never ',' It's Now Or Never ',1) ON DUPLICATE KEY UPDATE hits=hits+1' at > line 1 > > on this link: > http://www.mroldies.net/200/audiox1.php?play=6 > > Can you not see that this is not a proper MySQL statement? > > Nut you better fix this now than never....... Precisely why I am asking how to fix. The error stems from the fact that the echo statement "sees" a single quote as part of the structure of the statement itself. NOT as a string. IOW, "Hey stupid....your quotes don't match!" It is not a MYSQL problem. it is purely a syntax matter.
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2013-10-20 21:02 -0400 |
| Message-ID | <l41ufd$6uc$3@dont-email.me> |
| In reply to | #11498 |
On 10/20/2013 2:50 PM, richard wrote: > On Sun, 20 Oct 2013 20:04:54 +0200, Luuk wrote: > >> On 20-10-2013 18:27, richard wrote: >>> I noticed that whenever a song is clicked on that has an apostrophe in the >>> name, an error is now being generated. >>> The song still plays and the name is reported correctly. >>> >>> So how can I detect any and all 's within a string and convert them to the >>> %27 version? >>> >>> I had a look at preg-match and don't think that will help. >>> >>> www.mroldies.net/200/ >>> >>> >> >> >> Why do i see this error: >> You have an error in your SQL syntax; check the manual that corresponds >> to your MySQL server version for the right syntax to use near 's Now Or >> Never ',' It's Now Or Never ',1) ON DUPLICATE KEY UPDATE hits=hits+1' at >> line 1 >> >> on this link: >> http://www.mroldies.net/200/audiox1.php?play=6 >> >> Can you not see that this is not a proper MySQL statement? >> >> Nut you better fix this now than never....... > > Precisely why I am asking how to fix. > The error stems from the fact that the echo statement "sees" a single quote > as part of the structure of the statement itself. NOT as a string. > IOW, "Hey stupid....your quotes don't match!" > > It is not a MYSQL problem. it is purely a syntax matter. > As you have been told MANY, MANY times before. You need to escape ALL of the strings you use when accessing ANY SQL database (not just MySQL). -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Date | 2013-10-21 11:55 +0200 |
| Message-ID | <5264FA22.6020703@arnowelzel.de> |
| In reply to | #11508 |
Am 21.10.2013 03:02, schrieb Jerry Stuckle: > On 10/20/2013 2:50 PM, richard wrote: >> On Sun, 20 Oct 2013 20:04:54 +0200, Luuk wrote: >> >>> On 20-10-2013 18:27, richard wrote: >>>> I noticed that whenever a song is clicked on that has an apostrophe in the >>>> name, an error is now being generated. >>>> The song still plays and the name is reported correctly. >>>> >>>> So how can I detect any and all 's within a string and convert them to the >>>> %27 version? >>>> >>>> I had a look at preg-match and don't think that will help. >>>> >>>> www.mroldies.net/200/ >>>> >>>> >>> >>> >>> Why do i see this error: >>> You have an error in your SQL syntax; check the manual that corresponds >>> to your MySQL server version for the right syntax to use near 's Now Or >>> Never ',' It's Now Or Never ',1) ON DUPLICATE KEY UPDATE hits=hits+1' at >>> line 1 >>> >>> on this link: >>> http://www.mroldies.net/200/audiox1.php?play=6 >>> >>> Can you not see that this is not a proper MySQL statement? >>> >>> Nut you better fix this now than never....... >> >> Precisely why I am asking how to fix. >> The error stems from the fact that the echo statement "sees" a single quote >> as part of the structure of the statement itself. NOT as a string. >> IOW, "Hey stupid....your quotes don't match!" >> >> It is not a MYSQL problem. it is purely a syntax matter. >> > > As you have been told MANY, MANY times before. You need to escape ALL > of the strings you use when accessing ANY SQL database (not just MySQL). Or just use prepared statements ;-) -- Arno Welzel http://arnowelzel.de http://de-rec-fahrrad.de
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2013-10-21 08:04 -0400 |
| Message-ID | <l4357k$k5a$2@dont-email.me> |
| In reply to | #11521 |
On 10/21/2013 5:55 AM, Arno Welzel wrote: > Am 21.10.2013 03:02, schrieb Jerry Stuckle: >> On 10/20/2013 2:50 PM, richard wrote: >>> On Sun, 20 Oct 2013 20:04:54 +0200, Luuk wrote: >>> >>>> On 20-10-2013 18:27, richard wrote: >>>>> I noticed that whenever a song is clicked on that has an apostrophe in the >>>>> name, an error is now being generated. >>>>> The song still plays and the name is reported correctly. >>>>> >>>>> So how can I detect any and all 's within a string and convert them to the >>>>> %27 version? >>>>> >>>>> I had a look at preg-match and don't think that will help. >>>>> >>>>> www.mroldies.net/200/ >>>>> >>>>> >>>> >>>> >>>> Why do i see this error: >>>> You have an error in your SQL syntax; check the manual that corresponds >>>> to your MySQL server version for the right syntax to use near 's Now Or >>>> Never ',' It's Now Or Never ',1) ON DUPLICATE KEY UPDATE hits=hits+1' at >>>> line 1 >>>> >>>> on this link: >>>> http://www.mroldies.net/200/audiox1.php?play=6 >>>> >>>> Can you not see that this is not a proper MySQL statement? >>>> >>>> Nut you better fix this now than never....... >>> >>> Precisely why I am asking how to fix. >>> The error stems from the fact that the echo statement "sees" a single quote >>> as part of the structure of the statement itself. NOT as a string. >>> IOW, "Hey stupid....your quotes don't match!" >>> >>> It is not a MYSQL problem. it is purely a syntax matter. >>> >> >> As you have been told MANY, MANY times before. You need to escape ALL >> of the strings you use when accessing ANY SQL database (not just MySQL). > > Or just use prepared statements ;-) > > That's another way. But don't confuse the poor guy. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | richard <noreply@example.com> |
|---|---|
| Date | 2013-10-20 15:11 -0400 |
| Subject | solved! |
| Message-ID | <1xtsod7ewcq8w$.vxerm2askvxn$.dlg@40tude.net> |
| In reply to | #11485 |
On Sun, 20 Oct 2013 12:27:17 -0400, richard wrote: > I noticed that whenever a song is clicked on that has an apostrophe in the > name, an error is now being generated. > The song still plays and the name is reported correctly. > > So how can I detect any and all 's within a string and convert them to the > %27 version? > > I had a look at preg-match and don't think that will help. > Dufus was using the wrong array item number! that was the main reason why I switched to using numbers instead of full names! So I wouldn't have to worry about the damn special characters. That was the actual reason for the error message. Or why the songs would not load.
[toc] | [prev] | [next] | [standalone]
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Date | 2013-10-20 21:17 +0200 |
| Message-ID | <52642C52.9010400@arnowelzel.de> |
| In reply to | #11485 |
richard, 2013-10-20 18:27: > I noticed that whenever a song is clicked on that has an apostrophe in the > name, an error is now being generated. > The song still plays and the name is reported correctly. > > So how can I detect any and all 's within a string and convert them to the > %27 version? > > I had a look at preg-match and don't think that will help. See <http://php.net/manual/en/function.htmlspecialchars.php>. -- Arno Welzel http://arnowelzel.de http://de-rec-fahrrad.de
[toc] | [prev] | [next] | [standalone]
| From | Luuk <luuk@invalid.lan> |
|---|---|
| Date | 2013-10-20 21:50 +0200 |
| Message-ID | <eoodja-dg5.ln1@luuk.invalid.lan> |
| In reply to | #11501 |
On 20-10-2013 21:17, Arno Welzel wrote: > richard, 2013-10-20 18:27: > >> I noticed that whenever a song is clicked on that has an apostrophe in the >> name, an error is now being generated. >> The song still plays and the name is reported correctly. >> >> So how can I detect any and all 's within a string and convert them to the >> %27 version? >> >> I had a look at preg-match and don't think that will help. > > See <http://php.net/manual/en/function.htmlspecialchars.php>. > > or one of these: http://php.net/manual/en/pdo.prepared-statements.php http://php.net/manual/en/mysqli.quickstart.prepared-statements.php
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.php
csiph-web