[PHP MySQL] Relaciones  entre dos tablas

Como se hace para manejar relaciones en Macromedia
Dreamweaver CS3
utilizando PHP y MySQL?

Hola amigo
Te dejo un codigo para que estudies.
Detalalte esto: curso ='".$row_materias['id']."'
Materias es un juego de registros que imprime un valor. Ese
valor lo compara
con lo que esta buscando y da un resultado.
Me explico. Algo como concatenaciòn o relaciòn de
tablas.
Este ejemplo es de un foro.
Materias es donde estan escritas las preguntas. Solo
transporto de una
pagina a otra la id. El juego de registro materias lo toma he
imprime un
resultado
Ese resultado lo emprime en el juego de registro
master1trabajos_profesor y
realiza la busqueda.
Lo dejo. saludos desde Colombia
mysql_select_db($database_anuack_com, $anuack_com);
$query_master1trabajos_profesor = "SELECT * FROM
trabajos_profesor WHERE
curso ='".$row_materias['id']."' ;
$master1trabajos_profesor =
mysql_query($query_master1trabajos_profesor,
$anuack_com) or die(mysql_error());
$row_master1trabajos_profesor =
mysql_fetch_assoc($master1trabajos_profesor);
$totalRows_master1trabajos_profesor =
mysql_num_rows($master1trabajos_profesor);
----- Original Message -----
From: "Alejandro" <[email protected]>
Newsgroups: macromedia.general.espana
Sent: Thursday, February 14, 2008 4:42 AM
Subject: [PHP MySQL] Relaciones entre dos tablas
> Como se hace para manejar relaciones en Macromedia
Dreamweaver CS3
> utilizando PHP y MySQL?

