Color Coding in PHP/MySQL model: INC file

Dreamweaver 8.02 on Vista RTM (wouldn't matter I don't
think).
I have a site I was using DWMX to manage previously and at
that time I got into one of the XML or TXT files associated with DW
and changed it so it would reckonize .INC as a valid file and
therefore give me some color-coding, code suggestions as I am
typing etc.
On DW8 I see similiar XML/TXT files (for DW config) and now
INC files are all over the place... so I am thinking it should
reckonize this file types.
Still though, the color coding (and the ability to use the
menus to insert img's, etc) are greyed out.
Any ideas?
A typical inc
<div>
html
html
html
</div>
nothing hardcore.
Any ideas? Macromedia/Adobe help online wasn't much help and
my searching on the forums isnt bringing up anything.
Thanks
Sean

quote:
Originally posted by:
Newsgroup User
SeanCotter wrote:
> I don't know how big of an issue this is, but INC is a
popular as an include
> ext for PHP and I imagine people will be rolling to
Vista as they get new
> machines. Hopefully this can help someone.
The .inc filename extension is popular, but it's also
insecure unless
the include files are stored outside the server root. Web
servers have
no idea of the correct MIME type for an .inc file, so they
just serve
them up as plain text if a direct request is sent to the
server. This
risks exposing sensitive information, such as database
passwords.
It's far safer to use the combination .inc.php. The server
sees the .php
filename extension and parses any code as PHP. The .inc
reminds you that
it's an include file.
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Thanks for the tip David.
That might have been a solution from the begining but I was
going off what I was reading in some PHP books and looking at
samples, etc. I am running PHP5 on IIS6 and its been fine for a
year, I just tried what you mentioned, to treverse directly to the
includes (and I know where they are...) and IIS doesn't give them
up. If you have a method to try let me know I would be interested
in seeing... though honestly, in the case of the website at hand,
minus one dynamic section what is in the INC is what people see by
viewing source on thier browser and in case of the dynamic pages
(google maps mashup) they can have it ;) if it helps them with
thier site... let me know if there is a way to test that security.
Thanks
S

