PHP/mySQL Insert/Update Problems

I hope someone can help because I can't find anything online
that is helping me with this problem. I can't get the Dreamweaver
controls to work when coding a PHP insert or update record page. It
looks like it creates the code correctly but when I put them out on
my webserver and then fill out the form and click submit the page
submits and tries to use a URL string of (null)/admin/index.php
where index.php is the form page not the page I told it to redirect
to. I don't know why the (null) value keeps getting inserted into
the string either. The browser obviously can't find this URL so
gives a page cannot be displayed screen and nothing get's inserted
or updated in the mySQL database.
Any help would be greatly appreciated. This problem is
driving me crazy because I want to save time not having to hand
code things. Below is a User Authentication page using the
Dreamweaver controls that does the same thing when I try to
login.

tobyd wrote:
> the page submits and tries to use a URL string of
(null)/admin/index.php
> where index.php is the form page not the page I told it
to redirect to. I don't
> know why the (null) value keeps getting inserted into
the string either.
The following two lines set the URL for login success and
failure.
> $MM_redirectLoginSuccess = "../admin_index.php";
> $MM_redirectLoginFailed = "../admin/index.php";
As you can see, they are relative paths, suggesting that the
login form
is in a different subfolder, but at the same level as
admin_index.php
and the admin folder. The (null) almost certainly comes from
the fact
that your login page is in the site root. If you're typing in
the
redirect filenames manually, use the Browse button instead.
Dreamweaver
should set the correct path for you.
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Similar Messages

  • PHP MySQL data display problem

    I am having trouble getting data to display on my web page.In Dreamweaver CS3, I created a new page.
    Selected PHP as the type.
    Saved it.
    Connected a database and created a recordset (all using Dreamweavers menus. I did not write any code).
    NOTE: The database is on a remote server.
    The TEST button displayed the records from the recordset with no problem.
    On the new page, I then typed some text.
    Then dragged some fields from the Bindings tab to the page.
    I saved it and then went to preview it in my browser.
    The page comes up completely blank. Not even the text shows.
    I then saved the page as an HTML page.
    When I preview this in my browser, the text shows, but the fields and data do not.
    I then tried creating a dynamic table (again, using the Dreamweaver menus.).
    A similar thing happens, ie. If I save it as an HTML, the text shows and the column labels and border shows, but no data.
    Nothing shows if I save it as a PHP file.
    I can view the data online using files created by PHPMagic, so I know the data is there and retrievable.
    It is just in pages created in Dreamweaver that don’t work.
    What am I doing wrong?

    My web server supports PHP. I can disply PHP pages created by other software packages, just not the Dreamweaver ones.
    Frank
    Date: Thu, 4 Jun 2009 19:04:03 -0600
    From: [email protected]
    To: [email protected]
    Subject: PHP MySQL data display problem
    To view php pages - or pages with PHP code in them - in a browser, the page must be served up by a Web server that supports PHP. You can set up a testing server on your local machine for this purpose. Look for WAMP (Windows), MAMP (Mac), or XXAMP for some easily installed packages.
    Mark A. Boyd
    Keep-On-Learnin'
    This message was processed and edited by Jive.
    It shall not be considered an accurate representation of my words.
    It might not even have been intended as a reply to your message.
    >

  • PHP/MYSQL Insert code

    I am new to php/MYSQL but I am trying to learn. I built an
    insert page using DW8. I was looking back over the code trying to
    figure it out. Is it just me or does dreamweaver an a bunch of junk
    to there code to do a simple insert from 4 form fields.
    Can anyone explain what DW is doing since I am now dumber for
    having looked at it.
    <?php
    function GetSQLValueString($theValue, $theType,
    $theDefinedValue = "", $theNotDefinedValue = "")
    $theValue = (!get_magic_quotes_gpc()) ?
    addslashes($theValue) : $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"] == "form1")) {
    $insertSQL = sprintf("INSERT INTO reviews (review_date,
    review_name, review_address1, review_city, review_state) VALUES
    (%s, %s, %s, %s, %s)",
    GetSQLValueString($_POST['date'], "date"),
    GetSQLValueString($_POST['textfield'], "text"),
    GetSQLValueString($_POST['textfield2'], "text"),
    GetSQLValueString($_POST['textfield3'], "text"),
    GetSQLValueString($_POST['textfield4'], "text"));
    mysql_select_db($database_siteData, $siteData);
    $Result1 = mysql_query($insertSQL, $siteData) or
    die(mysql_error());
    $insertGoTo = "
    http://www.yahoo.com/";
    if (isset($_SERVER['QUERY_STRING'])) {
    $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
    $insertGoTo .= $_SERVER['QUERY_STRING'];
    header(sprintf("Location: %s", $insertGoTo));
    mysql_select_db($database_siteData, $siteData);
    $query_Recordset1 = "SELECT * FROM reviews";
    $Recordset1 = mysql_query($query_Recordset1, $siteData) or
    die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    ?>

    newhorizonhosting.com wrote:
    > I am new to php/MYSQL but I am trying to learn. I built
    an insert page using
    > DW8. I was looking back over the code trying to figure
    it out. Is it just me or
    > does dreamweaver an a bunch of junk to there code to do
    a simple insert from 4
    > form fields.
    No, it's not a bunch of junk. It's filtering the input to
    make sure that
    things are inserted correctly into your database.
    > Can anyone explain what DW is doing since I am now
    dumber for having looked at
    > it.
    This function filters the form content to prepare it for
    insertion in
    the database.
    > function GetSQLValueString($theValue, $theType,
    $theDefinedValue = "",
    > $theNotDefinedValue = "")
    This sets the action value of the form tag, including any
    query string.
    > $editFormAction = $_SERVER['PHP_SELF'];
    > if (isset($_SERVER['QUERY_STRING'])) {
    > $editFormAction .= "?" .
    htmlentities($_SERVER['QUERY_STRING']);
    > }
    This builds the SQL query and inserts the form content into
    the database.
    > if ((isset($_POST["MM_insert"])) &&
    ($_POST["MM_insert"] == "form1")) {
    > $insertSQL = sprintf("INSERT INTO reviews (review_date,
    review_name,
    > review_address1, review_city, review_state) VALUES (%s,
    %s, %s, %s, %s)",
    > GetSQLValueString($_POST['date'], "date"),
    > GetSQLValueString($_POST['textfield'], "text"),
    > GetSQLValueString($_POST['textfield2'], "text"),
    > GetSQLValueString($_POST['textfield3'], "text"),
    > GetSQLValueString($_POST['textfield4'], "text"));
    >
    > mysql_select_db($database_siteData, $siteData);
    > $Result1 = mysql_query($insertSQL, $siteData) or
    die(mysql_error());
    This redirects the page after the database query has
    finished.
    > $insertGoTo = "
    http://www.yahoo.com/";
    > if (isset($_SERVER['QUERY_STRING'])) {
    > $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" :
    > $insertGoTo .= $_SERVER['QUERY_STRING'];
    > }
    > header(sprintf("Location: %s", $insertGoTo));
    > }
    This is unrelated to the insert. It's a recordset that
    retrieves
    everything from the reviews table of your database.
    > mysql_select_db($database_siteData, $siteData);
    > $query_Recordset1 = "SELECT * FROM reviews";
    > $Recordset1 = mysql_query($query_Recordset1, $siteData)
    or die(mysql_error());
    > $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    > $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    David Powers, Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • PHP-MySQL "INSERT INTO" query not working

    Hi,
    The code below fails to update a MySQL table I have made called "tampa."  I'm not sure why.  The field "id" is an index field, auto-increment, and primary-type.  The field "site" is also an index field, but just unique-type.  Does the fact that these two fields are index fields have anything to do with why the code below won't update the table?
    Thanks in advance,
    John
    <form action="process.php" method="post">
    Add a blog to this category: <input name="site" type="text" size="50">
    <input type="submit" value="Submit">
    </form>
    PHP code in a file called "process.php":
    <?
    $site=$_POST['site'];
    mysql_connect("mysqlv3", "username", "password") or die(mysql_error());
    mysql_select_db("sand2") or die(mysql_error());
    mysql_query("INSERT INTO `tampa` ('id', 'site', 'value') VALUES (NULL, '$site',1)");
    $result = mysql_query("INSERT INTO `tampa` ('id', 'site', 'value') VALUES (NULL, '$site',1)");
    ?>

    The reason it fails is because you have surrounded the column names with quotes. You are also running the insert query twice. And yet another problem: you are inserting a form value into the database without filtering it.
    <?php
    mysql_connect("mysqlv3", "username", "password") or die(mysql_error());
    mysql_select_db("sand2") or die(mysql_error());
    // strip slashes if magic quotes are enabled
    $site = get_magic_quotes_gpc() ? stripslashes($_POST['site'] : $_POST['site'];
    // make form value safe to insert in DB
    $site = mysql_real_escape_string($site);
    mysql_query("INSERT INTO `tampa` (id, site, value) VALUES (NULL, '$site',1)");
    ?>

  • PHP/MySQL Insert Record

    I've got a multi page form that carries values across
    multiple pages with the use of Hidden Fields and then on last page
    inserts the record into a MySQL database (for this I used the built
    in Insert Record function of dreamweaver). My problem is that it
    works well when using Internet Explorer, values are carried forward
    and everything is inserted successfully to the database.
    But, when using Mozilla Firefox it looks as if it works, I
    get the confirmation at the end, but the record is not being
    inserted to the database. I've worked through this step by step and
    the values are being carried across in the hidden fields but it
    just will not insert anything to the database.
    Has anyone got any ideas??
    Thank you in advance.

    Cade06 wrote:
    > Thanks alot for your reply, but I am completely new to
    MySQL, and I am not
    > quite sure how the syntax works. When you say " WHERE
    landlord_username =
    > 'whatever' "I'm not sure what needs to go in the
    'whatever' portion of the
    > code. Do I need to insert static text here or something
    else? I am totally out
    > of my element here, sorry :-/
    It's probably not so much MySQL syntax that's the problem for
    you, but a
    lack of understanding how to work with Dreamweaver
    recordsets, server
    behaviors, and sessions. Building database-driven sites with
    Dreamweaver
    isn't difficult, but there are a lot of things involved.
    The Log In User server behavior automatically creates a
    session variable
    called $_SESSION['MM_Username']. You can use this as a
    parameter to pass
    to the SQL query in the Advanced Recordset dialog box. In the
    SQL area
    you would type (I'm guessing the name of your table and the
    username
    column):
    SELECT landlord_id FROM landlords
    WHERE landlord_username = 'col1'
    Then click the plus button above the Variables area, and
    create a
    Parameter with the following values:
    Name: col1
    Default value: 1
    Runtime value: $_SESSION['MM_Username']
    You can then extract the result of the recordset, and assign
    it to a
    session variable like this:
    $_SESSION['landlord_id'] = $row_recordsetName['landlord_id'];
    > Also, I understand that I need to do this on the login
    page, but do I need to
    > define the recordset again on the add_site page as well?
    I guess I'm still not
    > quite clear on how I specify the session variable as the
    value that needs to be
    > entered in the sites table as the landlord_ID.
    As long as the session is still valid (which it would be if
    you use
    Restrict Access to Page), you will always have access to that
    landlord's
    id through $_SESSION['landlord_id'].
    David Powers
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "Foundation PHP 5 for Flash" (friends of ED)
    http://foundationphp.com/

  • PHP/MySQL Date Format problems

    Dear all,
    In the past I successfully formatted a date from a Unix date format to my own desired output by using a PHP command as such:
    echo date($row_rsGNresults['date'], "Y F j"); 
    For a reason unbeknown to me, this no longer works and no matter what I try, the page always returns the date results in yyyy-mm-dd format.
    I've even tried using date format in the SQL query:
    SELECT * DATE_FORMAT('date', '%Y %F %j') AS showdate FROM gemnews_tab WHERE language LIKE %s AND entry LIKE %s AND works LIKE %s AND category LIKE %s ORDER BY date ASC 
    I've even tried installing various Dreamweaver extensions for date server formats (like Kaosweaver's) to no avail.  I've checked MySQL and the field is definitely set to 'date' and the dates are in yyyy-mm-dd format.
    Does anyone have any suggestions?  Would it matter that the dates are from the 18th century?
    Many Thanks
    J
    Message was edited by: Günter Schenk. Reason: the "PHP command" code was invisible

    Try this:
    <?php echo Date("M d, Y",
    strtotime($row_Recordset1['review_date'])); ?>
    Ken Ford
    Adobe Community Expert
    Fordwebs, LLC
    http://www.fordwebs.com
    "newhorizonhosting.com" <[email protected]>
    wrote in message news:et7lf6$q8a$[email protected]..
    > Can someone help me out here. I am trying to format my
    date. My MySQL is a
    > "datetime". How ever I would like to display only the
    month, day, year like so
    > "Jan,15,2007"
    >
    > Here is my current code, what should I add to make it do
    what I want.
    >
    > <?php echo $row_Recordset1['review_date']; ?>
    >
    > Thanks
    >

  • Insert/Update problems with form

    This is my first time using data entry in Oracle Portal. I followed the example given in the 'Create and event calendar' in the tutorial. i created a simple form and an ID column. I created a sequence and a default value field with the parameter 'nextval' in it as per the example.
    The result is that an ID number is created everytime the form comes up and no queries work. Looks like a fundemental problem (default value with auto increment?). I should be able to increment the ID ONLY on insert somehow.Anyone know the answer?

    A reply to a similar questions was posted in the Portal forum that suggested using a trigger. Sounds reasonable, but I haven't been able to make it work. An example would have been great...
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by John Pugh ([email protected]):
    This is my first time using data entry in Oracle Portal. I followed the example given in the 'Create and event calendar' in the tutorial. i created a simple form and an ID column. I created a sequence and a default value field with the parameter 'nextval' in it as per the example.
    The result is that an ID number is created everytime the form comes up and no queries work. Looks like a fundemental problem (default value with auto increment?). I should be able to increment the ID ONLY on insert somehow.Anyone know the answer?<HR></BLOCKQUOTE>
    null

  • Php/mysql all caps

    I have a php mysql insert record application built in
    dreamweaver. Is there a way to force or convert all inputted text
    to all caps? I tried a style sheet text transform, but that doesn't
    make the actual entry into the database all caps. Thanks.

    Admittedly though, that's pretty easy too.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Gary White" <[email protected]> wrote in message
    news:[email protected]..
    > On Tue, 13 Jan 2009 23:09:15 +0000, David Powers
    <[email protected]>
    > wrote:
    >
    >>Why? That means converting the data every time it's
    displayed. If the
    >>data is always required as uppercase, it makes more
    sense to convert it
    >>once at the time of storage.
    >
    > For the most part, I agree. However, there is the
    possibility down the
    > road, that they might want to use the data for something
    other than the
    > current ticker. In that case, it might display better in
    mixed case. It's
    > a lot easier to convert to all upper case for the
    ticker, than to try to
    > convert all upper case to mixed case.
    >
    > Gary

  • Problems with mysql after update to php 5.3

    Hi everyone,
    I know I am not the only one having trouble with that upgrade but so far I still have some issues.
    I have read the news about the update and the wiki. I use apache, php, mysql and phpmyadmin.
    After the update, I installed php-apache, php-mcrypt and used php.ini.pacnew to do my new configuration.
    Everything works fine except mysql.
    I have a weird problem that is that I can access and do whatever I want to databases with phpmyadmin but as soon as I try to connect to the mysql database with php code then my browser tells me that the page can't be loaded and that "the connection terminated unexpectedly". What is the problem ? Am I the only one in this situation ?
    Thanks for your time !

    Here it is, that's the error log of httpd:
    [Sun Sep 27 17:25:07 2009] [notice] child pid 2006 exit signal Segmentation fault (11)
    [Sun Sep 27 19:40:32 2009] [error] [client 127.0.0.1] File does not exist: /srv/http/favicon.ico
    [Sun Sep 27 19:40:36 2009] [error] [client 127.0.0.1] File does not exist: /srv/http/favicon.ico
    [Sun Sep 27 19:40:37 2009] [error] [client 127.0.0.1] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /home/yms/projects/homepage/yms/index.php on line 60, referer: http://localhost/~yms/
    [Sun Sep 27 19:40:37 2009] [error] [client 127.0.0.1] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /home/yms/projects/homepage/yms/index.php on line 73, referer: http://localhost/~yms/
    [Sun Sep 27 19:40:37 2009] [error] [client 127.0.0.1] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /home/yms/projects/homepage/yms/index.php on line 60, referer: http://localhost/~yms/
    [Sun Sep 27 19:40:37 2009] [error] [client 127.0.0.1] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /home/yms/projects/homepage/yms/index.php on line 73, referer: http://localhost/~yms/
    [Sun Sep 27 19:40:37 2009] [error] [client 127.0.0.1] File does not exist: /srv/http/favicon.ico
    [Sun Sep 27 19:40:38 2009] [notice] child pid 2003 exit signal Segmentation fault (11)
    [Sun Sep 27 19:40:38 2009] [notice] child pid 2577 exit signal Segmentation fault (11)
    And that's the access log in case it is useful:
    127.0.0.1 - - [27/Sep/2009:19:40:32 +0200] "GET / HTTP/1.1" 200 788
    127.0.0.1 - - [27/Sep/2009:19:40:32 +0200] "GET /favicon.ico HTTP/1.1" 404 1085
    127.0.0.1 - - [27/Sep/2009:19:40:32 +0200] "GET /icons/blank.gif HTTP/1.1" 200 148
    127.0.0.1 - - [27/Sep/2009:19:40:32 +0200] "GET /icons/folder.gif HTTP/1.1" 200 225
    127.0.0.1 - - [27/Sep/2009:19:40:36 +0200] "GET /~yms HTTP/1.1" 301 368
    127.0.0.1 - - [27/Sep/2009:19:40:36 +0200] "GET /~yms/ HTTP/1.1" 200 1150
    127.0.0.1 - - [27/Sep/2009:19:40:36 +0200] "GET /favicon.ico HTTP/1.1" 404 1085
    127.0.0.1 - - [27/Sep/2009:19:40:36 +0200] "GET /icons/back.gif HTTP/1.1" 200 216
    127.0.0.1 - - [27/Sep/2009:19:40:37 +0200] "GET /favicon.ico HTTP/1.1" 404 1085
    And thanks for trying to help me ;-)

  • Inserting special character like apostrophes with PHP/Mysql

    Hi friends,
    I have a problem with php/mysql. I have created a form inton a php page with dreamweaver and when i try to fill the form with a string containing apostrophe ( ' ), i have a error. It seems that the insertion is not possible. Could you have any idea for that. I give you the php dreamweaver code and thank you for your help.
    <?php require_once('Connections/Mainconnect.php'); ?>
    <?php require_once('Zend/Date.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":
    if ($theValue=="")
        $theValue="NULL";
    else
        $zendDate=new Zend_Date($theValue,"dd/MM/yyyy");
        $theValue="'".$zendDate->toString("yyyy-MM-dd")."'";
          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_update"])) && ($_POST["MM_update"] == "form1")) {
      $updateSQL = sprintf("UPDATE pers_soc_reg SET field1=%s, field2=%s,
                           GetSQLValueString($_POST['field1'], "text"),
                           GetSQLValueString($_POST['field2'], "double"));

    "Normally, you canot use mysql_real_escape_string without connection to database"
    That is not true at all. Try running the following script.
    <?php
    if ($_POST['submit']){
    $x1=$_POST['test1'];
    foreach ($_POST as $key => $value) {
    if (!is_array($value)){
    $_POST[$key] = mysql_real_escape_string($value);
    extract($_POST);
    echo "The text after 'becomes' should be escaped (\')<br/>";
    echo "$x1 becomes $test1<br/>";
    ?>
    <hr/>
      <form action="#" method="post" />
    Enter some text, including an apostrophe: <input name="test1" type="text"><br/>
        <p><input name="submit" value="submit" type="submit"/>
      </form>

  • Problems with recordset in PHP/MySQL setting

    We use Dreamweaver CS5 for creating dynamic pages (PHP pages with MySQL database). We test the site locally on a Windows 7 operating system with EasyPHP as WAMP server.
    We often have a problem in managing the record set.
    The following problem occurs quite often:
    We take a PHP page. We create a recordset. We use a dynamic table or a repeated region to show the results of the recordset. So far so good.
    Then we want to change something to the recordset for example the filter. When editing the recordset, the advanced mode is shown, it is impossible to swith to the simple mode.
    By deleting the recordset the problem is not solved. By deleting and afterwards rebuilding the recordset, syntax errors occur. It seems that the php code for building the recordset didn't dissapear.
    The only solutions till now seems to completely restart with a new PHP page.
    Anyone has a solution for this or anyone did experience the same problem ?
    Thank you very much in advance.
    Ilse 

    You cannot switch to Simple mode in the Recordset dialog box if you have made any changes to the SQL in Advanced mode.
    Opening the Recordset dialog box to edit the settings does occasionally result in the code being inserted again instead of being changed. This appears to be an intermittent bug, which I have experienced myself, and know that others have complained about it, too. As far as I know, there is no solution other than to watch carefully the code that Dreamweaver generates.
    If you don't understand the code, you would be well advised to learn what it means and does. Relying on Dreamweaver to do everything for you severely limits what you can do with PHP/MySQL. Adobe regards the server behaviors as quick prototyping tools, rather than for developing production websites.

  • Updating to 10.4.11 killed my PHP/MYSQL connections

    Hi all - I use Dreamweaver CS3 for web development, and have been using some very simple PHP/MYSQL Select and Inserts. Everything was working fabulously up until this morning, when I updated to 10.4.11 (Macbook Pro, CoreDuo). As soon as I updated, I get a 'No Database Selected' message in Safari, Firefox and IE. I can see the database and work with it in DWeaver, just can't get it to go live in browsers.
    I'm running PHP 5.2.4, MYSQL 5.1.8 and whatever version of Apache is bundled in OS X (I think it's 1.x - but can't find how to get that number!)
    Just for record, I have stopped/restarted Personal Web Sharing, Personal File Sharing, OS X, MYSQL to just check whether something wasn't working there.
    I'm about to close out, zap the PRAM and then come back in.
    Any ideas?
    Vince

    Thanks - A couple of additional points. This is OS X 10.4.11, not OS X Server, so I had installed MYSQL and PHP as fresh installations. MYSQL has not changed since I installed and is running fine through direct client (Navicat).
    For PHP I was running 4 and it had been running fine. When the update to OSX came through, PHP 4 didn't work - no change had been made to any configuration file that was working already. These are the httpd.conf instructions I had followed to set-up PHP 4:
    +1 Launch Terminal from /Applications/Utilities.+
    +2 Open the Apache configuration file and edit the UNIX shell prompt:+
    +sudo pico /etc/httpd/httpd.conf+
    +3 When prompted for a password, enter the Mac OS X administrator account password.+
    +4 Uncomment the following lines:+
    +LoadModule php4_module libexec/httpd/libphp4.so+
    +AddModule mod_php4.c+
    +5 Add the following lines (add these lines above: AddType application/x-tar .tgz):+
    +AddType application/x-httpd-php .php+
    +AddType application/x-httpd-php-source .phps+
    +Note: All the commands for the pico editor display on the screen and you can start any commands with the Control key. Use the arrow keys to move around. Pico is a text editor, mostly for UNIX users to use at the UNIX command line. The pico text editor resides in /usr/bin/ directory.+
    +6 Add a new index page for PHP (index.php) so that the web server will recognize it as the first page to load:+
    +<IfModule mod_dir.c>+
    +DirectoryIndex index.html index.php index.htm+
    </IfModule>
    +7 Save the httpd.conf file by pressing ^X (control & x keys). When the screen asks "Save Modified buffer?", press "Y". When prompted for "File Name to write : httpd.conf", press Return once to accept it. This will return you to the UNIX shell prompt.+
    When PHP 4 stopped working, I took the decision to upgrade to 5 and then fix the breakdown (by now, I was convinced it was an Apache change (nothing in config had changed at all). So, upgraded to PHP 5 and, to do so, had to reverse the directions above. Since then, I've tried reenabling the above, replacing with PHP5 wherever PHP4 appears, all to no avail (in fact, it just froze the Personal Web Sharing that turns Apache on/off).
    Right now, running the phpinfo check detailed above tells me the PHP 5 is successfully installed and running. The text from the test copied here:
    +System Darwin Vincet-MacBook-Pro.local 8.11.1 Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386 i386+
    +_Build Date_ Aug 31 2007 23:38:11+
    +_Configure Command_ './configure' '--prefix=/usr/local/php5' '--with-apxs' '--with-config-file-scan-dir=/usr/local/php5/php.d' '--with-iconv' '--with-openssl=/usr' '--with-zlib=/usr' '--with-gd' '--with-zlib-dir=/usr' '--with-ldap' '--with-xmlrpc' '--with-iconv-dir=/usr' '--with-snmp=/usr' '--enable-exif' '--enable-wddx' '--enable-soap' '--enable-sqlite-utf8' '--enable-ftp' '--enable-sockets' '--enable-dbx' '--enable-dbase' '--enable-mbstring' '--enable-calendar' '--enable-bcmath' '--with-bz2=/usr' '--enable-fastcgi' '--enable-cgi' '--enable-memory-limit' '--enable-zip' '--enable-pcntl' '--enable-shmop' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with-curl=shared,/usr/local/php5' '--with-mysql=shared,/usr/local/php5' '--with-mysqli=shared,/usr/local/php5/bin/mysql_config' '--with-pdo-mysql=shared,/usr/local/php5' '--with-libxml-dir=shared,/usr/local/php5' '--with-xsl=shared,/usr/local/php5' '--with-pdflib=shared,/usr/local/php5' '--with-imap=../imap-2004g' '--with-kerberos=/usr' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr/local/php5' '--with-png-dir=/usr/local/php5' '--enable-gd-native-ttf' '--with-freetype-dir=/usr/local/php5' '--with-iodbc=shared,/usr' '--with-pgsql=shared,/usr/local/php5' '--with-pdo-pgsql=shared,/usr/local/php5' '--with-t1lib=/usr/local/php5' '--with-gettext=shared,/usr/local/php5' '--with-ming=shared,/usr/local/php5' '--with-mcrypt=shared,/usr/local/php5' '--with-mhash=shared,/usr/local/php5' '--with-mssql=shared,/usr/local/php5' '--with-fbsql=shared,/Users/liyanage/svn/entropy/universalbuild/src/FBDeveloper Libraries/Library/FrontBase' '--with-json=shared' '--enable-memcache' '--enable-openbase_module'+
    +_Server AP_I Apache+
    +_Virtual Directory Suppor_t disabled+
    +_Configuration File (php.ini) Path_ /usr/local/php5/lib+
    +_Loaded Configuration File_ /usr/local/php5/lib/php.ini+
    +_Scan this dir for additional .ini files_ /usr/local/php5/php.d+
    +_additional .ini files parsed_ /usr/local/php5/php.d/10-extension_dir.ini, /usr/local/php5/php.d/50-extension-curl.ini, /usr/local/php5/php.d/50-extension-fbsql.ini, /usr/local/php5/php.d/50-extension-gettext.ini, /usr/local/php5/php.d/50-extension-json.ini, /usr/local/php5/php.d/50-extension-mcrypt.ini, /usr/local/php5/php.d/50-extension-mhash.ini, /usr/local/php5/php.d/50-extension-ming.ini, /usr/local/php5/php.d/50-extension-mssql.ini, /usr/local/php5/php.d/50-extension-mysql.ini, /usr/local/php5/php.d/50-extension-mysqli.ini, /usr/local/php5/php.d/50-extension-odbc.ini, /usr/local/php5/php.d/50-extension-pdf.ini, /usr/local/php5/php.d/50-extension-pdo_mysql.ini, /usr/local/php5/php.d/50-extension-pdo_pgsql.ini, /usr/local/php5/php.d/50-extension-pgsql.ini, /usr/local/php5/php.d/50-extension-xsl.ini+
    +_PHP API_ 20041225+
    +P_HP Extension_ 20060613+
    +_Zend Extension_ 220060519+
    +_Debug Build_ no+
    +_Thread Safety_ disabled+
    +Zend Memory Manager enabled+
    +_IPv6 Support_ enabled+
    +_Registered PHP Streams_ zip, php, file, data, http, ftp, compress.bzip2, compress.zlib, https, ftps+
    +_Registered Stream Socket Transports_ tcp, udp, unix, udg, ssl, sslv3, sslv2, tls+
    +_Registered Stream Filters_ string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, convert.iconv.*, bzip2.*, zlib.*+
    I don't know if any of this helps, but it's what I find. From my online troubleshooting and reading, I believe all of the above looks right and that things should work. So, I'm still left with an informed gut decision that something in the set-up of Apache changed (location in file structure, configuration file, etc.) Could it be looking at a second copy of httpd.conf somewhere else? That would seem to make sense - however I haven't managed to turn up how to assess which version of Apache is loaded (I think 1.3) or where it's located.
    If anyone can confirm what PHP5 code should be included in httpd.conf given the above, that would be a great next step.
    Thanks for all your assistance!
    Vince

  • PHP/MySQL issue after security update 2010-005

    Hello,
    I run Apache/PHP/MySQL on my MBP for testing Web sites.
    After the 2010-005 security update I can't connect to my databases anymore.
    I don't know how to fix this, I even don't know where to start looking.
    Ideas, anyone?

    coloma wrote:
    etresoft, thanks for sharing this ... I decided to go with the TriangleJuice suggestion instead for two reasons ... first is that I wasn't sure where to find this launchd file.
    There is nothing wrong with TriangleJuice's suggestion. My only issue with creating a php.ini file is that now I have to worry about all those other settings in the ini file. If something else in PHP breaks, I have to figure out if I am the one who broke it.
    Apple ships MySQL with MacOS X Server. They probably adjusted the PHP settings to match how they have MySQL setup in MacOS X Server.
    For MySQL's, no, Sun's - drat! no, Oracle's part, they still haven't acknowledged the fact that Apple has shipped MacOS X 10.4. MySQL still ships with a Startup Item. If you don't know where the launchd file is, it is because you don't have one. You probably have a MySQL entry in /Library/StartupItems or maybe /System/Library/StartupItems. Startup Items were deprecated in 10.4. Oracle should be creating a file named com.mysql.mysqld.plist in /Library/LaunchDaemons.
    Here is what mine looks like now:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>KeepAlive</key>
    <true/>
    <key>Label</key>
    <string>com.mysql.mysqld</string>
    <key>ProgramArguments</key>
    <array>
    <string>/usr/local/mysql/bin/mysqld</string>
    <string>--socket=/var/mysql/mysql.sock</string>
    <string>--basedir=/usr/local/mysql</string>
    <string>--datadir=/usr/local/mysql/data</string>
    <string>--user=mysql</string>
    <string>--log-error=/usr/local/mysql/data/Pele.local.err</string>
    <string>--pid-file=/usr/local/mysql/data/Pele.local.pid</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    </dict>
    </plist>
    I also don't have a /var/mysql directory and wasn't sure whether I should just create one or if this meant my configuration was different. If you feel like explaining any of this, I'd be curious to know.
    You have to create one. Such a directory probably already exists on MacOS X Server. Just make sure it is owned by mysql.
    sudo mkdir /var/mysql
    sudo chown _mysql:staff /var/mysql
    sudo chmod 0755 /var/mysql
    [jdaniel@Pele:516] /var $ ls -al /private/var | grep mysql
    drwxr-xr-x 3 _mysql staff 102 Aug 26 20:03 mysql
    Of course, /var is a symbolic link to /private/var. Long story there.

  • How to update PHP, MySQL or Apache

    The Mac OS X 10.6.2 system does not include the latest versions of PHP, MySQL or Apache.
    What is the recommended update procedure for PHP, MySQL or Apache:
    a) automatically by Mac OS X system (is this possible?) or
    b) manually by the administrator (are there any documentations?)
    Many thanks.
    Actual system versions:
    Mac OS X 10.6.2
    MySQL 5.0.82
    Apache 2.2

    Hi, Thanks for your answer.
    That sounds Apple do not seriously release updates of third party packages shipped with the system (like Apache, mySQL ...) very often.
    To use month or year old packages in a web environment is a big risk, e.g. mySQL actual official version is V5.50 / mySQL Version shipped and updated by Mac OS X 10.6.2 Server is V5.0.82).
    The same with Apache and PHP, both are packages included in Mac OS X Snow Leopard Server product by Apple and are included in a old version.
    And when manually updates by the administrator of the server system do not work well or are not supported by the OS X Server system (as I understand your posting), the administrator can not act to improve and secure the system.
    That can only lead to one conclusion: Apple's Mac OS X Snow Leopard Server should not be used in a productive, internet faced web environment.
    Is this true? I do not want to believe this!?
    Is there really no official supported or documented procedure by Apple to keep the integrated third party components updated?
    I'd like to prefer Mac OS X Server odd Linux distribution because it seems more handy to administrate and to use, e.g. tools like Server Admin. These tools are an advantage of Mac OS X Server.

  • Dreamweaver PHP/mySQL poll problem?

    Hi,
    I'm a PHP/mySQL noob who's using some of Dreamweaver's 8
    (8.2) out-of-box Update server behaviors to update a database of
    results for a poll. I know there's a lot of free polling apps out
    there but I need to have the poll show up in another page as
    opposed to being refreshed/displayed in the same page/content area.
    I've successfully built the backend in phpMyAdmin and I'm
    able to list the database contents and do basic updates to the poll
    questions and answers. However, I've been unable to pass an
    incremented result value via a Dreamweaver radio button group
    (which is the normal poll format) without previous unselected
    results being overwritten.
    When an answer is selected the result is indeed incremented
    and is displayed in the Result Listing but unfortunately it also
    overwrites any preexisting data for that poll and replaces it with
    zero. For example:
    Question:
    Answer a) 0
    Answer b) 0
    Answer c) 1 (this would be the value that was selected)
    Answer d) 0
    If c is selected again the value is stored and incremented
    and the value is now 2. However, if that value is not selected,
    then another value is incremented and c would be wiped. I've even
    resorted to trying to use javascript to maintain the original state
    but to no avail I was just previously incrementing the inline php
    radio button value and/or assigning different names to each of the
    radio buttons. This, of course, allows people to select multiple
    values which runs contrary to the whole idea behind radio buttons,
    but I thought I'd see if that worked . Anyway, when the radio group
    is assigned the same value it merely increments everything.
    example:
    http://www.dailydatum.com/funFacts/funFactsListingSingleUpdate15.php
    As you can see, i'm up to version 15 and gritting me teeth,
    lol. Any help would be mighty appreciated.
    Mario

    hi ,
    you can always try the macromedia devnet sites , they have
    ongoing tutorials and discussions on all areas, including php with
    dreamweaver8.
    http://www.adobe.com/devnet/topics/php.html
    be aware though that some of the tutorials require the use of
    third party php extensions, like interakt products, which is a
    shame because most of them are expensive to buy. But they are still
    worth a read.
    hope this is some help.
    ted.

Maybe you are looking for

  • How to cancel current printing

    i haven't tried printing anything for over a year - of course, the ink cartridges dried up - i got new ones, but my friend decided to set up the printer and print out pictures before i got home - now, the same picture keeps printing...i don't know ho

  • Itunes show duplicate, 1 with icloud and 1 without. are they both on hard drive?

    itunes shows duplicates - 2 with icloud and 1 without. are they both on hard drive? which ones should i delete?

  • Render Errors

    I got this error while rendering my video. After Effects Error: Crash in progress. Last Logged message was <4544> <BEEp_InitSoundPB> <0> Vid rate ratios min, max: 1, 1 Any help??

  • Help with find my iphone

    Can any of the features turn off by themselves? Such as the find my iphone feature...say after an update could you find that feature in the off position and the owner of the phone claims he did not turn it off. I find it very hard to believe that it

  • Problem Downloading RoboHelp 10

    After I select a language, I get the error No such interface supported.  How do I download directly?