?
Solved

Ampersand problem, data from php

Posted on 2005-04-04
11
Medium Priority
?
1,414 Views
Last Modified: 2012-06-27
I have a flash textfield thats rendered as HTML and i access a mysql database through a php file to get some content. That all works good but I have an & in my content and the flash content in the text box ends at the &

here's some of my php code

print("&accommodations=$accommodations");

i tried this before the print but it will just print out B%26B

$accommodations = str_replace("&", "%26", $accommodations);
and
urlencode($accommodations);

but nothing works

any help would be great. thanks.
0
Comment
Question by:jmingo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
11 Comments
 
LVL 18

Expert Comment

by:Billystyx
ID: 13700671
what is the problem?
You have an & and its part of the text and meant to be there, or you have a & and you don't want it?
Billystyx
0
 
LVL 3

Expert Comment

by:mixart
ID: 13702945
Have you tried something like...

echo "textvar=".urlencode(utf8_encode("lots of special chars: &äöü..."));
0
 

Author Comment

by:jmingo
ID: 13706069
if i do the urlencode thing, it shows up in my flash textbox as this B%26B's for example, and the text color is black, is white without the urlencode code in there.

any other ideas?

thanks for your help.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:jmingo
ID: 13706079
also, this is the code i put in

print "&accommodations=".urlencode(utf8_encode("$accommodations"));

0
 
LVL 18

Expert Comment

by:Billystyx
ID: 13706279
what is $accomodations? Can you give me an example of the text values that are in there?

Billystyx
0
 

Author Comment

by:jmingo
ID: 13706320
geez, i'm very sorry guys.... i found the problem. it was an ID-10-T problem.

i was converting the & into %26 and for some reason after that converting %'s into %25's

sorry... thanks for your help and responses.
0
 
LVL 18

Expert Comment

by:Billystyx
ID: 13706373
That was in the string value of $accomodations I suppose?

Billystyx
0
 
LVL 18

Accepted Solution

by:
Billystyx earned 100 total points
ID: 13741039
That's OK, but I was wondering if my question prompted the solution being found. Could jmingo let us know that?

Billystyx
0
 

Author Comment

by:jmingo
ID: 13752340
well i guess it helped me in the sense that it made me look at the code a bit more.
0
 
LVL 18

Expert Comment

by:Billystyx
ID: 13752510
That's cool. Just wondering... :)
Good luck with it
Billystyx
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
Suggested Courses
Course of the Month12 days, 20 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question