Similar Messages

  • PHP MySQL NULL Values ??

    Hi,
    I am trying to implement a CMS in Dreamweaver MX 2004 using
    PHP MySQL. My Product table contains fields that are not relavent
    to all products and at the moment i have given these the value
    NULL. Is there anyway for dreamweaver not to display the NULL
    fields or is my problem with the database.
    Thanks for any help,
    Ian

    On Sun, 22 Oct 2006 16:53:07 +0000 (UTC), "irl_123"
    <[email protected]> wrote:
    >Hi,
    > I am trying to implement a CMS in Dreamweaver MX 2004
    using PHP MySQL. My
    >Product table contains fields that are not relavent to
    all products and at the
    >moment i have given these the value NULL. Is there anyway
    for dreamweaver not
    >to display the NULL fields or is my problem with the
    database.
    > Thanks for any help,
    > Ian
    Something like this:
    if (!is_null(your recordset field here)) {
    //show the recordset field
    Steve
    steve at flyingtigerwebdesign dot com

  • [php+mysql] best way to integrate a tree category menu base on db?

    Hi all,
    I have a products catalog where all products are organized in
    categories.
    The category structure is something similar to this:
    category 1
    subcategory 1.1
    sub-subcategory 1.1.1
    sub-subcategory 1.1.2
    sub-subcategory 1.1.3
    sub-subcategory 1.1.4
    sub-subcategory 1.1.5
    subcategory 1.2
    subcategory 1.3
    category 2
    subcategory 2.1
    subcategory 2.2
    sub-subcategory 2.2.1
    sub-subcategory 2.2.2
    sub-subcategory 2.2.3
    sub-subcategory 2.2.4
    subcategory 2.3
    ...and so on...
    In general, I have 3 category levels.
    I manage these catagories with only one table using self
    foreign keys.
    Now I need to add a tree menu that will reflect the above
    category
    structure.
    I use php + mysql to store the tables (products and
    categories.
    I found several javascript samples that allow you to do
    something similar
    but with static data.
    I'm searching for a tree menu that is easily customizable and
    that can use
    dynamic data from mysql db.
    Is there a tutorial or smple that would do the trick?
    TIA very much!
    tony ;).

    The page I'm trying to create is here www.hollisterairshow.com/plan-results.php and the questionnaire is here www.hollisterairshow.com/helpusplan.php .
    I went ahead and created recordsets using advanced recordsets and these seem to be working, here's a sample SQL
    SELECT *
    FROM plan
    WHERE Saturday = 'Saturday' AND plan.howArriving = 'Auto'
    I created a recordset for each combination of day and transportation mode - six in all
    This selected the correct records.
    To display the count of how many records selected I then used in DW Insert/Data Objects/ Display Record Count/Total Records which generated the following code:
    <?php echo $totalRows_rsSatAuto ?>
    This worked OK - not elegant but OK and I repeated it for each combination of Day and Transportation mode!!
    So there are two problems I'm having:
    I know I can select the records I want but how do I display the sum of the column containing "How many in your party" - i.e. in the PHP code generated above what do I replace $totalRows_rsSatAuto with?
    There are two questions using radio buttons where I'd like to display the count and % for each option selected. I can select all records for these questions but what code do I put to sum the number of selections for each option and what code do I put to calculate the percentage
    I understand the arithmetic involved which is pretty simple but it's the mechanics of coding that has me stumped. It would really help if you could give me a sample for say the "Are you camping overnight" question which has a "Yes/No" option only. In my mundane way I would create two recordsets, one for "Yes" and one for "No", and use the same technique I describe above for counting Total Records in each recordset, but then I'm stuck with how do I calculate and display the percentages. I must be missing something very obvious as I'm sure there just has to be a more elegant solution.
    Thanks so much for your continued interest.
    Tony

  • Conditional content from 2 tables in PHP/MYSQL

    I am developing a site in DWCS4 that has a database with 2 tables: audio and notes.
    The tables contain the following fields:
    AUDIO
    audio_id (ai)
    title (varchar)
    filename (varchar)
    (plus other fields for date, speaker etc)
    NOTES
    notes_id (ai)
    audio_id (int) - foreign key
    title (varchar)
    file_location (varchar)
    (plus other fields for date, author etc)
    I have a page which lists audio files which enables a selection to be made that then leads to a page (audio_detail.php) which has full details of the audio and contains a player (see www.wscnf.org/audio.php).
    Some of these audio files have associated notes and others do not - those that do contain the reference from audio.audio_id in notes.audio_id - if there are no notes then the foreign key defaults to a value of 0.
    I have been asked to amend the audio_detail.php page so that, if there is an associated notes file, a link to that file is shown on the page - what I have in mind is if there are asscoiated notes, a new line appears beneath the player which says "Notes accompanying this audio are available:" followed by a download link. If there are no associated notes then this line does not appear.
    Any assistance on how to achieve this would be most welcome - my knowledge of PHP/MYSQL is fairly basic (but growing!)

    There are several ways to go about this, but the one that comes to mind is to use an outer join to select columns from both tables. The outer join will return results from the main table AUDIO regardless of if there are matching results in NOTES. You can then test the column values in NOTES. If the row has a NULL value in NOTES.notes_id, then there is no associate note for that row. If there is an notes_id value, then you can use conditional logic to display the NOTE details, link to other pages, etc.

  • New PHP/MySQL Connection extension doesn't  show tables.  What's the next step?

    I'm creating Dreamweaver extensions to work with my CMS.
    Since it is already connecting to the MySQL database I'd like
    Dreamweaver to access the same connection without asking the
    developer for the MySQL credentials again. I have created the HTML
    form, the EDML for the connection script, and the JavaScript to
    stitch it together, and I can successfully create connections. The
    connection script looks good but when I try to expand the tables in
    the database window it doesn't post a request to the server and it
    just shows "None". I have a regular PHP MySQL connection on the
    same site which works fine.
    I feel like I'm missing a required next step which would tell
    it how to enumerate tables. It would be ideal if I could plug into
    the existing PHP MySQL code for this.
    I would really appreciate any help and/or pointers!

    "zymsys" <[email protected]> wrote in
    message
    news:fiuho4$ao8$[email protected]..
    > I'm creating Dreamweaver extensions to work with my CMS.
    Since it is
    > already
    > connecting to the MySQL database I'd like Dreamweaver to
    access the same
    > connection without asking the developer for the MySQL
    credentials again.
    > I
    > have created the HTML form, the EDML for the connection
    script, and the
    > JavaScript to stitch it together, and I can successfully
    create
    > connections.
    > The connection script looks good but when I try to
    expand the tables in
    > the
    > database window it doesn't post a request to the server
    and it just shows
    > "None". I have a regular PHP MySQL connection on the
    same site which
    > works
    > fine.
    > I feel like I'm missing a required next step which would
    tell it how to
    > enumerate tables. It would be ideal if I could plug into
    the existing PHP
    > MySQL code for this.
    >
    > I would really appreciate any help and/or pointers!
    Are you using the Database access functions?
    http://livedocs.adobe.com/dreamweaver/8/apiref/07_mmd31.htm
    MMDB.getTables()
    http://livedocs.adobe.com/dreamweaver/8/apiref/07_mmd42.htm
    MMDB.getColumns()
    http://livedocs.adobe.com/dreamweaver/8/apiref/07_mmd34.htm
    Or are your trying to create a new Connection Type for the
    PHP_MySQL_ServerModel or a whole new servermodel alltogether?

  • Can't connect PHP/MySQL 404 error

    Wow, the learning curve is killing me. Yet another challenge. I'm using Dreamweaver CC and this tutorial http://www.adobe.com/devnet/dreamweaver/articles/setup_php.html
    I'm at this step:
    Open comments.php. You must have a PHP page open in the Document window to create a MySQL connection.
    In the Databases panel (choose Window > Databases), click the Plus button on the panel and select MySQL Connection.The MySQL Connection dialog box appears.
    Type connTest as the connection name.
    For the MySQL Server, type localhost.If you are using the MAMP default ports on a Mac, use localhost:8889.
    For the User Name, type phptestuser.
    Type the password you chose for the phptestuser account in the Password field.
    For the Database, type php_test.Note: You don't need to precede the underscore with a backslash here. It was inserted by phpMyAdmin in the previous section (see Figure 20) only because phpMyAdmin uses a query that permits wildcard characters.
    Click Test.Dreamweaver attempts to connect to the database. If the connection fails, do the following:
    Double-check the server name, user name, and password.
    Check the settings for the folder Dreamweaver uses to process dynamic pages (see Specifying a Testing Server for Dreamweaver).
    Verify that the web and MySQL servers are both running.
    Temporarily disable any firewall or security program. If the connection works, you need to configure the security program to permit communication between Dreamweaver and MySQL.
    Click OK. The new connection appears in the Databases panel.
    Expand the connTest connection, and then expand the Tables branch. You'll see the comments table in the database, which you can expand to reveal the details of the table columns (see Figure 23).
    As far as I can tell I have followed this tutorial to the letter.
    As far as I can tell, XAMPP/php mySQL are all running fine, the files are in the correct place and everything should be working. However when I hit test I get a 404 error. (Same error when I hit the select button.)
    The suggested problems on the 404 message are:
    1. There is no testing server running on the server machine.
    Pretty sure the testing server is running. Is there any way to test this, other than to note that xampp is definitely running right now and that I can log into phpMYadmin no problem?
    2. The testing server specified for this site does not map to the http://localhost/php_test/_MMServerScripts/MMHTTPDB.php URL Verify that the URL Prefix maps to the root of the site.
    Ummm...I'm pretty sure I put things where I was told to put them in the tutorial, but I'm lost at this point where I should verify what. A clue here? The files are where they are supposed to be, but maybe I entered something wrong? Except...I'm not sure what that could be or where to find it. Whatever IT is.
    Everything in local files is looking good.
    Thanks for your help!
    PS: Extra points to anyone who figures out how to make copy/pasteable error messages! These buggers are the bane of my life!

    Bgupta, you rock!
    I hope you have copied the "mysql.php" and "MMHTTPDB.php" files from "C:\Users\username\AppData\Roaming\Adobe\Dreamweaver CC\locale\Configuration\Connections\Scripts\PHP_MySQL\_mmDBScripts" to "C:\xampp\htdocs\phptest\_mmServerScripts"
    This was EXACTLY the problem. I checked the tutorial and I couldn't even find where the tutorial said to do this. (If I missed it, let me know where in the tutorial it was, please.)
    Fixed!

  • Show if field is not empty - PHP/MySQL

    Is there a way I can only show bits of a page if a recordset
    has entries in a certain field, automatically hiding the area if
    the field is empty. (PHP/MySQL)
    To put it in real terms, I have loads of products listed in a
    repeating table. If a product has a photo gallery related to it
    there is a 1 entered in 'photos' field, it has a video attached
    here is a 1 entered in 'videos field and likewise for reviews it
    will have a 1 entered in the reviews field.
    What I'd like to have is a photo, video and review icon/link
    in the 'master table' which only appears in the repeated products
    that have a 1 listed in that field and have them not appear at all
    when there is a 0 in the field.
    Can anyone help me figure it out

    ADDT is certainly a great help, as it - among many other
    features - will allow you define whatever page element as
    "show/hide" based on a query result -- for this it´s using a
    so-called "condition builder" which lets you do that without
    coding.
    However you can achieve the same result without needing to
    resort to ADDT -- by using a basic "if" condition that´s
    checking the respective table column for having the value "1"
    stored, and if so, display the page segment
    The following 3 examples should work when replacing the
    sample "queryname" with the query name your page is actually using:
    <?php if ($row_queryname['photos'] == '1') {?>
    display photo icon here
    <?php }?>
    <?php if ($row_queryname['videos'] == '1') {?>
    display video icon here
    <?php }?>
    <?php if ($row_queryname['reviews'] == '1') {?>
    display videos icon here
    <?php }?>

  • Command in php / mysql

    Hello,
    I used to program a lot in ASP, and loved the command
    function.
    However, now that I'm programming in PHP I do not have this
    at my disposal unfortunately.
    How does everyone perform certain actions on forms right
    now?, for example I'm performing an update on a record, but want to
    update all records in the table first by setting a certain field to
    0.
    Any thoughts and ideas / samples are greatly
    appreciated!

    Jasmine2002 wrote:
    > Correct, in ASP however I had the command so I can later
    on easily call up the
    > box and change / add / update my SQL.
    >
    > Do you just write the appropriate PHP for it?, I don't
    really know how to
    > properly write this in conjuction with Dreamweaver.
    I suspect that command is probably a stored procedure.
    Unfortunately,
    stored procedures were added to MySQL only in version 5.0,
    and
    Dreamweaver doesn't support stored procedures in the PHP
    MySQL server
    model. (I've lobbied for support, but it hasn't happened
    yet.)
    Your update is rather unusual, but you should be able to get
    Dreamweaver
    to generate the code for you using the Update Record server
    behavior.
    David Powers, Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Spry accordion with php mysql as data

    Hello
    I`m trying to create a spry accordion where the Labels are pulled from a mysql database table and the Content of that label is pulled from data in the same database. I tried adding first the spry accordion and then created 1 recordset for the labels and a second recordset for the content , then I added a repeat region for the labels DIV and inside this div I added a repeat region for the content.
    Unfortunatly when viewed in the browsers the accordion doesn`t work.
    Can anyone look at the code and tell me where is the mistake.
    Thanks
    <?php require_once('Connections/log.php'); ?>
    <?php
    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;
    mysql_select_db($database_log, $log);
    $query_log_year = "SELECT DISTINCT Year(`23849`.acoff) AS yy FROM `23849` ORDER BY Year(`23849`.acoff)";
    $log_year = mysql_query($query_log_year, $log) or die(mysql_error());
    $row_log_year = mysql_fetch_assoc($log_year);
    $totalRows_log_year = mysql_num_rows($log_year);mysql_select_db($database_log, $log);
    $query_log_year = "SELECT DISTINCT Year(`23849`.acoff) AS yy FROM `23849` ORDER BY Year(`23849`.acoff)";
    $log_year = mysql_query($query_log_year, $log) or die(mysql_error());
    $row_log_year = mysql_fetch_assoc($log_year);
    $totalRows_log_year = mysql_num_rows($log_year);
    $mhour_log_mon = "0";
    if (isset($row_log_year['yy'])) {
      $mhour_log_mon = $row_log_year['yy'];
    mysql_select_db($database_log, $log);
    $query_log_mon = sprintf("SELECT DISTINCT DATE_FORMAT(`23849`.acoff, '%%M') AS mon , DATE_FORMAT(`23849`.acoff, '%%m') AS m , sum(`23849`.ablock) as toth FROM `23849` WHERE YEAR(`23849`.acoff) = %s GROUP BY m ORDER BY m ", GetSQLValueString($mhour_log_mon, "int"));
    $log_mon = mysql_query($query_log_mon, $log) or die(mysql_error());
    $row_log_mon = mysql_fetch_assoc($log_mon);
    $totalRows_log_mon = mysql_num_rows($log_mon);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>testing ajax php mysql</title>
    <script src="SpryAssets/SpryAccordion.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div id="Accordion1" class="Accordion" tabindex="0">
      <div class="AccordionPanel">
        <?php do { ?>
          <div class="AccordionPanelTab"><?php echo $row_log_year['yy']; ?></div>
          <?php } while ($row_log_year = mysql_fetch_assoc($log_year)); ?>
    <div class="AccordionPanelContent">
      <table width="100%" border="0" cellspacing="5" cellpadding="5">
        <?php do { ?>
          <tr>
            <td><?php echo $row_log_mon['mon']; ?></td>
            <td><?php echo $row_log_mon['toth']; ?></td>
          </tr>
          <?php } while ($row_log_mon = mysql_fetch_assoc($log_mon)); ?>
      </table>
    </div>
      </div>
    </div>
    <script type="text/javascript">
    <!--
    var Accordion1 = new Spry.Widget.Accordion("Accordion1");
    //-->
    </script>
    </body>
    </html>
    <?php
    mysql_free_result($log_year);
    mysql_free_result($log_mon);
    ?>

    You only have 1 "AccordianPanel" which contains a list of "AccordianPanelTab" elements, then a list of "AccordianPanelContent" elements.
    You need to have a list of "AccordianPanel" elements, each containing a pair or "AccordianPanelTab" and "AccordianPanelContent" elements.
    HTH,
    Randy

  • PHP MySQL Error Code 500

    May be someone can help me out with this problem.
    I have setup a new site using PHP MySQL and Dreamweaver 8.02.
    Dreamweaver connects to the database but after creating a
    recordset the recordset cannot be used.
    instead Dreamweaver returns:
    HTTP Error Code 500 internal Server Error
    Any help will be much appriciated.
    Jos

    Hello,
    I have also had the same error - namely that whilst I could connect via ftp, upload/download files, and view database tables, any attempt to view of modify recordsets resulted in error 500.
    Having checked other potential causes (e.g. selection/non-selection use of passive FTP setting, enabling of php, etc.), on the back of posts here I contacted my host and asked if if could relate to mod security, as further investigation revealed that the issue only occurred on sites where mod security had not been disabled (I don't like to disable mod security for obvious reasons - and I'm told you can't do that site by site with apache2 anyway).
    After a few false starts, the problem was resolved - with the following response from my host: "The false positives were being generated by "/_mmServerScripts/MMHTTPDB.php" and that is what we've worked around in the rules. As such, any domain on [servername] using that script in the same way shouldn't generate a false-positive moving forward."
    So it seems the answer (assuming your on an apache server of course) may be to modify the rules to allow full access for MMHTTPDB.php.
    I hope that is of help to some.

  • PhP/MySQL Horizontal/Vertical Repeat Region

    Hi Guys,
    I'm pretty sure this question would have been asked many times before. If so, first of all my apologies for re-posting this.
    Anyway, what I'm trying to do is create a repeat region that spans for 4 columns and then repeats the rest in rows. For example, if I have 100 records in my table (MySQL), then I want to display this in a table of 4 columns and and 25 rows (in reality, the number of records would be unspecified, of course, but still the records need to be displayed on a 4 column, X row table). For example:
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    At the moment, I have no issue with displaying the records either horizontally or vertically (explicitly) using the built in "repeat region" behavior. However, where I'm having the problem is with displaying the records in a table as the one I described above.
    I'm using DW CS5 with PhP/MySQL.
    Can I still do this using the built in "repeat region" server behavior, if so how?
    Otherwise, how else could I achieve this (ideally without using any extensions)?
    Thanks in advance for any help and support,
    Cheers

    I'm believe you should be able to modify the repeat region code to do what you want it to do.  With that said we will need 2 things:
    1.  To see the code from the page.
    2.  To know the order of the results is it:
    Horizontal: 1 2 3 4
                    5 6 7 8
    Or Vertical:
    1 5
    2 6
    3 7
    4 8

  • Php mysql math error when using format(somenumber,2)

    osx 10.5.2, php 5.2.5, mysql 5.0.51 (standard leopard desktop os install)
    Select format(myField,2) as someNumber from myTable ...
    returns data i would expect, formatted as you would expect.
    while looping through the data returned i am calculating a running total.
    for numeric values less than 1,000 results are expected. for numbers gt 1000, php seems to want to truncate the value at the comma. 1,111.11 evaluates to 1; 25,000 evaluates to 25.
    If you remove the format() from the sql statement everything works the way you would expect.
    wrapping the value returned in a floatval() had no effect.
    I am posting this on the apple site rather than php/mysql forums on the off chance that this is a mac centric issue. googling the obvious combinations wasn't productive.

    Sounds like a locale issue.
    Many international formats use comma as the decimal separator, not the thousands.
    There are many levels where this could be set. It could be an OS setting (you don't say where you or, or the locale information of your machine (System Preferences -> International -> Format). It could be in PHP (see: http://www.php.net/setlocale ), or it could be in the database (data could be written in a comma-based table).
    It will take a little research to work out where your specific problem lies.

  • Issue with Setting Up Test Server for PHP/MySQL to work

    I've got a few newbie issues
    which I hope someone can help with!
    I'm trying to get Security Assist to work, so I've put MYSQL and workbench on my computer to get it going. I haven't created a test server in PHP, because I'm wondering if it will affect my already running website ftp? Will it take down my company website if I create a test server with the same ftp as my website?
    So, I created a model in workbench (table) and I've tried to connect mysql to dreamweaver. I keep getting an error when I try to connect!
    Despite the error saying an error has occurred..I have something which looks like a plus (+) sitting in my database area on DW, but it says there's no tables there! And in mysql there is a table!
    I'm a bit bloody lost to tell you the truth. Just changing the password on mysql to get going was horrendous.
    Anybody have a solution to get me going, so that my tables are sitting nicely in my dW and can be connected to my SA (Security Assist).
    Ugh!

    The first question: on what platform? Windows - Mac?
    I only succeeded in setting up a testing server on my Mac
    with PHP and MySQL after reading a book of David Powers. On Leopard
    I belief there still are problems connecting PHP to MySQL.

  • 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 sites created by dreamweaver mx 2004 crash on safari

    Hello,
    The title says it all, but i will elaborate.
    I develop PHP, MySQl driven database websites, I use
    Dreamweaver MX 2004 and I work on a macintosh, using both safari
    version 2 and 3.
    i have noticed that whenever I post a database item (add,
    edit to table) my safari hangs and I get a page cannot be displayed
    error after 1 minute or so, even though the db function went
    through.
    Now, this only happens with safari and it only happens with
    pages I build with dreamweaver, any hand coded websites I build do
    not do this.
    i have posted this on the apple website with no response, I
    am hoping someone here can help me.

    On Fri, 23 Nov 2007 16:21:50 +0000 (UTC), "MacDaddy333"
    <[email protected]> wrote:
    >Hello,
    >
    > All of the sites that have this issue are secure, one is
    a shopping cart
    >
    >
    http://www.jennywrenpaperie.com
    >
    > You will need to create a user account and then log in
    to see the problem, as
    >for the code, well, there is so much code involved, many
    pages of includes, so
    >i cant post it all
    >
    > One more thing, this doesn't happen to every Safari
    user, only a few, very
    >frustrating as you can imagine
    And I should give you my email address because...
    Seriously, you want people to troubleshoot your site, create
    a dummy
    account that we can log in with.
    Win
    Win Day, Wild Rose Websites
    http://www.wildrosewebsites.com
    [email protected]
    Skype winifredday

Maybe you are looking for

  • MacMail keeps crashing!

    Running OSX Lion, just upgraded about a month ago.  Just yesterday, MacMail is crashing on a continuous basis, 9 times already today.  I have not installed anything recently and have done nothing different than I normally do...  Here's the crash repo

  • [SOLVED] XFCE Install Failure

    Proceed with installation? [Y/n] libsoup                  105.1K  117.3K/s 00:00:01 [#####################] 100% gnome-keyring            154.7K  130.0K/s 00:00:01 [#####################] 100% error: failed retrieving file 'db4.1-4.1.25-1.pkg.tar.gz'

  • Skype ver7.2.0.103 keeps crashing

    every time I am on secondlife.com and try to open skype it crashes my computer and shuts everything down. this only started when I downloaded the latest version of skype can someone help and tell me which version to use?

  • Best setup for multiple email accounts

    I have 8 email accounts in my iphone 3G and it seems that many times it gets "hung" up on the first one (gmail) because it just says "connecting". The only way to solve it is to turn the phone off and then on again, which I'm doing several times a da

  • Porting a J2ME app to iPod?

    We have developed J2ME based cell phone applications for mobile learning and test preparation (see http://www.applimobile.com/). We would like to port these applications to iPod. Does anyone have a clue on how to go about doing it? Thanks much for he