Similar Messages

  • Recommend PHP/MySQL Utility Application

    To save time, I am looking to purchase an application development software / toolbox compatible with php / mysql.  One of the functions I am looking for is a php file upload via form upload script. I know that DMX zone has separate program they sell.  Ideally, I would like a tool that does more than just one function and not with a high price tag.
    If you could recommend some products, it would be appreciated.
    George

    When it comes to using a reasonably priced "no additional coding required" PHP/MySQL code generation software, I´ve always been very pleased with PHPMAKER -- however it should be mentioned that there are lots of other tools out there as well which might suit your needs better than this one, so just google for "php code generator" to get a general idea on what´s available.
    Cheers,
    Günter

  • How do I get .inc files to update .lbi?

    I have some php pages with .inc files set up for use.  Those .inc files include library files and template files.  When I make a change in those files, the .inc files aren't getting updated.  How do I get them to update?  Thank you.

    First, you have to embbed picture into mp3 file with idtag editors (tagalicious, musicbrainz picard, mp3tag, id3tag editor...).
    Then you'll have to install at least Itunes 10.5.1(42), even if you're not using Itunes at all.
    Albumarts will now appear in every folder from the finder.
    I closed my topic because I solved it :
    https://discussions.apple.com/message/16640910
    Is it the same for you ?

  • How to make it so that DW shows color-coded text for a file type?

    Hi,
    I work with ".inc" files, which I include into PHP files.
    At the moment DW just shows all of the text within .inc files
    as black. How can I get DW to color-code the text (like it does
    with other files such as html or php) so that I can make it easier
    to read?
    Cheers!

    http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_16410
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "chuckee" <[email protected]> wrote in
    message
    news:fb6cdb$mno$[email protected]..
    > Thanks for that but I did want to keep the file with the
    .inc extension.
    > In the back of my mind I thought there was some setting
    I could change so
    > that DW recognised new file types.

  • Record Set Variables used in PHP and MYSQL model

    PHP MYSQL server model.
    I'e been using dreamweaver for ages and have allways admired
    how well they have kept compatibility between versions. The recent
    8.02 release was a little bit of a shock when I had to start
    rewriting all my PHP MYSQL recordset queries!
    In the bulk of my SQL queries I detect on of two states for a
    query parameter and in some queries the parameters are used more
    then once. By creating a single variable in for the recordset I've
    allways been able to check and recheck the single variable in the
    query using the standard recordset. Now in version 8.02 I am
    getting the error: Missing type for variable:colname
    So where:
    SELECT *
    FROM links
    WHERE LinkID = colname or colname=-1
    ORDER BY `Level` DESC
    used to work it does not work any more!
    I'm being forced to rewrite the query:
    SELECT *
    FROM links
    WHERE colname in (-1,LinkID)
    ORDER BY `Level` DESC
    Simple enough but where the queries get more complex the more
    variables I have to define!
    This is not Cool! Can we get a bug fix for this so that I
    dont have to rewrite all my queries!
    P.S. Since when did anyone say that the Dreamweaver was SQL
    injection safe! This issue should have been resolved back in the
    Ultradev days! I guess Kudos goes to Adobe for finally trying to
    address one of the biggest glaring issues dreamweaver has had since
    it's inception. I was allways kinda upset that I was forced to pass
    variables as text to sprintf when I knew they where numbers!
    If I Look at the resultant code now I'm sure the result
    sprintf will still be using %s instead of optionally specifying one
    of the many diferent types (
    % - a literal percent character. No argument is required.
    b - the argument is treated as an integer, and presented as a
    binary number.
    c - the argument is treated as an integer, and presented as
    the character with that ASCII value.
    d - the argument is treated as an integer, and presented as a
    (signed) decimal number.
    e - the argument is treated as scientific notation (e.g.
    1.2e+2).
    u - the argument is treated as an integer, and presented as
    an unsigned decimal number.
    f - the argument is treated as a float, and presented as a
    floating-point number (locale aware).
    F - the argument is treated as a float, and presented as a
    floating-point number (non-locale aware). Available since PHP
    4.3.10 and PHP 5.0.3.
    o - the argument is treated as an integer, and presented as
    an octal number.
    s - the argument is treated as and presented as a string.
    x - the argument is treated as an integer and presented as a
    hexadecimal number (with lowercase letters).
    X - the argument is treated as an integer and presented as a
    hexadecimal number (with uppercase letters).
    This would further protect a query from being SQL Injected!
    I'd hope that Adobe would enable a Site specfic setting or
    something that would change the behaviour to match the passed
    parameter to sprintf with the specified variable type (I'd guess
    best practice to be Numeric be type f Text be type s and Date as
    type s as well)

    Start by saying bump.
    I've still no word from Adobe if they are doing anything with
    this problem. Any one had any replys from Adobe on it? Any one
    found a work around with recoding queries?

  • CSS WON'T GET COLOR CODED UNLESS THE FILE IS IN A PROJECT?? R U KIDDIN??

    If I open a CSS file outside of a project, there is no color coding! Please tell me this can be changed. I DO NOT WANT CFBUILDER ORGANIZING MY PROJECTS!
    $299 for this? Really - please explain why I should pay $300 for a bloated version of Homesite?  Homesite was GREAT!  You guys frakked up by killing it.  CFB is confusing, the settings especially, nothing does what it states. Spend too much time trying to figure out how to update a simple thing.  Bad when I have to Google when I just want to display line numbers.  Typical Adobe - non-intuitive.

    Stop shouting.  Jesus.
    What you're whining about is the equivalent of my mum (who is a lovely little old lady in her late 70s) buying a new VHS and having a tanty of the buttons not being in "the right place".
    If you struggle so much with a software app having settings in different places that it yields this sort of response - and not even an inital visceral response, but lingering enough for you to put the caps lock on and write it down! - you're in the wrong industry, mate.  We're not talking rocket surgery here.  Or even brain science.
    That's not to say that shifting from something like HS to Eclipse doesn't involve a bit of a mindshift, but it's not the end of the world.  And no-one's making you change text editors either.
    Personally I think CFS was a really good text editor, and I rued moving onto DW (not my choice, I was the guinea pig for a failed experiment at a job I had years ago), and when I moved from DW to Eclipse I spend a few moments going "what's all this project sh!t?".  But then I realised everything I work on actually is a project, and there's no harm in having a little organisation in my work. And the work of the rest of the team.  And whilst I found Eclipse has some quirks I could do without, I also remember CFS had some quirks I could do without (and DW was an app I could simply do without from start it finish), so they're even in that regard.  But I also found that Eclipse's inifintitely customisable platform is a real boon for my development across various languages and productivity tools.  Eclipse really is far far better than CFS when one looks at the bigger picture: the one that is outside the realms of developing just basic websites, by one's self, on a single server (and that's not Adobe's target market with CF & CFB anyway, I think).
    That said:  CFB has a way to go (and is ot worth $300: it's just a Eclipse plug-in after all), but being built on Eclipse is a good start.
    I look fwd to CFB 2.0 to see if it's worth buying...
    Adam

  • Through SharePoint Client Object model, how to make color coded events on Sharepoint Calendar

    Hi,
    Through SharePoint Client Object model, how to make color coded events on Sharepoint Calendar.
    Plese share your knowledge.
    Regards
    Tharak

    Hi,
    According to your post, my understanding is that you wanted to make a color events Calendar.
    We can achieve it using the OOB method by creating the Calendars Overlay.
    http://summit7systems.com/color-code-calendar-events-in-sharepoint/
    You can also use the JavaScript to achieve it.
    http://spsawyer.wordpress.com/2013/07/18/sharepoint-color-calendar/
    http://www.planetwilson.co.uk/sharepoint-2013-colour-calendar-v2/
    more reference:
    http://usermanagedsolutions.com/SharePoint-User-Toolkit/Pages/Color-Coding-Calendar-List.aspx
    http://blog.pathtosharepoint.com/2010/04/06/tutorial-add-color-coding-to-your-sharepoint-2007-calendar-in-15-minutes/#comment-7231
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Simply put, I do not like like the new color coding "dots" and I do not like having to press the Command key before double clicking to open files in a new window. How hard would have been to include the old version of these two features?

    Simply put, I do not like like the new color coding "dots" and I do not like having to press the Command key before double clicking to open files in a new window. How hard would have been to include the old version of these two features?

    Apple - Mac OS X - Feedback

  • Will Edge include support for color coding for ASP Classic .asp files

    We have some old sites running asp Classic (Active server Pages)
    How can I add color coding for .asp files?

    Edge Code should already highlight .asp files as plain HTML.  If you're looking for highlighting of the ASP-specific code, that is something Edge Code does not plan to support out of the box.
    It is possible to write an extension that adds this support, but it would not be a small amount of work -- you'd have to write a tokenizer yourself to support syntax highlighting, for example.  Details on writing an extension that adds a new language can be found here: https://github.com/adobe/brackets/wiki/Language-Support#defining-a-new-language
    - Peter

  • Opening SASS files (.scss) in Dreamweaver (CS6) but no color coding or hinting

    Hi there, wanted to ask if anyone has a solution for getting Dreamweaver (CS6) on a Mac (10.9.5) to be able to open a .sccs file with color coding and hinting. At the moment opens files but no autocomplete, color coding or hinting.

    Thanks for the help. I didn't think the retina did, I just wanted to help clarify what I was working with. I tried changing the external editor also and that got the split design view working again, but still no code coloring gosh darnit.

  • Installed PHP & MySQL, and now I have file permission errors.

    Hi Everyone
    I recently made a switch from using MAMP to making a separate installation of PHP, MySQL and Rails. I used the first tutorial for Rails + MySQL, and the second one for PHP;
    http://hivelogic.com/narrative/articles/ruby-rails-mongrel-mysql-osx
    http://www.entropy.ch/software/MacOSx/mysql/
    Unfortunately, I now receive errors when trying to install activeCollab through it's own PHP install script, and WordPress won't let me import xml backups into a locally installed WordPress. This must mean that I don't have full Read/Write access to my 'Sites' directory (this is set as my default htdocs in the Apache httpd.conf). I haven't noticed any problems with Rails - so far it's only been PHP based CMS's which have thrown up the permission errors.
    I've checked the file permissions on my 'Sites' folder - I'm the only user on the machine, and my account has full Read/Write access to the folder. However, I've noticed that there is also the option to choose 'Group' access, for which my account is again selected and given Read/Write access.
    Then there is 'Others' category, and this has 'Read only' access. Is there an option in there which I need to select and give Read/Write permissions to? mysql, php ?
    Or, is there a MySQL/PHP/Apache config file somewhere, within which I need to give global read/write permissions?
    I didn't have this problem when I was served up local sites from MAMP - and I also configured MAMP to use the 'Sites' folder as it's default htdocs folder. I get the impression that because MAMP was installed as an 'Application', that it automatically inherited my user permissions - maybe PHP and MySQL don't inherit my user account permissions because they are services?...
    I've come very far with getting everything installed to work with the OS X bundled Apache server (which I believe is 1.3 - I certainly haven't updated it) so I'd love to get everything finally configured - therefore, any help with this is very, very much appreciated!
    MacBook Pro 2.4Ghz    

    You'll probably get a better response at the Server Products or Networking & Web http://discussions.apple.com/forum.jspa?forumID=733 forums.

  • Color Coding not Coloring the Code

    Hello All,
    I am using Dreamweaver CS3 on a Mac and for some reason, when
    I set the Color Coding in my preferences, it will not show in my
    document.
    I tried saving the document and double checked if I actually
    had the document set to php and no luck.
    is there something I might be doing something wrong?
    Mainly, I set the php comment code color to a color and bold
    and nothing shows when I use a comment in the document.
    Thanks for any help or advice,
    Paul

    Paul,
    > Ok, forget it, I figured it out...
    >
    > I have set in my preferences that when a new page opens
    to just open an HTML
    > page.
    To get new pages to default to PHP, do this:
    1. Edit your Site
    (Site > Manage Sites... > Edit...)
    2. Make sure you have a Testing Server defined
    (Category: Testing Server)
    3. Set Server Model to be "PHP MySQL"
    4. Click: OK, Done
    HTH,
    Randy

  • How to use spry in the dreamweaver with the php/mysql

    hello,
    Iam new to the spry framework
    and i want to know can we use the spry in the dreamweaver
    along with php / mysql code
    if so please tell how to do this
    thanks in advance

    swetha123 wrote:
    > but when i complie this page it is not showing the
    preiew or any thing in the
    > browser i saved this page with the extension .php if i
    run the same page with
    > .html then i can see the design but it is not being
    executed
    The reason you get nothing when you save the page with a .php
    extension
    is because you have display_errors turned off, so you can't
    see the
    error message telling you there's a syntax error. The
    semicolon is
    missing at the end of this line:
    > echo "<font color='white'>Hello
    Swetha</font>"
    The reason it doesn't work with an .html extension is
    probably because
    you haven't uploaded SpryAssets/SpryTabbedPanels.js. I have
    copied your
    page and tested it locally with the correct JavaScript file,
    and the
    tabbed panels work as expected.
    There are lots of other mistakes in your page. You can't use
    float and
    position:absolute on the same element. In at least one place,
    you have
    used </br> instead of <br />. You have also got
    an closing paragraph tag
    after the paragraph that contains abc.jpg.
    Getting Spry or any other JavaScript library to work
    correctly relies on
    good, clean code. Your mixture of inline styles and font tags
    is going
    to make it difficult to incorporate Spry into your pages. I
    suggest you
    improve your HTML and CSS before bringing Spry into the mix.
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • PHP/MySql Error Message

    I've posted this before and didn't get the answer that I need, probably because I didn't post all of my codes. I am using PHP/MySql.  I created a website that has several forms.  When I process three of the forms, I get the error messages below:
    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 'Condition, Length, Color, City, `State`, Email, Photo) VALUES ('29', '4', 'Used'' at line 1.
    Below I am posting the codes.  Hopefully, this time I posted everything that I should have so that I can get assistance.   
    FORM
    <form action="<?php echo $editFormAction; ?>" method="POST" enctype="multipart/form-data" name="individual" class="individual" id="individual">
      <table width="594" border="0" class="test">
      <tr></tr>
      <tr>
        <td width="166" class="td">Posting Title</td>
        <td colspan="3"><span id="sprytextfield1">
          <label>
            <input name="Posting Title" type="text" class="test" id="Posting Title" size="35" />
            </label>
          <span class="textfieldRequiredMsg">Required</span></span></td>
      </tr>
      <tr>
        <td class="td">Price</td>
        <td colspan="3"><span id="sprytextfield2">
          <label>
            <input name="price" type="text" class="test" id="price" size="35" />
          </label>
          <span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
      </tr>
      <tr>
        <td class="td">Size(s)</td>
        <td colspan="3"><label>
          <select name="size" size="1" multiple="multiple" class="test" id="size">
    <option>0</option>
            <option>2</option>
            <option>4</option>
            <option>6</option>
            <option>8</option>
            <option>10</option>
            <option>12</option>
            <option>14</option>
            <option>16</option>
            <option>18</option>
            <option>20</option>
            <option>22</option>
            <option>24</option>
            <option>26</option>
          </select>
        </label></td>
      </tr>
      <tr>
        <td class="td">Condition</td>
        <td colspan="3"><label>
          <select name="Condition" class="test" id="Condition">
    <option>New</option>
            <option>Used</option>
          </select>
        </label></td>
      </tr>
      <tr>
        <td class="td">Length</td>
        <td colspan="3"><label>
          <select name="Length" class="test" id="Length">
    <option>Long</option>
    <option>Short</option>
    <option>Mid-Length</option>
          </select>
        </label></td>
      </tr>
      <tr>
        <td class="td">Color</td>
        <td colspan="3" class="td"><span id="sprytextfield5">
          <label>
            <input name="Color" type="text" class="test" id="Color" size="35" />
          </label>
          <span class="textfieldRequiredMsg">Required</span></span></td>
      </tr>
      <tr>
        <td class="td">City</td>
        <td class="td"><span id="sprytextfield4">
          <label>
            <input name="City" type="text" class="test" id="City" size="35" />
          </label>
          <span class="textfieldRequiredMsg">Required</span></span></td>
        <td class="td"> </td>
        <td class="td"> </td>
      </tr>
      <tr>
        <td class="td">State</td>
        <td colspan="3"><label>
          <select name="State" class="test" id="State">
            <option>AL</option>
            <option>AK</option>
            <option>AZ</option>
            <option>AR</option>
            <option>CA</option>
            <option>CO</option>
            <option>CT</option>
            <option>DE</option>
            <option>DC</option>
            <option>FL</option>
            <option>GA</option>
            <option>HI</option>
            <option>ID</option>
            <option>IL</option>
            <option>IN</option>
            <option>IA</option>
            <option>KS</option>
            <option>KY</option>
            <option>LA</option>
            <option>ME</option>
            <option>MD</option>
            <option>MA</option>
            <option>MI</option>
            <option>MN</option>
            <option>MS</option>
            <option>MO</option>
            <option>MT</option>
            <option>NE</option>
            <option>NV</option>
            <option>NH</option>
            <option>NJ</option>
            <option>NM</option>
            <option>NY</option>
            <option>NC</option>
            <option>ND</option>
            <option>OH</option>
            <option>OK</option>
            <option>OR</option>
            <option>PA</option>
            <option>RI</option>
            <option>SC</option>
            <option>SD</option>
            <option>TN</option>
            <option>TX</option>
            <option>UT</option>
            <option>VT</option>
            <option>VA</option>
            <option>WA</option>
            <option>WV</option>
            <option>WI</option>
            <option>WY</option>
          </select>
        </label></td>
      </tr>
      <tr>
        <td class="td">Email</td>
        <td colspan="3"><span id="sprytextfield3">
          <label>
            <input name="Email" type="text" class="test" id="Email" size="35" />
          </label>
          <span class="textfieldRequiredMsg">Required</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
      </tr>
      <tr>
        <td height="26" class="td">Confirm Email</td>
        <td colspan="3"><span id="spryconfirm1">
          <label>
            <input name="Confirm Email2" type="text" class="test" id="Confirm Email2" size="35" />
          </label>
          <span class="confirmRequiredMsg">Required</span><span class="confirmInvalidMsg">The values don't match.</span></span></td>
      </tr>
      <tr>
        <td height="26" class="td">Photo(s)</td>
        <td colspan="3"><label>
          <input name="Photo" type="file" class="test" id="Photo" size="35" />
        </label></td>
      </tr>
      <tr>
        <td height="131" class="td">Additional Details</td>
        <td colspan="3"><label>
          <textarea name="Additional Details" cols="40" rows="6" class="test" id="Additional Details"></textarea>
        </label></td>
      </tr>
      </table>
      <p>
        <label>
          <input name="Submit" type="submit" class="test" id="Submit" value="Post" />
        </label>
      </p>
      <input type="hidden" name="MM_insert" value="individual" />
    </form>
    SERVER BEHAVIOR
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "individual")) {
      $insertSQL = sprintf("INSERT INTO donations (postingTitle, `size`, condition, length, color, city, `state`, email, photo) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)",
                           GetSQLValueString($_POST['Posting Title'], "text"),
                           GetSQLValueString($_POST['size'], "text"),
                           GetSQLValueString($_POST['Condition'], "text"),
                           GetSQLValueString($_POST['Length'], "text"),
                           GetSQLValueString($_POST['Color'], "text"),
                           GetSQLValueString($_POST['City'], "text"),
                           GetSQLValueString($_POST['State'], "text"),
                           GetSQLValueString($_POST['Email'], "text"),
                           GetSQLValueString($_POST['Photo'], "text"));
      mysql_select_db($database_bridesmaidsrack_db, $bridesmaidsrack_db);
      $Result1 = mysql_query($insertSQL, $bridesmaidsrack_db) or die(mysql_error());
      $insertGoTo = "donations.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $insertGoTo));
    DATABASE CONNECTION
    # FileName="Connection_php_mysql.htm"
    # Type="MYSQL"
    # HTTP="true"
    $hostname_bridesmaidsrack_db = "localhost";
    $database_bridesmaidsrack_db = "bridesmaidsrack";
    $username_bridesmaidsrack_db = "";
    $password_bridesmaidsrack_db = "";
    $bridesmaidsrack_db = mysql_pconnect($hostname_bridesmaidsrack_db, $username_bridesmaidsrack_db, $password_bridesmaidsrack_db) or trigger_error(mysql_error(),E_USER_ERROR);

    Hi David,
    I did as you recommended. For good measure, I even changed the case of the letters to make sure that they coincide with exactly what's in the database.  I still kept getting the same error message.  So I deleted the recordset and attempted to recreate it.  When I attempted to recreate the record set, I got the following error message: "RangeError: invalid array length".  My codes are listed below:
    Form:
    <form method="POST" enctype="multipart/form-data" name="individual" class="individual" id="individual">
      <table width="594" border="0" class="test">
      <tr></tr>
      <tr>
        <td width="166" class="td">Posting Title</td>
        <td colspan="3"><span id="sprytextfield1">
          <label>
            <input name="posting_title" type="text" class="test" id="posting_title" size="35" />
            </label>
          <span class="textfieldRequiredMsg">Required</span></span></td>
      </tr>
      <tr>
        <td class="td">Size(s)</td>
        <td colspan="3"><label>
          <select name="size" size="1" multiple="multiple" class="test" id="size">
      <option>0</option>
            <option>2</option>
            <option>4</option>
            <option>6</option>
            <option>8</option>
            <option>10</option>
            <option>12</option>
            <option>14</option>
            <option>16</option>
            <option>18</option>
            <option>20</option>
            <option>22</option>
            <option>24</option>
            <option>26</option>
            </select>
          <span class="Text">To select multiple sizes, hold ctrl and select each size.</span></label></td>
      </tr>
      <tr>
        <td class="td">Condition</td>
        <td colspan="3"><label>
          <select name="condition" class="test" id="condition">
    <option>New</option>
            <option>Used</option>
          </select>
        </label></td>
      </tr>
      <tr>
        <td class="td">Length</td>
        <td colspan="3"><label>
          <select name="length" class="test" id="length">
    <option>Long</option>
    <option>Short</option>
    <option>Mid-Length</option>
          </select>
        </label></td>
      </tr>
      <tr>
        <td class="td">Color(s)</td>
        <td colspan="3" class="td"><span id="sprytextfield5">
          <label>
            <input name="color" type="text" class="test" id="color" size="35" />
          </label>
          <span class="textfieldRequiredMsg">Required</span></span></td>
      </tr>
      <tr>
        <td class="td">City</td>
        <td class="td"><span id="sprytextfield4">
          <label>
            <input name="city" type="text" class="test" id="city" size="35" />
          </label>
          <span class="textfieldRequiredMsg">Required</span></span></td>
        <td class="td"> </td>
        <td class="td"> </td>
      </tr>
      <tr>
        <td class="td">State</td>
        <td colspan="3"><label>
          <select name="state" class="test" id="state">
            <option>AL</option>
            <option>AK</option>
            <option>AZ</option>
            <option>AR</option>
            <option>CA</option>
            <option>CO</option>
            <option>CT</option>
            <option>DE</option>
            <option>DC</option>
            <option>FL</option>
            <option>GA</option>
            <option>HI</option>
            <option>ID</option>
            <option>IL</option>
            <option>IN</option>
            <option>IA</option>
            <option>KS</option>
            <option>KY</option>
            <option>LA</option>
            <option>ME</option>
            <option>MD</option>
            <option>MA</option>
            <option>MI</option>
            <option>MN</option>
            <option>MS</option>
            <option>MO</option>
            <option>MT</option>
            <option>NE</option>
            <option>NV</option>
            <option>NH</option>
            <option>NJ</option>
            <option>NM</option>
            <option>NY</option>
            <option>NC</option>
            <option>ND</option>
            <option>OH</option>
            <option>OK</option>
            <option>OR</option>
            <option>PA</option>
            <option>RI</option>
            <option>SC</option>
            <option>SD</option>
            <option>TN</option>
            <option>TX</option>
            <option>UT</option>
            <option>VT</option>
            <option>VA</option>
            <option>WA</option>
            <option>WV</option>
            <option>WI</option>
            <option>WY</option>
          </select>
        </label></td>
      </tr>
      <tr>
        <td class="td">Email</td>
        <td colspan="3"><span id="sprytextfield3">
          <label>
            <input name="email" type="text" class="test" id="email" size="35" />
          </label>
          <span class="textfieldRequiredMsg">Required</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
      </tr>
      <tr>
        <td height="26" class="td">Confirm Email</td>
        <td colspan="3"><span id="spryconfirm1">
          <label>
            <input name="confirm_email2" type="text" class="test" id="confirm_email2" size="35" />
          </label>
          <span class="confirmRequiredMsg">Required</span><span class="confirmInvalidMsg">The values don't match.</span></span></td>
      </tr>
      <tr>
        <td height="26" class="td">Photo(s)</td>
        <td colspan="3"><label>
          <input name="Photo" type="file" class="test" id="Photo" size="35" />
        </label></td>
      </tr>
      <tr>
        <td height="131" class="td">Additional Details</td>
        <td colspan="3"><label>
          <textarea name="Additional Details" cols="40" rows="6" class="test" id="Additional Details"></textarea>
          <input name="hiddenField" type="hidden" id="hiddenField" value="Date" />
        </label></td>
      </tr>
      </table>
      <p>
        <label>
          <input name="Submit" type="submit" class="test" id="Submit" value="Post" />
        </label>
      </p>
    </form>
    Server Behavior
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "individual")) {
      $insertSQL = sprintf("INSERT INTO donations (posting_title, `size`, condition, length, color, city, `state`, email, photo) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)",
                           GetSQLValueString($_POST['posting_title'], "text"),
                           GetSQLValueString($_POST['size'], "text"),
                           GetSQLValueString($_POST['condition'], "text"),
                           GetSQLValueString($_POST['length'], "text"),
                           GetSQLValueString($_POST['color'], "text"),
                           GetSQLValueString($_POST['city'], "text"),
                           GetSQLValueString($_POST['state'], "text"),
                           GetSQLValueString($_POST['email'], "text"),
                           GetSQLValueString($_POST['Photo'], "text"));
      mysql_select_db($database_bridesmaidsrack_db, $bridesmaidsrack_db);
      $Result1 = mysql_query($insertSQL, $bridesmaidsrack_db) or die(mysql_error());
      $insertGoTo = "donations.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $insertGoTo));

  • Php/mysql ajax toggle div

    Hi,
    I have recently started using ajax in my pages, and I am very impressed!
    But my skills have not yet developed and I am using a code snippet off the internet to do what I want.
    I have a hidden div tag called photo to which I want to load images into
    I have a link tag with an ID of the "album name"
    I want to call the div by clicking on the link and have the div animate down with a do while loop consisting of the images in that "album name"
    Here is my code:
    AJAX
    window.addEvent('domready', function(){
        var mySlide3 = new Fx.Slide('photo');
        mySlide3.hide();
        $('<?php echo $row_listAlbumPhotos['album_name'];?>').addEvent('click', function(e){
            e = new Event(e);
            mySlide3.toggle();
            e.stop();
    PHP
    <?php do { ?>
        <table border="0" cellpadding="5" cellspacing="5" >
          <tr>
            <?php
    $listAlbumPhotos_endRow = 0;
    $listAlbumPhotos_columns = 4; // number of columns
    $listAlbumPhotos_hloopRow1 = 0; // first row flag
    do {
        if($listAlbumPhotos_endRow == 0  && $listAlbumPhotos_hloopRow1++ != 0) echo "<tr>";
       ?>
            <td><div class="AlbumNameText"><a href="#" id="<?php echo $row_listAlbumPhotos['album_name']; ?>"><?php echo $row_listAlbumPhotos['album_name']; ?></a></div></td>
            <?php  $listAlbumPhotos_endRow++;
    if($listAlbumPhotos_endRow >= $listAlbumPhotos_columns) {
      ?>
          </tr>
          <?php
    $listAlbumPhotos_endRow = 0;
    } while ($row_listAlbumPhotos = mysql_fetch_assoc($listAlbumPhotos));
    if($listAlbumPhotos_endRow != 0) {
    while ($listAlbumPhotos_endRow < $listAlbumPhotos_columns) {
        echo("<td> </td>");
        $listAlbumPhotos_endRow++;
    echo("</tr>");
    }?>
        </table>
      <?php } while ($row_listAlbumPhotos = mysql_fetch_assoc($listAlbumPhotos)); ?>
    HTML
    <div id="photo">
    This is a test
    <br />
    </div>
    Currently this works for the first record found.
    I have setup two albums "Friends" and "Other"
    Currently Other is not accepting <a href="#" id="<?php echo $row_listAlbumPhotos['album_name'];  ?>"> the ID or the Ajax is not allowing the ID
    I'm not sure which. Can anyone help me?

    Take a look at this list:
    http://www.hotscripts.com/PHP/Scripts_and_Programs/Calendars/index.html
    Ignore the first few that have a colored background because
    those are paid resources, but the rest will do what you want.
    One note to mention on this subject is that there are
    combination scripts, PHPiCalendar being the most notable, that
    allow you to use a stand alone calendar application like iCal
    (Mac), Windows Calendar (only in Vista), or Sunbird (from Mozilla,
    Win or Mac). From those programs you could publish the calendar.
    All you would need to do is edit the template files in that script
    and then your users can publish from easy applications they know
    over a calendar app based entirely on PHP/mySQL.
    This is not say there are not good solutions, but this is
    just an observation. Also if you are using a forum, most forum
    software (ie: Invsion Power Board, vBulletin, Simple Machines Forum
    (SMF), etc) all have built in calendar scripts that are tied into
    the forum software. So that might be another avenue to consider.
    But if you just need a stand-alone app, then check out that
    list. There are some pretty good scripts there.

Maybe you are looking for