Recordsets disappear from menu when adding mysql_query ("SET NAMES 'utf8'"); below the connection in php

I hope someone can help with this. I'm trying to create a
dynamic site using dreamweaver CS3, with php5 and mysql5 in the
background but I'm having difficulty with recordsets disappearing
from the server behaviour menu when tweaking the code to allow set
characters or set names for utf8.
For a while, I've been having a problem getting my
dynamically generated master list pages (eg lists of jobs) to
display international characters like an accented french e (and
other languages) and for these to display correctly when viewed in
phpmyadmin also. So, I've placed headers at the top of the page for
utf8 and created the content metatag for utf8 in the page code.
Where needed I've added ENT_QUOTES utf etc for htmlentities and
added accept-charset utf-8 in the <form> action area.
(one thing I haven't done in the form action area is add
<enctype="multipart/form-data">, but I'm not sure if this
will make any difference)
In the backend, the innoDB database is collated and built
using utf8_unicode_ci. I'm on a shared host -so can't directly
access php.ini or adjust the connection settings through
phpmyadmin. But I can write .htaccess files (currently with the
defaultcharset set to utf8 also).
At this point - all list pages display the correct characters
when retrieved from the database - indicating that the headers are
working. But - in phpmyadmin the letters are garbled, and garbled
on return on update forms (content management). I solved this by
adding the &#xxxx; equivalents in insert and update forms to
display the text correctly on the list pages - but again it's not
convenient to see all of this in phpmyadmin, as I'd like to be able
to read it there as it should be, and to dispense with the need to
add &#xxxx references on the insert and update forms.
So...a bit of searching, and I read that in order for the
international characters to display in phpmyadmin correctly, I
needed to amend my php page code so that for all instances where I
see the connection to the database, before the SELECT, INSERT and
DELETE queries, I need to add either mysql_set_charset('utf8',
$connection) or use three lines of code referencing mysql_query SET
NAMES, SET CHARACTER SET and SET COLLATION_CONNECTION for utf8.
I did that, and it removed all of my recordsets in the
sidebar menu! Not too good. I'm left with a task of rebuilding
pages now.
So I placed the mysql_set_charset line in the connection.php
file in the DW Connections folder below the connection there
instead. [I didn't precede the mysql etc line with a $ sign - I
wonder if that's the issue?]
With this change I could use the Insert forms to add the
international characters directly into the database and see through
phpmyadmin that all was hunky dory. But then the problems came with
first loads of the master list page.
So, I can get international characters into the database now
(which is a step in the right direction for me), using an insert
form on the website, but I still can't get the international
characters to display on the returned page on first loading eg on a
list of jobs. Note that the detail pages display fine when clicking
the master links, and when I return from the detail page back to
the master list - the characters are ok. They just don't seem to
display when the master page loads for the first time which is
really perplexing me.
I suspect that I need to add the mysql_set_charset line below
the $connection and before the selects, inserts etc at all
instances on the webpage, but this just removes the recordset from
the menu, so this doesn't seem to be a good option.
Can anyone point me in the right direction as I'm been stuck
on this for ages. It may be something simple like adding $ in front
of the mysql_query, but then again maybe not.
I've tried other forums - but people seem to be content with
viewing but not offering assistance. I don't believe that what I'm
doing here hasn't been done before....all I want is for my pages to
display international characters and for these to display correctly
in phpmyadmin so that when I insert, update and delete records
using webforms I don't have to resort to using &#xxx inserts.
Help please!

.oO(08Green)
> So...a bit of searching, and I read that in order for
the international
>characters to display in phpmyadmin correctly, I needed
to amend my php page
>code so that for all instances where I see the connection
to the database,
>before the SELECT, INSERT and DELETE queries, I need to
add either
>mysql_set_charset('utf8', $connection) or use three lines
of code referencing
>mysql_query SET NAMES, SET CHARACTER SET and SET
COLLATION_CONNECTION for utf8.
Usually you only need to send a SET NAMES 'utf8' right after
the
connection to the DB has been established. That way all data
that is
transferred between the DB and your script will be handled as
UTF-8.
> I did that, and it removed all of my recordsets in the
sidebar menu! Not too
>good. I'm left with a task of rebuilding pages now.
>
> So I placed the mysql_set_charset line in the
connection.php file in the DW
>Connections folder below the connection there instead. [I
didn't precede the
>mysql etc line with a $ sign - I wonder if that's the
issue?]
I've never used mysql_set_charset().
Here in my applications it always works like this:
* the default charset in my InnoDB tables is ISO-8859-1, I
only use
UTF-8 in the columns that really need it (text data, but not
INT or
DATE columns)
* SET NAMES 'utf8' at the beginning
* all files (HTML and PHP) are encoded as UTF-8 without BOM
* all pages delivered as UTF-8 (my pages are
script-generated, so I use
an appropriate header() call to define the content-type and
encoding)
That's it. Oh, and I don't use phpMyAdmin ...
> With this change I could use the Insert forms to add the
international
>characters directly into the database and see through
phpmyadmin that all was
>hunky dory. But then the problems came with first loads
of the master list
>page.
In the first part of your posting it sounded as if it worked
almost
correctly, before you tried to fix the broken phpMyAdmin
appearance.
Is that correct?
> So, I can get international characters into the database
now (which is a step
>in the right direction for me), using an insert form on
the website, but I
>still can't get the international characters to display
on the returned page on
>first loading eg on a list of jobs.
They did display correctly first, didn't they? So it seems
that you
broke your script just in order to fix some PMA problem.
Revert that.
Make your script work for normal input/output from/to a
website first
and don't worry about PMA for now.
What do you need PMA for BTW? It may have many other issues
as well and
should only be used if really necessary or if you're not
familiar with
the command line interface. The only thing that we are using
it is to
get a dump from a remote DB, where I don't have shell access
to call
mysqldump directly (yes, I could also write a little PHP
script for
that, it's already somewhere on my TODO). But here on my
local system I
always use the MySQL command prompt if I have to directly
work on some
tables or to import the dump from remote.
Anyway, if you need PMA, your might try their group or forum.
I'm sure
there's an FAQ as well. Maybe it's just a configuration
issue.
> I've tried other forums - but people seem to be content
with viewing but not
>offering assistance. I don't believe that what I'm doing
here hasn't been done
>before....all I want is for my pages to display
international characters and
>for these to display correctly in phpmyadmin so that when
I insert, update and
>delete records using webforms I don't have to resort to
using &#xxx inserts.
The bug here is PMA itself. ;-)
Micha

Similar Messages

  • Just installed OSX Mavericks.Bluetooth disappeared from menu bar and system preferences. I have a magic mouse and my IMac no long recognizes it as such, nor can I scroll with it. What's wrong?

    Just installed OSX Mavericks. Bluetooth disappeared from menu bar and system preferences panel. I use a Magic Mouse but my iMac no longer recognizes it as such, and I can no longer use it to scroll screen. What happened?

    Since Mavricks installed: My Spotlight icon disappears from the menu bar, but the space stays there. If I click on the blank space where the
    spotlight icon is supposed to be - the spotlight menu opens. So, for me, the icon is there, it works except that it is invisible at times. IF I do a re-start it is there. If I let the computer set, sleep or other wise stay on for days, the icon will hide and re-appear at random.

  • View disappeared from menu bar in word and i don't know how to get back

    I clicked the wrong button and view disappeared from menu bar in word and I can't get it back.  I've tried to reinstate it from system preferences and I've tried everything in the help menu. Please help

    Hi Karen,
    Work through this and you should be able to get it back: http://support.microsoft.com/kb/2026220

  • Icon airport disappeared from menu bar,only see grey space

    icon airport disappeared from menu bar,only see grey space

    Open your System Preferences and go to the "Network" pane. Enable "Show Wi-Fi status in Menu Bar".

  • Sophos disappears from menu

    sophos disappears from menu, only stays up alittle while ,also disappears after updating, even changing thru user groups for startup

    Unless you're required to install Sophos by an organization, I suggest you remove it according to the developer's instructions. It serves no real purpose and is likely to cause instability and poor performance.

  • Why my calendar display different there is one day difference from different  when I see main screen and open the calendar

    See my Why my calendar display different there is one day difference from different  when I see main screen and open the calendar

    I too am having the same issue only I am in Regina, Canada.  iCloud appears to think Regina, Canada is in the Central time zone which it is, but it does not use Daylight Savings time.  My PC is Windows 7 and I am using Outlook 2010.  I have iCloud on iPhone 5 and iPad 2.   Terribly frustrating!

  • HT201356 How on earth do you answer or change the verification questions when you never set them up in the first place?

    how on earth can you answer the verification password change questions when you never set them up in the first place?

    You need to ask Apple to reset your security questions. To do this, click here and pick a method; if that page doesn't list one for your country or you're unable to call, fill out and submit this form.
    (124244)

  • Why are icons disappearing from my dock even tho I can still use the location to open the app

    How do I keep icons from disappearing from my dock - even tho I can click on the emptied location and open the "ghost" application?

    That sounds off. I would right click on the icon/space in the dock and click options>remove from dock. Then drag the application from the apps folder in finder to the dock again and see if it stays.
    Ryan

  • My friend got a new iphone 5. when he was setting it up and the icloud questions came, we couldnt get past one it was almost like it froze but it didnt he just cant get past it. what do we do?

    my friend got a new iphone 5. when he was setting it up and the icloud questions came, we couldnt get past one it was almost like it froze but it didnt he just cant get past it. what do we do?

    What question?
    What did you try?
    Was the device connected to Wi-Fi or Cellular data?
    Do you really want help?  If so, stop being vague and provide some details.

  • I buy songs from itune store, but then it disappears from my ipod (gn. 4).  am i the only one?

    i buy songs from itune store, but then it disappears from my ipod (gn. 4).  am i the only one?

    You can transfer iTunes purchases from your iPod to a computer by:
    iTunes Store: Transferring purchases from your iPhone, iPad, or iPod to a computer
    If the purchased music is not on your computer or iPod and you are in the USA and have iTunes 10.3 you may be able redownload them via the iCloud Beta by:
    http://support.apple.com/kb/HT2519
    If not in the USA you can contact the iTunes people and they MAY allow a redownload.

  • Why can I not set a member attribute when there is only one child below the member?

    Why can I not set a member attribute when there is only one child below the member?The "member attribute" tab on the properties window of App Manager is grayed out. What am I forgetting?TIA,Craig Wahlmeier

    Most likely because Essbase is creating an implicit share relationship between the two members, which is causing the association tab to be grayed out. Tag the parent member with the "Never Share" attribute and see if that fixes the problem.Regards,Jade-----------------------------------Jade ColeSenior Business Intelligence ConsultantClarity [email protected]

  • C How to Set Isolation Level in the Connection String

    How to Set Isolation Level in the Connection String using the "Microsoft OLE DB Provider for DB2 Version 4.0"?
    We are trying to move from Crystal Reporting that run against a IBM DB2 database on a mainfram to SSRS reporting and we have downloaded the "Microsoft OLE DB Provider for DB2 Version 4.0" and then worked with the DB2 Administrator to create the
    Packages.  We only have access to use the "Read Uncommitted ("MSUR001") package.   We were able to connect and pull data before he removed access to the other packages, but after setting access the Connection keeps trying to use
    the 'Cursor Stability (MSCS001)" package.   How do we change the Default to the "Read Uncommitted ("MSUR001") package???   Since it is keeps defaulting to the the other package
    we can't connect to do it in the T-SQL query, it has to be set at the Connection String level.

    Hi Dannyboy1263,
    According to your description, you want to set the Transaction Isolation Level in Connection String. Right?
    In Reporting Services, the Connection String for OLE DB Connection can only contains Provider, Data Source and Initial Catalog. There's no property for setting Transaction Isolation Level in the Connection String. Based on my knowledge, we can
    only set the Transaction Isolation Level at Query level or set it by using code (C#, VB, Java...) to call the property of Connection. So unfortunately your requirement can't be achieved currently.
    Reference:
    OLE DB Connection Type (SSRS)
    Data Connections, Data Sources, and Connection Strings in Reporting Services
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • HT4356 I am trying to print wirelessly from my ipad to an epson stylus SX438W. The connection appears fine on both devices but the ipad cannot connect to the printer. It has been working fine for the past 4 months. Can anyone help?

    I am trying to print wirelessly from my ipad to an epson stylus SX438W. The connection appears fine on both devices but the ipad cannot connect to the printer. It has been working fine for the past 4 months. Can anyone help?

    Have you tried restarting the printer? Reboot the iPad as well.
    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.

  • When using iPhone with Ford automobiles' Sync, the connection drops each time the ignition is shut off. In order to restore, the bluetooth must be turned off on the iphone, then restarted. Any suggestions?

    When using iPhone with Ford Automobiles' SYNC, the connection drops each time the ignition is shut off. To restore, you must turn off the bluetooth on iPhone, then restart each time. Any suggestions?

    There is an update avaialbe for Ford systems to correct bluetooth problems. You need to update your system.

  • How can i increase the height of the navigation toolbar to make my persona more visible? adding toolbars puts them all below the navi bar and it looks weird. i know this has been asked many times but the answer's always "add toolbars".

    How can i increase the height of the navigation toolbar to make my persona more visible?
    adding toolbars puts them all below the navi bar and it looks weird.
    i know this has been asked many times but the answer's always "add toolbars".

    Look here.
    http://support.apple.com/kb/index?page=answerlink&url=http%3A%2F%2Fsupport.apple .com%2Fkb%2FHT1495&answerid=16777216&src=support_site.home.search

Maybe you are looking for

  • Itunes folder location is correct but music and books pointing to time machine

    hi, i was hoping someone could help with an itunes 10.6.3 issue i have.  i am using an imac with OS X 10.5.8.  when i open itunes preference, the itunes media folder location is correct.  however, when i look at a song or book info, it is pointing to

  • Default image opener

    I'm in a little bit of crisis here. I'm on a Mac Mini (Power PC) running Tiger, and I think I've completely "screwed" myself over. I'm not sure how I did it (it wasn't an error on the computer's fault, I can say that much), but when I went into the F

  • UDF to check the amount value

    Hi I have a scenario where i have to check the amount value sholuld be greater than Zero or not, if it is not greater than zero i have to raise an exception and skip that record .. i wanna do that using UDF..How we do that venkat

  • Linear Search

    I got this Linear input example from many site and somehow its standard. Question: 1)What to add to ActionListenerListener class so that it will go to search class,Search class is on a seperate file .Example of the ActionListener is below Search clas

  • Headset Won't Connect

    Hello, I bought a Sony DR BT101 Headset at an apple store in order to use it with my mac book pro running snow leopard. However, I have run into an problem while using it. It is paired with my computer and all so that is fine. When I go into to bluet